Why don't lio_listio's signals get delivered?

Alan Somers asomers at freebsd.org
Mon Nov 30 00:54:46 UTC 2020


I'm investigating https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220398
.  What happens is that lio_listio sends a signal to the current process
(synchronously, from within the lio_listio syscall itself, not after some
I/O completes).  With dtrace, I've verified that the signal isn't masked,
that it is caught, and that signotify and tdsigwakeup do get called.  But
after lio_listio returns, the process never receives the signal.  If it
registers a handler, the handler never gets called.  If I set the signal to
SIGTERM, the process doesn't get terminated.  It's as if the signal is
ignored.  Asynchronously generated signals still work, however.

What's going on?  My knowledge of signal-delivery internals is running out,
and I would appreciate some help.

Steps to reproduce:
$ cd /usr/tests/sys/aio
$ kyua debug lio_test:lio_listio_empty_nowait_signal

Stack trace at the time the signal looks like it's being delivered:
              kernel`tdsendsignal+0x4e1
              kernel`kern_lio_listio+0x493
              kernel`sys_lio_listio+0xc2
              kernel`amd64_syscall+0x12e
              kernel`0xffffffff81007e1e

lio_listio is attempting to send this signal via aio_sendsig, 24 lines from
the bottom of kern_lio_listio.

-Alan


More information about the freebsd-hackers mailing list