GLYCAM-Web / gems

Glycam Extensible Modeling System
GNU Lesser General Public License v3.0
1 stars 4 forks source link

Error thrown by gmml not propated up to the website level #76

Open gitoliver opened 1 year ago

gitoliver commented 1 year ago

If you build: DSorp[3S]a2-4DGalpA[3D]b1-2LIdopAa1-3DXylpa1-2DManp[4A,3A]a1-3DGalpb1-4[DArapa1-2]LFucpa1-3DGalpNAca1-OH It currently throws an error. See here: https://github.com/GLYCAM-Web/gmml/issues/148 (note a fix will be pushed to gmml-test soon.) But this error is not shown to the user. Dan thinks this is the source of the error: https://github.com/GLYCAM-Web/gems/blob/d10e01284f4ad8eb3742099d4d6e163d8167f08d/gemsModules/deprecated/sequence/build.py#L96

GRAYgoose124 commented 1 year ago

Input to CB Builder

DSorp[3S]a2-4DGalpA[3D]b1-2LIdopAa1-3DXylpa1-2DManp[4A,3A]a1-3DGalpb1-4[DArapa1-2]LFucpa1-3DGalpNAca1-OH

Error

Comments

If you set GEMS_FORCE_SERIAL_EXECUTION to False, you get an error on the website. If we look at manageSequenceBuild3DStructureRequest we see processes get spawned. We log at every level above and re-raise several times, yet if you remove the try/except around the builder around line 100 in build.py you get no other ERRORs logging. You'd normally expect manageSequenceBuild3DStructureRequest to catch the exceptions raised, except they're probably being raised in the Processes.

It seems that normally one wouldn't need to do anything but raise from buildEach3DStructureInStructureInfo and the callers would catch to build a notice anyways. However, because of the Process boundaries we need some way to pass the errors through. It appears to me that the simplest fix would be to append notices and then checking for those notices at the Transaction/receive level. The thing is, I'm pretty sure args passed to a Process are deepcopied and there is no join logic following either.

In new GEMS, I believe the process spawning could likely be moved to more core GEMS logic around the Servicer level, but this issue appears non-trivial even then. Possibly, in the future, we could have sequence instead batch all it's individual builds to /bin/delegate to bootstrap individual instances with their own GEMS, rather than attempting to implement IPC again within gems when gems itself is supposed to be something like that.