01-17-2019 05:33 AM
I am developing a Linux application with SDK 2017.3 and I have a problem with posix signals. I am using libpthread and nanosleep() function.
If I place the nanosleep in the main() I have no problems. However if I generate a POSIX thread, and inside that thread I call nanosleep(), it seems that the library is somehow using Signal 32 for performing internally the sleep.
When TCF sees this signal, the thread execution is Suspended:
I always have to resume the thread execution manually in SDK when this happens.
I tried to change the behaviour of SDK with this signaling. I right click in the thread and select "Signals..." menu. I tried setting a "Don't stop" to all signals:
but it seems that signal 32 is not configurable, so I cannot tell the program to not suspend execution when it receives a signal 32.
Is it possible to configure SDK to not suspend with signal 32?
Have this menu changed in new version of SDK after 2017.3?
Any help would be highly appreciated.
01-18-2019 03:19 AM
Signal 32 is reserved by glibc, for cancellation/timer expiration, so debugger doesn't have control over these. Please see https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/nptl-signals.h;h=7560a2182546beb72784c822d9021c45cdda2bce;hb=refs/heads/release/2.23/master
In your case, signal 32 could be pointing to time overflow, but I'm not sure
01-18-2019 03:30 AM
Many thanks for your post.
I think we will not dig inside glibc or pthread libraries source code to see who and why is using this signal, since in our code we don't use it and the program runs properly when we are not debugging.
However, it is pretty annoying to see the execution suspended when this signal appears and resume the execution manually everytime.
That's why we asked if we can configure the TCF behaviour to not suspend the execution with this signal as we can do with the other 60 signals in the signal menu.
01-20-2019 10:26 PM