-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanly Disconnect from DTB Upon Keyboard Interrupt #387
Comments
Adding signal handler deleting the API object should be fine: |
Some testing might be required to get this compiling and working on all three platforms, WIN32 is not POSIX conform. |
Hi Caleb, in my experience this varies from setup to setup. On the ubuntu box I can I'll add the sigaction for *nix. Cheers, On Wed, Aug 5, 2015 at 8:57 PM, Caleb Fangmeier [email protected]
|
Hi Urs, Thanks! FYI, I'm currently using pXar on OSX where I am experiencing this problem. We also have an Ubuntu setup. I don't recall if we observed this issue there or not. |
Hi Caleb, it's not clear to me this is easy. Especially if the DTB is doing something libc++abi.dylib: terminate called throwing an exception when trying to delete pxarCore. The stack trace looks as follows:
Cheers, |
The problem here is, that pxarCore is not thread safe - meaning, if there is something running, you must not call another function or delete the object. In some other code interfacing pxarCore I added a mutex to prevent this from happening:
from here: https://github.com/eudaq/eudaq/blob/v1.5-dev/producers/cmspixel/src/CMSPixelProducer.cxx However, |
To be honest, I have no intentions to make pxar thread safe at this point Cheers, On Fri, Aug 7, 2015 at 5:26 PM, simonspa [email protected] wrote:
|
Perhaps it would be possible to simply set some global flag from within the interrupt routine. The tests would then periodically check this flag and exit if it has been set. Is something similar already being done with the "stop" button in the GUI? Additionally, it may be worth considering to leave ctrl-C as a way to force kill pXar, and setup some other interrupt as a "soft" kill. Escape maybe? |
The behavior that I have observed with pXar is that if one issues a keyboard interrupt(ctrl-C), pXar will quit without properly closing the connection to the DTB. The is a problem because it leaves the DTB unresponsive until it is power cycled. This is especially problematic if the DTB is in a remote location.
It would be preferable to catch the exception and close the connection before exiting. The Python "cmdline" seems to already be doing this.
The text was updated successfully, but these errors were encountered: