Question

I have linux application on embedded linux that uses pthread library. From time to time pthread "manager" thread get signal 33 and crashed.

How do I know who is sending the signal?

Strace log:

...
18:15:07 getppid()                      = 30
18:15:07 poll([{fd=31, events=POLLIN}], 1, 2000) = 0
18:15:09 getppid()                      = 30
18:15:09 poll([{fd=31, events=POLLIN}], 1, 2000) = 0
18:15:11 getppid()                      = 30
18:15:11 poll([{fd=31, events=POLLIN}], 1, 2000) = 0
18:15:13 getppid()                      = 30
18:15:13 poll([{fd=31, events=POLLIN}], 1, 2000) = -1 EINTR (Interrupted system call)
18:15:13 --- SIGRT_1 (Unknown signal 33) @ 0 (0) ---
18:15:13 getppid()                      = 30
18:15:13 wait4(-1, [WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV], WNOHANG|__WCLONE, NULL) = 68
18:15:13 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
Was it helpful?

Solution

Signal 33 is used internally by the pthreads library (it is referred to as SIGSETXID, and is raised by the library for every thread whenever one of the uids or gids of the process are changed).

It should not cause a thread to crash. Why do you believe this signal is responsible?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top