Comment 5 for bug 1871543

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Breakpoint 2, start_canary () at rtkit-daemon.c:2300
2300 if (start_canary() < 0)
(gdb) n
1670 if ((canary_fd = eventfd(0, EFD_NONBLOCK|EFD_CLOEXEC)) < 0 ||
(gdb)
1677 if ((r = -pthread_create(&canary_thread_id, NULL, canary_thread, NULL)) < 0 ||
(gdb)

Breakpoint 1, __pthread_create_2_1 (newthread=0x555555565178 <canary_thread_id>, attr=0x0, start_routine=0x55555555abd0 <canary_thread>, arg=0x0) at pthread_create.c:625
625 pthread_create.c: No such file or directory.
(gdb) fin
Run till exit from #0 __pthread_create_2_1 (newthread=0x555555565178 <canary_thread_id>, attr=0x0, start_routine=0x55555555abd0 <canary_thread>, arg=0x0) at pthread_create.c:625
[New Thread 0x7ffff7aa3700 (LWP 1795548)]
rtkit-daemon[1795542]: Canary thread running.
0x00005555555584bf in start_canary () at rtkit-daemon.c:1677
1677 if ((r = -pthread_create(&canary_thread_id, NULL, canary_thread, NULL)) < 0 ||
Value returned is $1 = 0
(gdb) n

Thread 1 "rtkit-daemon" hit Breakpoint 1, __pthread_create_2_1 (newthread=0x555555565170 <watchdog_thread_id>, attr=0x0, start_routine=0x55555555a800 <watchdog_thread>, arg=0x0)
    at pthread_create.c:625
625 pthread_create.c: No such file or directory.
(gdb) fin
Run till exit from #0 __pthread_create_2_1 (newthread=0x555555565170 <watchdog_thread_id>, attr=0x0, start_routine=0x55555555a800 <watchdog_thread>, arg=0x0) at pthread_create.c:625
0x00005555555584de in start_canary () at rtkit-daemon.c:1677
1677 if ((r = -pthread_create(&canary_thread_id, NULL, canary_thread, NULL)) < 0 ||
Value returned is $2 = 11

It doesn't even reach watchdog_thread() it fails to create the thread before that.