Bug#947159: hardinfo segfaults when running benchmarks

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Bug#947159: hardinfo segfaults when running benchmarks

Dr. Oliver Muth-2
Package: hardinfo
Version: 0.5.1+git20180227-2
Severity: important

Dear Maintainer,

running a benchmark in hardinfo leads to segmentation fault for all benchmarks except "CPU Zlib".
It seems like the benchmarks run at first but when the program returns to reporting the results it segfaults.

gdb reports:
Program received signal SIGSEGV, Segmentation fault.
__strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:120
120 ../sysdeps/x86_64/multiarch/../strlen.S: No such file or directory

Full gdb output is attached.

-- System Information:
Debian Release: 10.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.3.0-0.bpo.2-amd64 (SMP w/3 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE:de (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages hardinfo depends on:
ii  libatk1.0-0          2.30.0-2
ii  libc6                2.28-10
ii  libcairo2            1.16.0-4
ii  libfontconfig1       2.13.1-2
ii  libfreetype6         2.9.1-3+deb10u1
ii  libgdk-pixbuf2.0-0   2.38.1+dfsg-1
ii  libglib2.0-0         2.58.3-2+deb10u2
ii  libgtk2.0-0          2.24.32-3
ii  libpango-1.0-0       1.42.4-7~deb10u1
ii  libpangocairo-1.0-0  1.42.4-7~deb10u1
ii  libpangoft2-1.0-0    1.42.4-7~deb10u1
ii  pciutils             1:3.5.2-1
ii  zlib1g               1:1.2.11.dfsg-1
ii  zlib1g-dev           1:1.2.11.dfsg-1

Versions of packages hardinfo recommends:
ii  lm-sensors  1:3.5.0-3

Versions of packages hardinfo suggests:
ii  mesa-utils  8.4.0-1+b1

-- no debconf information

hardinfo-segfault.txt (6K) Download Attachment
Reply | Threaded
Open this post in threaded view

Bug#947159: hardinfo segfaults when running benchmarks

Bernhard Übelacker-3
Dear Maintainer,
the given backtrace should look like below with debug symbols installed.

For some reason it looks like the strchr at line 281 returns a null pointer.

Kind regards,

(gdb) bt no-filter
#0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:120
#1  0x00007ffff6fc4dae in __GI___strdup (s=0x1 <error: Cannot access memory at address 0x1>) at strdup.c:41
#2  0x00007ffff471f5b4 in bench_result_benchmarkconf (section, key, values) at ./modules/benchmark/bench_results.c:281
#3  0x00007ffff471fa4d in __benchmark_include_results (r, benchmark, order_type) at ./modules/benchmark.c:373
#4  0x00007ffff471fd8a in benchmark_include_results (benchmark, result) at ./modules/benchmark.c:408
#5  callback_bfsh () at ./modules/benchmark/benches.c:33
(gdb) display/i $pc
1: x/i $pc
=> 0x7ffff6fd5206 <__strlen_sse2+38>:   movdqu (%rax),%xmm4

(gdb) list bench_results.c:281
276                 b->legacy = 1;
278                 /* old old format has prefix before cpu name (ex: 4x Pentium...) */
279                 nx = nx_prefix(key);
280                 if (nx > 0) {
281                     b->machine->cpu_name = strdup(strchr(key, 'x') + 1);
282                     b->machine->threads = nx;
283                 } else {
284                     b->machine->cpu_name = strdup(key);
285                     b->machine->threads = 1;