Date: Sun, 29 Nov 2020 17:54:32 -0700 From: Alan Somers <asomers@freebsd.org> To: FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Why don't lio_listio's signals get delivered? Message-ID: <CAOtMX2ixRRPvza4G85qTOjaDAp34L23AO-1UQQ5HYj79bfucPw@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2ixRRPvza4G85qTOjaDAp34L23AO-1UQQ5HYj79bfucPw>