fortas.org
Reading symbols from ./a.out...done. [New LWP 10789] [New LWP 10790] [New LWP 10788] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `./a.out'. Program terminated with signal SIGILL, Illegal instruction. #0 ego () at main.cpp:66 66 __builtin_trap(); [Current thread is 1 (Thread 0x7febc788c700 (LWP 10789))] (gdb) list 61 void* ego(void*) { 62 auto id = getpwnam("sfortas"); 63 auto state = life_state{}; 64 while(1) { 65 if(not handle_life_events(id, state)) 66 __builtin_trap(); 67 } 68 return nullptr; 69 } 70 (gdb) print *id $1 = {pw_name = 0x7febc0000b20 "sfortas", pw_passwd = 0x7febc0000b28 "x", pw_uid = 1000, pw_gid = 1000, pw_gecos = 0x7febc0000b34 "sebastien,/u/drbigtime,", pw_dir = 0x7febc0000b41 "/home/sfortas", pw_shell = 0x7febc0000b4f "/bin/zsh"} (gdb) print state $2 = {marriages = 1, children = 1, years = 40, locale = 0x400a39 "America/New_York"} (gdb) info threads Id Target Id Frame * 1 Thread 0x7febc788c700 (LWP 10789) ego () at main.cpp:66 2 Thread 0x7febc708b700 (LWP 10790) 0x00007febc7990e57 in sched_yield () at ../sysdeps/unix/syscall-template.S:78 3 Thread 0x7febc8bd4740 (LWP 10788) 0x00007febc7c86d2d in __GI___pthread_timedjoin_ex (threadid=140650490668800, thread_return=0x7ffc97658a00, abstime=0x0, block=<optimized out>) at pthread_join_common.c:89 (gdb) thread 3 [Switching to thread 3 (Thread 0x7febc708b700 (LWP 10790))] #0 0x00007febc7990e57 in sched_yield () at ../sysdeps/unix/syscall-template.S:78 78 ../sysdeps/unix/syscall-template.S: No such file or directory. (gdb) where #0 0x00007febc7990e57 in sched_yield () at ../sysdeps/unix/syscall-template.S:78 #1 0x000000000040076c in work () at main.cpp:37 #2 0x00007febc7c856db in start_thread (arg=0x7febc708b700) at pthread_create.c:463 #3 0x00007febc79ae88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 (gdb) up #1 0x000000000040076c in work () at main.cpp:37 37 sched_yield(); (gdb) list 32 void* work(void*) { 33 constexpr char const* stuff[] = { 34 "https://github.com/doctorbigtime", 35 }; 36 while(1) { 37 sched_yield(); 38 wait_condition(&time_available_condition, &mtx); 39 for(auto i = 0u; i < sizeof(stuff)/sizeof(*stuff); ++i) { 40 work_on(stuff[i]); 41 } (gdb) quit