`timerfd_settime` crash
In https://phabricator.services.mozilla.com/D261246, I'm investigating replacing Gecko's old NSPR-based polling with the polling crate. In CI, I see the following crash, which baffles me a bit. Any clues?
Operating system: Linux
6.5.0-1025-gcp #27~22.04.1-Ubuntu SMP Tue Jul 16 23:03:39 UTC 2024
CPU: amd64
family 6 model 85 stepping 7
8 CPUs
Linux Ubuntu 22.04 - jammy (Ubuntu 22.04.4 LTS)
Crash reason: SIGSYS / SYS_SECCOMP
Crash address: 0x000000000000011e
Crashing instruction: `test rax, rax`
No memory accessed by instruction
No instruction pointer update by instruction
Process uptime: not available
Linux memory map count: 544
Thread 6 Socket Thread (crashed) - tid: 3337
0 libxul.so!core::ptr::const_ptr::<impl *const T>::is_null::runtime [const_ptr.rs : 55]
Found by: inlining
1 libxul.so!core::ptr::const_ptr::<impl *const T>::is_null [mod.rs : 3886]
Found by: inlining
2 libxul.so!core::ptr::mut_ptr::<impl *mut T>::is_null [mut_ptr.rs : 39]
Found by: inlining
3 libxul.so!rustix::backend::reg::RetReg<Num>::is_nonzero [reg.rs:4d5a7955c8229583959318985a0a9de0da7d5d02 : 183]
Found by: inlining
4 libxul.so!rustix::backend::io::errno::try_decode_void [errno.rs:4d5a7955c8229583959318985a0a9de0da7d5d02 : 214]
Found by: inlining
5 libxul.so!rustix::backend::conv::ret [conv.rs:4d5a7955c8229583959318985a0a9de0da7d5d02 : 876]
Found by: inlining
6 libxul.so!rustix::backend::time::syscalls::timerfd_settime [syscalls.rs:4d5a7955c8229583959318985a0a9de0da7d5d02 : 121]
Found by: inlining
7 libxul.so!rustix::time::timerfd::timerfd_settime [timerfd.rs:4d5a7955c8229583959318985a0a9de0da7d5d02 : 29]
Found by: inlining
8 libxul.so!polling::epoll::Poller::wait [epoll.rs:4d5a7955c8229583959318985a0a9de0da7d5d02 : 184]
Found by: inlining
9 libxul.so!polling::Poller::wait [lib.rs:4d5a7955c8229583959318985a0a9de0da7d5d02 : 747]
Found by: inlining
10 libxul.so!poll_wait [lib.rs:4d5a7955c8229583959318985a0a9de0da7d5d02 : 247 + 0x11e]
Any clues?
The log indicates that it may have been blocked by seccomp.
Crash reason: SIGSYS / SYS_SECCOMP
If your program does not use any timeout-related APIs, doing https://github.com/smol-rs/polling/issues/224 will probably eliminate this error without changing seccomp stuff.
I'm testing a fix to #224 now, and will send a PR if that works.
But even if that works, I have the remaining issue that I can't use a version of polling newer than 3.7.1, due to other dependencies in Gecko...