Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[legacy, 32-bit arms] make check stacktrace_unittest fails #1512

Closed
michieldhonteriks opened this issue May 6, 2024 · 1 comment
Closed

Comments

@michieldhonteriks
Copy link

michieldhonteriks commented May 6, 2024

when running make check after compiling the package it fails on stacktrace_unittest.
so far the only information i found about this issue was this:
#211
i tried the steps outlined there but this did not solve the issue.
the steps i took to produce the issue:
all commands were used as sudo and the working directory was /usr/gpreftools
the OS is raspbian 12 which is based on debian bookworm and is run on a raspberry pi 3 B

install autoconf automake and libtool
run ./autogen.sh
run ./configure
run make
shutdown my system since it was late
run make check
noticed the failed unittest here
run make clean
run make
run make check
find the same error
run ./configure CXXFLAGS=-g
run make clean
run make
run ./stacktrace_unittest

this gave me the following error log:

Supported stacktrace methods:
* libgcc
* generic_fp
* generic_fp_unsafe
* arm
* null


Testing stacktrace implementation: libgcc
Obtained 11 stack frames.
./stacktrace_unittest(CaptureLeafPlain+0x88) [0x125b0] 0x125b0
./stacktrace_unittest(CheckStackTraceLeaf+0x148) [0x12b04] 0x12b04
./stacktrace_unittest(CheckStackTrace4+0x124) [0x12ed8] 0x12ed8
./stacktrace_unittest(CheckStackTrace3+0x124) [0x13054] 0x13054
./stacktrace_unittest(CheckStackTrace2+0x124) [0x131d0] 0x131d0
./stacktrace_unittest(CheckStackTrace1+0x124) [0x1334c] 0x1334c
./stacktrace_unittest(CheckStackTrace+0x88) [0x1342c] 0x1342c
./stacktrace_unittest(_Z7RunTestv+0x10) [0x13488] 0x13488
./stacktrace_unittest(main+0xbc) [0x135f0] 0x135f0
/lib/arm-linux-gnueabihf/libc.so.6(+0x1e3c0) [0x76bb53c0] 0x76bb53c0
/lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x98) [0x76bb54c8] 0x76bb54c8
CheckStackTrace() addr: 0x133a4
Backtrace 0: expected: 0x125a0..0x12648  actual: 0x125b0 ... OK
Backtrace 1: expected: 0x12ec4..0x12ef0  actual: 0x12ed8 ... OK
Backtrace 2: expected: 0x13040..0x1306c  actual: 0x13054 ... OK
Backtrace 3: expected: 0x131bc..0x131e8  actual: 0x131d0 ... OK
Backtrace 4: expected: 0x13338..0x13364  actual: 0x1334c ... OK
Backtrace 5: expected: 0x13418..0x13444  actual: 0x1342c ... OK
PASS
Will test capturing stack trace with nullptr ucontext
Obtained 11 stack frames.
./stacktrace_unittest(CaptureLeafPlainEmptyUCP+0x8c) [0x12720] 0x12720
./stacktrace_unittest(CheckStackTraceLeaf+0x148) [0x12b04] 0x12b04
./stacktrace_unittest(CheckStackTrace4+0x124) [0x12ed8] 0x12ed8
./stacktrace_unittest(CheckStackTrace3+0x124) [0x13054] 0x13054
./stacktrace_unittest(CheckStackTrace2+0x124) [0x131d0] 0x131d0
./stacktrace_unittest(CheckStackTrace1+0x124) [0x1334c] 0x1334c
./stacktrace_unittest(CheckStackTrace+0x88) [0x1342c] 0x1342c
./stacktrace_unittest(_Z7RunTestv+0x34) [0x134ac] 0x134ac
./stacktrace_unittest(main+0xbc) [0x135f0] 0x135f0
/lib/arm-linux-gnueabihf/libc.so.6(+0x1e3c0) [0x76bb53c0] 0x76bb53c0
/lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x98) [0x76bb54c8] 0x76bb54c8
CheckStackTrace() addr: 0x133a4
Backtrace 0: expected: 0x1270c..0x127b8  actual: 0x12720 ... OK
Backtrace 1: expected: 0x12ec4..0x12ef0  actual: 0x12ed8 ... OK
Backtrace 2: expected: 0x13040..0x1306c  actual: 0x13054 ... OK
Backtrace 3: expected: 0x131bc..0x131e8  actual: 0x131d0 ... OK
Backtrace 4: expected: 0x13338..0x13364  actual: 0x1334c ... OK
Backtrace 5: expected: 0x13418..0x13444  actual: 0x1342c ... OK
PASS
Will test capturing stack trace with skipped frames
Obtained 11 stack frames.
./stacktrace_unittest(CaptureLeafWSkip+0x8c) [0x128d8] 0x128d8
./stacktrace_unittest(CheckStackTraceLeaf+0x148) [0x12b04] 0x12b04
./stacktrace_unittest(CheckStackTrace4+0x124) [0x12ed8] 0x12ed8
./stacktrace_unittest(CheckStackTrace3+0x124) [0x13054] 0x13054
./stacktrace_unittest(CheckStackTrace2+0x124) [0x131d0] 0x131d0
./stacktrace_unittest(CheckStackTrace1+0x124) [0x1334c] 0x1334c
./stacktrace_unittest(CheckStackTrace+0x88) [0x1342c] 0x1342c
./stacktrace_unittest(_Z7RunTestv+0x58) [0x134d0] 0x134d0
./stacktrace_unittest(main+0xbc) [0x135f0] 0x135f0
/lib/arm-linux-gnueabihf/libc.so.6(+0x1e3c0) [0x76bb53c0] 0x76bb53c0
/lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x98) [0x76bb54c8] 0x76bb54c8
CheckStackTrace() addr: 0x133a4
Backtrace 0: expected: 0x128c4..0x12970  actual: 0x128d8 ... OK
Backtrace 1: expected: 0x12ec4..0x12ef0  actual: 0x12ed8 ... OK
Backtrace 2: expected: 0x13040..0x1306c  actual: 0x13054 ... OK
Backtrace 3: expected: 0x131bc..0x131e8  actual: 0x131d0 ... OK
Backtrace 4: expected: 0x13338..0x13364  actual: 0x1334c ... OK
Backtrace 5: expected: 0x13418..0x13444  actual: 0x1342c ... OK
PASS
Capturing stack trace from signal's ucontext
Obtained 11 stack frames.
./stacktrace_unittest(CaptureLeafUContext+0x19c) [0x123f4] 0x123f4
./stacktrace_unittest(CheckStackTraceLeaf+0x148) [0x12b04] 0x12b04
./stacktrace_unittest(CheckStackTrace4+0x124) [0x12ed8] 0x12ed8
./stacktrace_unittest(CheckStackTrace3+0x124) [0x13054] 0x13054
./stacktrace_unittest(CheckStackTrace2+0x124) [0x131d0] 0x131d0
./stacktrace_unittest(CheckStackTrace1+0x124) [0x1334c] 0x1334c
./stacktrace_unittest(CheckStackTrace+0x88) [0x1342c] 0x1342c
./stacktrace_unittest(_Z7RunTestv+0x8c) [0x13504] 0x13504
./stacktrace_unittest(main+0xbc) [0x135f0] 0x135f0
/lib/arm-linux-gnueabihf/libc.so.6(+0x1e3c0) [0x76bb53c0] 0x76bb53c0
/lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x98) [0x76bb54c8] 0x76bb54c8
CheckStackTrace() addr: 0x133a4
Backtrace 0: expected: 0x122d0..0x124cc  actual: 0x123f4 ... OK
Backtrace 1: expected: 0x12ec4..0x12ef0  actual: 0x12ed8 ... OK
Backtrace 2: expected: 0x13040..0x1306c  actual: 0x13054 ... OK
Backtrace 3: expected: 0x131bc..0x131e8  actual: 0x131d0 ... OK
Backtrace 4: expected: 0x13338..0x13364  actual: 0x1334c ... OK
Backtrace 5: expected: 0x13418..0x13444  actual: 0x1342c ... OK
PASS

Set max capture length to 3:
Capturing stack trace from signal's ucontext
Obtained 3 stack frames.
./stacktrace_unittest(CaptureLeafUContext+0x198) [0x123f0] 0x123f0
./stacktrace_unittest(CheckStackTraceLeaf+0x148) [0x12b04] 0x12b04
./stacktrace_unittest(CheckStackTrace4+0x124) [0x12ed8] 0x12ed8
CheckStackTrace() addr: 0x133a4
Backtrace 0: expected: 0x122d0..0x124cc  actual: 0x123f0 ... OK
Backtrace 1: expected: 0x12ec4..0x12ef0  actual: 0x12ed8 ... OK
PASS
Will test capturing stack trace with nullptr ucontext
Obtained 3 stack frames.
./stacktrace_unittest(CaptureLeafPlainEmptyUCP+0x8c) [0x12720] 0x12720
./stacktrace_unittest(CheckStackTraceLeaf+0x148) [0x12b04] 0x12b04
./stacktrace_unittest(CheckStackTrace4+0x124) [0x12ed8] 0x12ed8
CheckStackTrace() addr: 0x133a4
Backtrace 0: expected: 0x1270c..0x127b8  actual: 0x12720 ... OK
Backtrace 1: expected: 0x12ec4..0x12ef0  actual: 0x12ed8 ... OK
PASS
Will test capturing stack trace with skipped frames
Obtained 3 stack frames.
./stacktrace_unittest(CaptureLeafWSkip+0x8c) [0x128d8] 0x128d8
./stacktrace_unittest(CheckStackTraceLeaf+0x148) [0x12b04] 0x12b04
./stacktrace_unittest(CheckStackTrace4+0x124) [0x12ed8] 0x12ed8
CheckStackTrace() addr: 0x133a4
Backtrace 0: expected: 0x128c4..0x12970  actual: 0x128d8 ... OK
Backtrace 1: expected: 0x12ec4..0x12ef0  actual: 0x12ed8 ... OK
PASS
Capturing stack trace from signal's ucontext
Obtained 3 stack frames.
./stacktrace_unittest(CaptureLeafUContext+0x18c) [0x123e4] 0x123e4
./stacktrace_unittest(CheckStackTraceLeaf+0x148) [0x12b04] 0x12b04
./stacktrace_unittest(CheckStackTrace4+0x124) [0x12ed8] 0x12ed8
CheckStackTrace() addr: 0x133a4
Backtrace 0: expected: 0x122d0..0x124cc  actual: 0x123e4 ... OK
Backtrace 1: expected: 0x12ec4..0x12ef0  actual: 0x12ed8 ... OK
PASS
Testing stacktrace implementation: generic_fp
Capturing stack trace from signal's ucontext
Obtained 2 stack frames.
./stacktrace_unittest(CaptureLeafUContext+0x18c) [0x123e4] 0x123e4
./stacktrace_unittest(CheckStackTrace4+0x124) [0x12ed8] 0x12ed8
CheckStackTrace() addr: 0x133a4
Backtrace 0: expected: 0x122d0..0x124cc  actual: 0x123e4 ... OK
PASS
Will test capturing stack trace with nullptr ucontext
Obtained -1 stack frames.
src/tests/stacktrace_unittest.cc:234 Check failed: size >= 1
Aborted
@alk
Copy link
Contributor

alk commented May 6, 2024

Thanks for filing the ticket. Indeed 32-bit arm doesn't have working generic_fp backtracer. I'll get unit test fixed. Meanwhile you're free to ignore this failure.

@alk alk changed the title make check stacktrace_unittest fails [legacy, 32-bit arms] make check stacktrace_unittest fails May 22, 2024
@alk alk closed this as completed in 825b663 Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants