See attached test program. See correct behaviour when run on ppc32 kernel. See timer_create() returning -EAGAIN when run on ppc64 kernel. pmac /home/dwmw2 $ ./sigev_thread Creating timer Create timer: Resource temporarily unavailable pmac /home/dwmw2 $ ssh shinybook ./sigev_thread Creating timer
Created attachment 137969 [details] Test code.
This is what happens on ppc32 kernel (ignore the last few lines; that's just strace being buggered and needing to be killed; bug 209873): write(1, "Creating timer\n", 15Creating timer ) = 15 rt_sigprocmask(SIG_SETMASK, ~[RT_1], [], 8) = 0 mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30002000 brk(0) = 0x10011000 brk(0x10032000) = 0x10032000 mprotect(0x30002000, 4096, PROT_NONE) = 0 clone(Process 18046 attached child_stack=0x30005040, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x30005508, tls=0x3000c940, child_tidptr=0x30005508) = 18046 [pid 18045] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 [pid 18045] futex(0xf03017c, FUTEX_WAKE, 2147483647) = 0 [pid 18045] timer_create(CLOCK_REALTIME, {0x10011098, 32, SIGEV_THREAD_ID, {18046}}, {0x1}) = 0 [pid 18045] exit_group(1) = ? [pid 18046] --- SIGSTOP (Stopped (signal)) @ 0 (0) --- [pid 18046] SYS_300(0x30005510, 0xc, 0x30005508, 0x3000c940, 0x30005508) = 0 [pid 18046] rt_sigtimedwait([RTMIN], Killed
And this is what happens on ppc64... write(1, "Creating timer\n", 15Creating timer ) = 15 rt_sigprocmask(SIG_SETMASK, ~[RT_1], [], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 futex(0xefb017c, FUTEX_WAKE, 2147483647) = 0 dup(2) = 3 fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR) brk(0) = 0x10020000 brk(0x10050000) = 0x10050000 fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 20), ...}) = 0 mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7fd0000 _llseek(3, 0, 0xff1aee38, SEEK_CUR) = -1 ESPIPE (Illegal seek) write(3, "Create timer: Resource temporari"..., 47Create timer: Resource temporarily unavailable ) = 47 close(3) = 0 munmap(0xf7fd0000, 65536) = 0 exit_group(1) = ? Process 7277 detached
We fail to create the helper thread. This is because we try to create it with a stack size of PTHREAD_STACK_MIN, which seems to be 16384. That's not going to work on a machine with 64KiB pages.
Please try glibc-2.5-3. It isn't 100% POSIX conforming on ppc{,64}, because it doesn't reject pthread_attr_setstack{,size} with sizes between 16K and 128K (new PTHREAD_STACK_MIN), but that is only solvable with symbol versioning and therefore only in glibc 2.6 which we can't ship in FC6.
glibc-2.5-3 fixes the test case.