On Tue, May 28, 2024 at 10:52:41PM +0200, Ingo Saitz wrote: > I hit the same error on devuan unstable, with startpar crashing on boot: > > [ 10.025881] dracut: Switching root > [ 10.339687] startpar[720]: segfault at 0 ip 0000000000000000 sp 00007fffbdca9c38 error 14 likely on CPU 1 (core 0, socket 0) > [ 10.340225] Code: Unable to access opcode bytes at 0xffffffffffffffd6. > [ 10.349516] startpar[820]: segfault at 0 ip 0000000000000000 sp 00007ffd52c34e48 error 14 likely on CPU 3 (core 1, socket 0) > [ 10.350086] Code: Unable to access opcode bytes at 0xffffffffffffffd6. I can reproduce the error with the attached c program. [ 1325.980596] thoughts[2127]: segfault at 0 ip 0000000000000000 sp 00007fff183d66e8 error 14 likely on CPU 0 (core 0, socket 0) [ 1325.981180] Code: Unable to access opcode bytes at 0xffffffffffffffd6. Simply calling mlockall(MCL_CURRENT) and then fork() seems to be enough to trigger the error. Ingo -- const_cast<long double>(Λ)
#define _GNU_SOURCE #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <sys/mman.h> #include <sys/select.h> #include <unistd.h> int main() { mlockall(MCL_CURRENT); pid_t pid = fork(); if (pid == 0) { _exit(0); } const struct timespec zero = {2, 0}; sigset_t smask; sigemptyset(&smask); pselect(0, 0, 0, 0, &zero, &smask); printf("Success on pid %d\n", pid); }