beehive-lab/mambo

SIGSEGV on up-to-date Arch Linux Arm systems on thread exit

lgeek opened this issue · 2 comments

lgeek commented
$ ./dbm ./test/signals
Simple signal handler: success
Signal after flushing the code cache: success
Test sigsuspend: success
Test against race conditions between code generation and signals: success
Test for missed signals: Segmentation fault (core dumped)
Thread 2 "dbm" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fb555b080 (LWP 7276)]
0x00000000a801249c in uw_frame_state_for ()
(gdb) info thread
  Id   Target Id         Frame 
  1    Thread 0xa80b1000 (LWP 7509) "dbm" signal_trampoline () at util.S:139
* 2    Thread 0x7fb555b080 (LWP 7522) "dbm" (Exiting) 0x00000000a80156f4 in uw_frame_state_for ()
(gdb) back
#0  0x00000000a80156f4 in uw_frame_state_for ()
#1  0x00000000a8016798 in _Unwind_ForcedUnwind_Phase2 ()
#2  0x00000000a8016e40 in _Unwind_ForcedUnwind ()
#3  0x00000000a8013110 in __pthread_unwind ()
#4  0x00000000a80111cc in pthread_exit ()
#5  0x00000000a8004e30 in syscall_handler_pre (syscall_no=93, args=0x7fb5280920, 
    next_inst=0x7fb5500e3c, thread_data=0x7fb31ad000) at syscalls.c:242
#6  0x0000007fb21ad1e8 in ?? ()
#7  0xf9401ba454ffffa1 in ?? ()
lgeek commented

This turns out to be a more general bug affecting thread exits in all applications when MAMBO is linked against glibc 2.27 or 2.28 from ALARM. It seems to occur during the stack unwinding done by pthread_exit() in the MAMBO context.

lgeek commented

AArch32 is also affected.