DynamoRIO / DynamoRIO/dynamorio

HANG Chromium base_unittests ProcessUtilTest

Open
#1,631 1 comment 0 reactions 1 assignee Claimed by @zhaoqin View on GitHub
Bug-Hang OpSys-ARM OpSys-Linux
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

The Chromium base_unittests ProcessUtilTest.\* tests seem to cause problems for DR.

On x86 Linux, ProcessUtilTest.InvalidCurrentDirectory seems to spin at 100% CPU.

On ARM Linux, ProcessTest.WaitForExitWithTimeout seems to leave a hung process behind. Quick analysis did not produce much info:

```
[ RUN ] ProcessTest.WaitForExitWithTimeout
<-- parent 21522 forked child 21726 -->

0x00000000
>

[ OK ] ProcessTest.WaitForExitWithTimeout (126 ms)

(gdb) bt
#0 safe_read_asm () at /home/derek/dr/git/src/core/arch/arm/arm.asm:366
#1 0x2a2291f8 in cat_have_lock () at /home/derek/dr/git/src/core/arch/arm/arm.asm:299
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) info prog
Using the running image of attached Thread 0xb6cab220 (LWP 21726).
Program stopped at 0x2a22925c.
(gdb) x/4i $pc
=> 0x2a22925c : cmp r2, #0
0x2a229260 : beq 0x2a22927c
0x2a229264 : ldrb r3, [r1]
0x2a229268 : strb r3, [r0]
(gdb) info reg
r0 0xffffffff 4294967295
r1 0xf 15
r2 0x0 0
r3 0x0 0
r4 0x4ad97000 1255763968
r5 0x2a229258 706908760
r6 0x25 37
r7 0x25 37
r8 0xf 15
r9 0xbeae8910 3199109392
r10 0x4ad81000 1255673856
r11 0x2a0e4da1 705580449
r12 0x2a28d574 707319156
sp 0x4ad67000 0x4ad67000
lr 0x2a2291f8 706908664
pc 0x2a22925c 0x2a22925c
cpsr 0x600f0010 1611595792

bps => no syms nearby on stack
safe_read_fast should be caller -- but args are all weird for safe_read_asm.
```

The run kept going to ProcessUtilTest.FDRemapping which then waited, maybe for the earlier hung subtest child?

***\* TODO Earlier subtests that pass try to close our files, and have SIGSEGV:

May be expected (shells often just brute-force close all fd's):

```
[ RUN ] ProcessUtilTest.GetTerminationStatusCrash
<-- parent 21522 forked child 21819 -->

<-- execve /home/derek/chromium/Release/base_unittests -->

>

[ OK ] ProcessUtilTest.GetTerminationStatusCrash (10941 ms)
```

***\* TODO On x86 some of these tests take a looong time:

```
< ... >
<-- parent 32373 forked child 675 -->
<-- parent 32373 forked child 676 -->
[ OK ] ProcessUtilTest.GetAppOutputRestrictedNoZombies (496542 ms)
```

natively:

```
[==========] 144 tests from 19 test cases ran. (6047 ms total)
[ PASSED ] 144 tests.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.