public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/29805] New: [gdb.symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error)
@ 2022-11-18 16:10 vries at gcc dot gnu.org
2022-11-18 17:32 ` [Bug symtab/29805] " vries at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-18 16:10 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29805
Bug ID: 29805
Summary: [gdb.symtab] FAIL:
gdb.threads/access-mem-running-thread-exit.exp:
all-stop: access mem (write to global_var, inf=2,
iter=1) (GDB internal error)
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: symtab
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
On powerpc64le-linux, I ran into a gdb internal error:
...
(gdb) could not find '.gnu_debugaltlink' file for
/usr/lib/debug/lib64/libgcc_s.so.1-11.3.0+git1637-150000.1.11.2.ppc64le.debug^M
inferior 2^M
[Switching to inferior 2 [process 56507]
(/suse/tdevries/gdb/build/gdb/testsuite/outputs/gdb.threads/access-mem-running-thread-exit/access-mem-running-thread-exit)]^M
[Switching to thread 2.1 (Thread 0x7ffff7ff3d90 (LWP 56507))](running)^M
(gdb) /suse/tdevries/gdb/src/gdb/dwarf2/read.c:7284: internal-error:
create_all_units: Assertion `per_objfile->per_bfd->all_units.empty ()'
failed.^M
A problem internal to GDB has been detected,^M
further debugging may prove unreliable.^M
----- Backtrace -----^M
FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem
(write to global_var, inf=2, iter=1) (GDB internal error)
...
The circumstances are a bit peculiar, I messed around with debug packages and
broke the .gnu_debugaltlink for libgcc_s.so.1. Still, we shouldn't abort.
I'll try to reproduce on x86_64-linux.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29805] [gdb.symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error)
2022-11-18 16:10 [Bug symtab/29805] New: [gdb.symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error) vries at gcc dot gnu.org
@ 2022-11-18 17:32 ` vries at gcc dot gnu.org
2022-11-18 17:43 ` vries at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-18 17:32 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29805
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> The circumstances are a bit peculiar, I messed around with debug packages
> and broke the .gnu_debugaltlink for libgcc_s.so.1. Still, we shouldn't
> abort.
>
> I'll try to reproduce on x86_64-linux.
Hmm, that doesn't seem to be possible because it doesn't have a
.gnu_debugaltlink:
...
$ readelf -S -W libgcc_s.so.1-11.3.0+git1637-150000.1.11.2.x86_64.debug | grep
alt
$
...
But I managed to trigger it by playing with the cc-with-dwz-m board:
...
diff --git a/gdb/contrib/cc-with-tweaks.sh b/gdb/contrib/cc-with-tweaks.sh
index 0ad0091d47a..ce6798c38a8 100755
--- a/gdb/contrib/cc-with-tweaks.sh
+++ b/gdb/contrib/cc-with-tweaks.sh
@@ -247,6 +247,7 @@ elif [ "$want_multi" = true ]; then
echo "$myname: dwz file $dwz_file missing."
exit 1
fi
+ rm -f "$dwz_file"
fi
if [ "$want_dwp" = true ]; then
...
The same assert triggers in the same test-case.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29805] [gdb.symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error)
2022-11-18 16:10 [Bug symtab/29805] New: [gdb.symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error) vries at gcc dot gnu.org
2022-11-18 17:32 ` [Bug symtab/29805] " vries at gcc dot gnu.org
@ 2022-11-18 17:43 ` vries at gcc dot gnu.org
2022-11-18 17:43 ` [Bug symtab/29805] [gdb/symtab] " vries at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-18 17:43 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29805
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
I tried the same test with gdb 12.1, and just got:
...
(gdb) print global_var = 555^M
'global_var' has unknown type; cast it to its declared type^M
(gdb) FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access
mem (write to global_var, inf=2, iter=1)
...
So I guess this is a regression.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29805] [gdb/symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error)
2022-11-18 16:10 [Bug symtab/29805] New: [gdb.symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error) vries at gcc dot gnu.org
2022-11-18 17:32 ` [Bug symtab/29805] " vries at gcc dot gnu.org
2022-11-18 17:43 ` vries at gcc dot gnu.org
@ 2022-11-18 17:43 ` vries at gcc dot gnu.org
2022-11-19 6:30 ` vries at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-18 17:43 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29805
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[gdb.symtab] FAIL: |[gdb/symtab] FAIL:
|gdb.threads/access-mem-runn |gdb.threads/access-mem-runn
|ing-thread-exit.exp: |ing-thread-exit.exp:
|all-stop: access mem (write |all-stop: access mem (write
|to global_var, inf=2, |to global_var, inf=2,
|iter=1) (GDB internal |iter=1) (GDB internal
|error) |error)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29805] [gdb/symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error)
2022-11-18 16:10 [Bug symtab/29805] New: [gdb.symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error) vries at gcc dot gnu.org
` (2 preceding siblings ...)
2022-11-18 17:43 ` [Bug symtab/29805] [gdb/symtab] " vries at gcc dot gnu.org
@ 2022-11-19 6:30 ` vries at gcc dot gnu.org
2022-11-19 10:33 ` vries at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-19 6:30 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29805
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
This fixes it:
...
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 60e120a9d76..53a6a8b5e6d 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -7291,7 +7291,16 @@ create_all_units (dwarf2_per_objfile *per_objfile)
&per_objfile->per_bfd->abbrev, 0,
types_htab, rcuh_kind::TYPE);
- dwz_file *dwz = dwarf2_get_dwz_file (per_objfile->per_bfd);
+ dwz_file *dwz;
+ try
+ {
+ dwz = dwarf2_get_dwz_file (per_objfile->per_bfd);
+ }
+ catch (const gdb_exception_error &)
+ {
+ per_objfile->per_bfd->all_units.clear ();
+ throw;
+ }
if (dwz != NULL)
{
/* Pre-read the sections we'll need to construct an index. */
...
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29805] [gdb/symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error)
2022-11-18 16:10 [Bug symtab/29805] New: [gdb.symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error) vries at gcc dot gnu.org
` (3 preceding siblings ...)
2022-11-19 6:30 ` vries at gcc dot gnu.org
@ 2022-11-19 10:33 ` vries at gcc dot gnu.org
2022-11-26 13:13 ` cvs-commit at gcc dot gnu.org
2022-11-26 13:14 ` vries at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-19 10:33 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29805
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2022-November/194001.html
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29805] [gdb/symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error)
2022-11-18 16:10 [Bug symtab/29805] New: [gdb.symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error) vries at gcc dot gnu.org
` (4 preceding siblings ...)
2022-11-19 10:33 ` vries at gcc dot gnu.org
@ 2022-11-26 13:13 ` cvs-commit at gcc dot gnu.org
2022-11-26 13:14 ` vries at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-26 13:13 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29805
--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=05ad0d60341f0933501dc90002da3d4594c30438
commit 05ad0d60341f0933501dc90002da3d4594c30438
Author: Tom de Vries <tdevries@suse.de>
Date: Sat Nov 26 14:13:06 2022 +0100
[gdb/symtab] Handle failure to open .gnu_debugaltlink file
If we instrument cc-with-tweaks.sh to remove the .gnu_debugaltlink file
after
dwz has created it, with test-case
gdb.threads/access-mem-running-thread-exit.exp and target board
cc-with-dwz-m
we run into:
...
(gdb) file access-mem-running-thread-exit^M
Reading symbols from access-mem-running-thread-exit...^M
could not find '.gnu_debugaltlink' file for
access-mem-running-thread-exit^M
...
followed a bit later by:
...
(gdb) file access-mem-running-thread-exit^M
Reading symbols from access-mem-running-thread-exit...^M
gdb/dwarf2/read.c:7284: internal-error: create_all_units: \
Assertion `per_objfile->per_bfd->all_units.empty ()' failed.^M
...
The problem is that create_units does not catch the error thrown by
dwarf2_get_dwz_file.
Fix this by catching the error and performing the necessary cleanup,
getting
the same result for the first and second file command.
PR symtab/29805
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29805
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug symtab/29805] [gdb/symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error)
2022-11-18 16:10 [Bug symtab/29805] New: [gdb.symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error) vries at gcc dot gnu.org
` (5 preceding siblings ...)
2022-11-26 13:13 ` cvs-commit at gcc dot gnu.org
@ 2022-11-26 13:14 ` vries at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2022-11-26 13:14 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=29805
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
Target Milestone|--- |13.1
--- Comment #6 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed by commit in previous commit.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-11-26 13:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 16:10 [Bug symtab/29805] New: [gdb.symtab] FAIL: gdb.threads/access-mem-running-thread-exit.exp: all-stop: access mem (write to global_var, inf=2, iter=1) (GDB internal error) vries at gcc dot gnu.org
2022-11-18 17:32 ` [Bug symtab/29805] " vries at gcc dot gnu.org
2022-11-18 17:43 ` vries at gcc dot gnu.org
2022-11-18 17:43 ` [Bug symtab/29805] [gdb/symtab] " vries at gcc dot gnu.org
2022-11-19 6:30 ` vries at gcc dot gnu.org
2022-11-19 10:33 ` vries at gcc dot gnu.org
2022-11-26 13:13 ` cvs-commit at gcc dot gnu.org
2022-11-26 13:14 ` vries at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).