Closed sjt-rvx closed 2 years ago
The above doesn't actually crash the server. This will :
job = af.Job('thejob')
nonNumBlock = af.Block('non-num block', 'generic')
numBlock = af.Block('num block', 'generic')
numBlock.setNumeric(1, 1, 1)
job.blocks.append(nonNumBlock)
job.blocks.append(numBlock)
job.send(verbose=True)
It seems to be a combination of having a non-numeric block with no tasks before a numeric block with tasks. Also, the server complains about blocks with no tasks, but doesn't crash unless the mentioned combination happens.
The crash seems to come from parsing the json input.
Tip : set your systemd service to restart=always
which will restart the server on crash. If you don't want to edit the .service
file look into how to create .service.d/override.conf
files for service overrides.
I'm currently looking into how creating a check in the af
module before it's sent to the server.
It should be fixed it on the server side too. As jobs can be sent w/o Python API.
I totally agree. However with the checkJob()
it's easier to report why it failed and more checks can be added.
Ok, cool. Good to know - I was afraid of testing this any further since I didn't have the chance to work on a non-production server - and for some reason people get annoyed if you keep stopping their work :)
Hi, I'm running v3.2.2 and ran into this fun issue:
I am creating some blocks via Python, and was testing adding tasks manually (instead of
setNumeric
) but I made an error so some block neither gotsetNumeric
nor got tasks appended. The resultingjob.send()
crashed the server. Runningjob.output()
gave me this json file (slightly modified).So I'm guessing, to reproduce the issue you could run
Although I haven't tested this since I don't want to bring our production afanasy server down