DynamoRIO / DynamoRIO/dynamorio
run an application with drrun the drrun will be terimated by an ASSERT dr_get_isa_mode
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
### Describe the bug
1. drrun -loglevel 3 information
when i run my application uds-stack with drrun , the drrun terimated by an ASSERT like the following:
the following is the output by DR with --loglevel 3
```
10468 Exit from F4436(0x76c8d320).0x475a551c (A32)(shared)
10469 (cannot link F4436->F5638) (cannot link shared to private)
10470
10471 d_r_dispatch: target = 0x76c8d390
10472 Entry into F5638(0x76c8d390).0x4763d058 (A32)
10473
10474 Exit from F5638(0x76c8d390).0x4763d070 (A32)
10475 (cannot link F5638->F4438) (cannot link shared to private)
10476
10477 d_r_dispatch: target = 0x76c8d3a0
10478 Entry into F4438(0x76c8d3a0).0x475a5554 (A32)(shared)
10479
10480 Exit from F4436(0x76c8d320).0x475a551c (A32)(shared)
10481 (cannot link F4436->F5638) (cannot link shared to private)
10482
10483 d_r_dispatch: target = 0x76c8d390
10484 Entry into F5638(0x76c8d390).0x4763d058 (A32)
10485
10486 Exit from F5638(0x76c8d390).0x4763d070 (A32)
10487 (cannot link F5638->F4438) (cannot link shared to private)
10488
10489 d_r_dispatch: target = 0x76c8d3a0
10490 Entry into F4438(0x76c8d3a0).0x475a5554 (A32)(shared)
10491
10492 Exit from F5656(0x76c78d4c).0x4760171c (A32)(shared)
10493 (block ends with syscall)
10494 Entry into do_syscall to execute a non-ignorable system call
10495 system call 335
10496
10497 master_signal_handler: thread=1992, sig=12, xsp=0x4763ac90, retaddr=0x0000000c
10498 siginfo: sig = 12, pid = 32176, status = 0, errno = 0, si_code = -6
10499 r0 =0xfffffffc
10500 r1 =0x76b57d1c
10501 r2 =0x76b57d9c
10502 r3 =0x00000000
10503 r4 =0x76b57cd8
10504 r5 =0x76b57ce0
10505 r6 =0x00000006
10506 r7 =0x0000014f
10507 r8 =0x76b57d1c
10508 r9 =0x76b57d1c
10509 r10 =0x4761b000
10510 r11 =0x0000003b
10511 r12 =0x00000000
10512 sp =0x76b57cd8
10513 r14 =0x76b58930
10514 pc =0x47492486
10515 cpsr=0x80010030
10516 handle_suspend_signal: suspended now
10517 @@@@@@@@@@@@@@@@@@ SUSPENDED BY THREAD 2156 synch_with_thread @@@@@@@@@@@@@@@@@@
10518 handle_suspend_signal: awake now
10519 master_signal_handler 12 returning now to 0x47492486
10520
10521 Exit from system call
10522 post syscall: sysnum=0x0000014f, result=0xfffffffc (-4)
10523 Unexpected failure of non-ignorable syscall 335
10524 finished handling system call
10525
10526 d_r_dispatch: target = 0x76c78d6c
10527 Entry into F5660(0x76c78d6c).0x47601824 (A32)(shared)10528
10529 add_process_lock: 0 lock 0x54de4604: name=report_buf_lock(mutex)@/work/dynamorio_fix_thumb/dynamorio/core/utils.c:1998
10530 rank=88 owner=1992 owning_dc=0x474b2f60 contended_event=0xffffffff prev=0x00000000
10531 lock count_times_acquired= 1 0 0 0 0+2 report_buf_lock(mutex)@/work/dynamorio_fix_thumb/dynamorio/core/utils.c:1998
10532 SYSLOG_ERROR: Application uds-stack (32176). **Internal Error: DynamoRIO debug check failure: /work/dynamorio_fix_thumb/dynamorio/core/dispatch.c:486 dr_get_isa_mode(dcontext) == FRAG_ISA_MODE(targetf->flags) IF_X64(|| (dr_get_isa_mode(dcontext) == DR_ISA_IA32 && !FRAG_IS_32(targetf->flags) && DYNAMO_OPTION(x86_to_x64)))**
10533 (Error occurred @7272 frags in tid 1992)
10534 version 8.0.18967, custom build
```
2. run drrun with gdb information
the following is the output i run drrun with gdb, use the arguments uds-stack.
```
Thread 6 "uds-stack" received signal SIGUSR2, User defined signal 2.
[Switching to LWP 7101]
0x6f003484 in ?? ()
(gdb) c
Continuing.
Thread 7 "uds-stack" received signal SIGUSR2, User defined signal 2.
[Switching to LWP 7145]
0x6f003484 in ?? ()
(gdb) c
Continuing.
Thread 1 "uds-stack" received signal SIGUSR2, User defined signal 2.
[Switching to LWP 4455]
syscall_0_or_1arg () at /work/dynamorio_fix_thumb/dynamorio/core/drlibc/drlibc_arm.asm:87
87 in /work/dynamorio_fix_thumb/dynamorio/core/drlibc/drlibc_arm.asm
(gdb) c
Continuing.
[Detaching after fork from child process 8525]
<-- parent 4455 forked child 8525 -->
flags) IF_X64(|| (dr_get_isa_mode(dcontext) == DR_ISA_IA32 && !FRAG_IS_32(targetf->flags) && DYNAMO_OPTION(x86_to_x64)))
(Error occurred @6081 frags in tid 7006)
version 8.0.18967, custom build
```
3. some other information
Here is a strange phenomenon, when i run uds-stack with gdb, it will not receive SIGUSR2 signal;but when i run drrun with gdb, set arguments uds-stack, it will receive SIGUSR2 signal.
4、cpu information
```
Architecture: armv7l
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 1
Core(s) per socket: 2
Socket(s): 1
Model name: ARMv7 Processor rev 10 (v7l)
CPU max MHz: 996.0000
CPU min MHz: 396.0000
```
5、dynamorio version
version 8.0.18967, custom build
Contributor guide
Assessment
This issue has not been assessed yet.