SIGUSR1, SIGUSR2

Panke tobias at pankrath.net
Fri Dec 11 17:29:12 UTC 2020


I have as vibe.d application that opens some websockets, reads 
messages and does something with them (currently mostly writing 
them to disk).

The processing happens in background threads started with 
runWorkerTask, the websocket code runs as a normal task 
(runTask), everything is synchronized over a central circular 
buffer.

But somehow my process gets signalled with USR1 and USR2 all the 
time. If I do

   $ strace -etrace=epoll_wait

the disruptions of epoll by SIGUSR1/2 just scroll down. According 
to the strace output I got new, the source of the signals is the 
process itself. This happens if I do not install a signal handler 
myself.

While this makes debugging a pain, at least the program seems to 
work. If I install signal handlers for USR1/USR2 via eventcore 
than vibe.d never seems to be able to establish the websocket 
connection. The same happens if I do signal(SIGUSR1, SIG_IGN).

Maybe some kind of deadlock (all threads seem to be waiting on 
some condition variables or a in a spinlock). Does anyone have a 
idea what's going on here?






More information about the Digitalmars-d-learn mailing list