namhyung / uftrace

Function graph tracer for C/C++/Rust/Python
https://uftrace.github.io/slide/
GNU General Public License v2.0
3.01k stars 441 forks source link

test failures in x86_64 #1030

Open honggyukim opened 4 years ago

honggyukim commented 4 years ago

Here are the tests, which are failed in x86_64. It's tested on Ubuntu 16.04 machine.

$ ./runtest.py -j4
Start 234 tests with 4 worker
Test case                 pg             finstrument-fu
------------------------: O0 O1 O2 O3 Os O0 O1 O2 O3 Os
052 nested_func         : OK OK OK OK OK NG NG NG NG NG
062 arg_char            : NG NG NG NG NG SK SK SK SK SK    # Fixed
117 time_range          : OK NG OK OK OK OK OK OK NG OK
125 report_range        : OK NG OK OK OK OK OK OK NG OK
135 trigger_time2       : OK OK OK OK OK OK NG NG OK OK
151 recv_runcmd         : NG NG NG NG NG NG NG NG NG NG
182 thread_exit         : SG OK OK OK OK SG OK OK OK OK
184 arg_enum            : NG NG NG NG NG NG NG NG NG NG
203 arg_dwarf3          : OK OK NG NG NG SK SK SK SK SK
222 external_data       : OK NG OK OK OK NG OK OK OK OK
228 read_pmu_cycle3     : NG OK NG NG NG OK OK OK OK OK
honggyukim commented 4 years ago

For 182 thread_exit, it can be reproduced as follows:

$ gcc -pg -o t-thread-exit s-thread-exit.c -pthread

$ uftrace record t-thread-exit 
1.000000
WARN: process crashed by signal 11: Segmentation fault (si_code: 128)
WARN: Backtrace from uftrace:
WARN: =====================================
WARN: [0] (thread_main[400843] <= start_thread[7f9d8ab7b6ba])
WARN: child terminated by signal: 11: Segmentation fault

It's related to #826.

honggyukim commented 4 years ago

It's kind of duplicated to #825, but leave it because some test failures are not shown there.

honggyukim commented 4 years ago

I tested x86_64 again on the current master 4e06f06.

$ uftrace --version
uftrace v0.9.3-201-g4e06 ( dwarf python luajit tui perf sched dynamic )

Here are the failed tests.

052 nested_func         : OK OK OK OK OK NG NG NG NG NG
125 report_range        : OK OK OK NG OK OK OK OK OK OK
136 dynamic             : BI BI BI BI BI BI BI BI BI BI
151 recv_runcmd         : NG NG NG NG OK NG NG NG NG NG
157 script_python       : NZ NZ NZ NZ NZ NZ NZ NZ NZ NZ
162 pltbind_now_pie     : BI BI BI BI BI BI BI BI BI BI
169 script_args         : NZ NZ NZ NZ NZ NZ NZ NZ NZ NZ
170 script_filter       : NZ NZ NZ NZ NZ NZ NZ NZ NZ NZ
171 script_option       : NG NG NG NG NG NG NG NG NG NG
182 thread_exit         : SG NG NG NG OK SG NG OK OK OK
184 arg_enum            : NG NG NG NG NG NG NG NG NG NG
namhyung commented 4 years ago

Are they new in v0.9.4? But I won't care about the random failures though..

honggyukim commented 4 years ago

Ah.. script related tests are due to my environment problem not finding proper libpython3.x.so library.

Regarding 162 pltbind_now_pie is due to the following build error.

$ ./runtest.py 162 -vdp -O0
Start 1 tests with 1 worker
Test case                 pg
------------------------: O0
build command: gcc -o t-openclose -fno-inline -fno-builtin -fno-ipa-cp -fno-omit-frame-pointer -D_FORTIFY_SOURCE=0  -pg -O0 -fpie  s-openclose.c   -Wl,-pie,-z,now,-z,relro
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o: relocation R_X86_64_32 against `__TMC_END__' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

162 pltbind_now_pie     : BI

Simply testing it again.

$ gcc -o t-openclose -fno-inline -fno-builtin -fno-ipa-cp -fno-omit-frame-pointer -D_FORTIFY_SOURCE=0  -pg -O0 -fpie  s-openclose.c   -Wl,-pie,-z,now,-z,relro
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o: relocation R_X86_64_32 against `__TMC_END__' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

It works fine if I change -Wl,-pie,-z,now,-z,relro to -Wl,-z,now,-z,relro removing -pie.

honggyukim commented 4 years ago

Hmm.. 162 test is actually for -pie so it's pointless removing -pie flag.

namhyung commented 4 years ago

It seems there's nothing new, removing from v0.9.4 release...