Summary: | [gdb/guile] Fails in gdb.gdb/{python-helper,selftest}.exp when building with guile (sigsegv in libgc1) | ||
---|---|---|---|
Product: | gdb | Reporter: | Tom de Vries <vries> |
Component: | testsuite | Assignee: | Tom Tromey <tromey> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | tromey |
Priority: | P2 | ||
Version: | HEAD | ||
Target Milestone: | 14.1 | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Tom de Vries
2022-07-07 05:56:28 UTC
We could update the test-case to continue when hitting the SIGSEGV. The documented advise to deal with this suggests: ... (gdb) handle SIGSEGV SIGBUS nostop noprint" ... (In reply to Tom de Vries from comment #1) > We could update the test-case to continue when hitting the SIGSEGV. > > The documented advise to deal with this suggests: > ... > (gdb) handle SIGSEGV SIGBUS nostop noprint" > ... We could even try to do this automagically when detecting that we debug a process using libgc1. [ FTR, originally filed at https://bugzilla.opensuse.org/show_bug.cgi?id=1153239 ] (In reply to Tom de Vries from comment #2) > We could even try to do this automagically when detecting that we debug a > process using libgc1. I don't think gdb should do this itself. However, libgc could ship a python script to do it. Although I thought I heard that libgc changed its probing strategy to avoid the SEGV. The master branch has been updated by Tom Tromey <tromey@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=59132fd9777442eea8c05c6b4b96cee03c6273b3 commit 59132fd9777442eea8c05c6b4b96cee03c6273b3 Author: Tom Tromey <tromey@adacore.com> Date: Thu Dec 15 14:12:05 2022 -0700 Handle SIGSEGV in gdb selftests The gdb.gdb self-tests were timing out for me, which turned out to be PR testsuite/29325. Looking into it, the problem is that the version of the Boehm GC that is used by Guile on my machine causes a SEGV during stack probing. This unexpected stop confuses the tests and causes repeated timeouts. This patch adapts the two failing tests. This makes them work for me, and reduces the running time of gdb.gdb from 20 minutes to about 11 seconds. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29325 Fixed. |