[ 0:00] | load /home/xrockai/src/divine/nightly/test/demo/deadlock.c deadlock.c [ 0:00] | load /home/xrockai/src/divine/nightly/test/demo/demo.h demo.h [ 0:00] | expect --result error --symbol pthread_mutex_lock [ 0:00] | cc -o testcase.bc deadlock.c [ 0:00] | verify --max-memory 4GiB --max-time 600 --threads 2 --report-filename verify.out --leakcheck exit testcase.bc [ 0:00] compiling deadlock.c [ 0:00] loading bitcode … DiOS … LART … RR … constants … done [ 0:03] booting … done [ 0:03] states per second: 73.3379 [ 0:06] state count: 214 [ 0:06] mips: 0.29 [ 0:06] [ 0:07] error found: yes [ 0:07] error trace: | [ 0:07] [0] 0: locking mutex 1 [ 0:07] [1] 1: locking mutex 2 [ 0:07] [1] 1: locking mutex 1 [ 0:07] [0] 0: locking mutex 2 [ 0:07] FAULT: deadlock: circular wait on a mutex [ 0:07] [1] FATAL: locking error in userspace [ 0:07] [ 0:07] active stack: [ 0:07] - symbol: void __dios::FaultBase::handler<__dios::Context>(_VM_Fault, _VM_Frame*, void (*)()) [ 0:08] location: /dios/sys/fault.hpp:118 [ 0:08] - symbol: __dios_fault [ 0:08] location: /dios/arch/divm/fault.c:12 [ 0:08] - symbol: __dios::_mutex_lock(__dios::_InterruptMask&, pthread_mutex_t*, bool) [ 0:08] location: /dios/libc/pthread/pthread-mutex.cpp:51 [ 0:08] - symbol: pthread_mutex_lock [ 0:08] location: /dios/libc/pthread/pthread-mutex.cpp:173 [ 0:08] - symbol: thr1 [ 0:08] location: deadlock.c:15 [ 0:08] - symbol: __pthread_start [ 0:08] location: /dios/libc/pthread/pthread-init.cpp:79 [ 0:08] - symbol: __pthread_entry [ 0:08] location: /dios/libc/pthread/pthread-core.cpp:50 [ 0:08] + divine sim --batch --skip-init --load-report verify.out [ 0:08] [ 0:11] ^ —————. —.— . . —.— . . .————— . . [ 0:11] ——— | | | | | | |\ | | | | [ 0:11] —(o)— | | | | | | | \ | |———— '————| [ 0:11] ——————— | | | \ / | | \| | | [ 0:11] ————————— —————' —'— ' —'— ' ' '————— ' [ 0:11] [ 0:11] Welcome to 'divine sim', an interactive debugger. Type 'help' to get started. [ 0:11] traced states: [ 0:11] trace: [ 0:11] T: [0] 0: locking mutex 1 [ 0:11] T: [1] 1: locking mutex 2 [ 0:11] T: [1] 1: locking mutex 1 [ 0:11] T: [0] 0: locking mutex 2 [ 0:11] ▶ state #15 [new] -- active threads: 0:0 [0:1] -- [ 0:11] T: FAULT: deadlock: circular wait on a mutex [ 0:11] # executing void __dios::FaultBase::handler<{Context}>(_VM_Fault, _VM_Frame*, void (*)()) at /dios/sys/fault.hpp:118 [ 0:11] # NOTE: $frame in __dios_fault [ 0:11] > backtrace [ 0:11] void __dios::FaultBase::handler<{Context}>(_VM_Fault, _VM_Frame*, void (*)()) at /dios/sys/fault.hpp:118 [ 0:11] __dios_fault at /dios/arch/divm/fault.c:12 [ 0:11] __dios::_mutex_lock(__dios::_InterruptMask&, pthread_mutex_t*, bool) at /dios/libc/pthread/pthread-mutex.cpp:51 [ 0:11] pthread_mutex_lock at /dios/libc/pthread/pthread-mutex.cpp:173 [ 0:11] thr1 at deadlock.c:15 [ 0:11] __pthread_start at /dios/libc/pthread/pthread-init.cpp:79 [ 0:11] __pthread_entry at /dios/libc/pthread/pthread-core.cpp:50 [ 0:11] # executing void __dios::FaultBase::handler<{Context}>(_VM_Fault, _VM_Frame*, void (*)()) at /dios/sys/fault.hpp:118 [ 0:11] # NOTE: $frame in __dios_fault