public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* GDB locks RPM database
@ 2020-05-19 23:47 Muhammad Umer
  0 siblings, 0 replies; only message in thread
From: Muhammad Umer @ 2020-05-19 23:47 UTC (permalink / raw)
  To: gdb-prs


I hope you guys are safe and healthy.
Not sure if this is the right way, but I had a query about GDB, if this isn't the right forum, please point me in the right direction.
On my RHEL 7.7 machine, I was using a script that would attach GDB to a running process and collect it's stack trace. After a while, I needed to install a package on the system. I tried installing a package, but the yum command didn't work, it would just get stuck. I tried installing a package through rpm command and it would get stuck as well. I could see some locks on the RPM database, in /var/lib/rpm. I found out using "lslocks" that my GDB processes had locked the RPM database. I'm not sure why GDB would do that? Is it by default and is the desired behavior? If it is, under what conditions would GDB acquire a lock on the rpm database?
Thank you.
>From sourceware-bugzilla@sourceware.org  Wed May 20 01:57:57 2020
Return-Path: <sourceware-bugzilla@sourceware.org>
X-Original-To: gdb-prs@sourceware.org
Delivered-To: gdb-prs@sourceware.org
Received: by sourceware.org (Postfix, from userid 48)
 id 398BB3840C0A; Wed, 20 May 2020 01:57:57 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 398BB3840C0A
From: "simark at simark dot ca" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/26006] rereading symbols fails
Date: Wed, 20 May 2020 01:57:57 +0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gdb
X-Bugzilla-Component: symtab
X-Bugzilla-Version: 9.1
X-Bugzilla-Keywords: 
X-Bugzilla-Severity: normal
X-Bugzilla-Who: simark at simark dot ca
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution: 
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at sourceware dot org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags: 
X-Bugzilla-Changed-Fields: everconfirmed cf_reconfirmed_on cc bug_status
Message-ID: <bug-26006-4717-448AntxVxy@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-26006-4717@http.sourceware.org/bugzilla/>
References: <bug-26006-4717@http.sourceware.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://sourceware.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-BeenThere: gdb-prs@sourceware.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Gdb-prs mailing list <gdb-prs.sourceware.org>
List-Unsubscribe: <http://sourceware.org/mailman/options/gdb-prs>,
 <mailto:gdb-prs-request@sourceware.org?subject=unsubscribe>
List-Archive: <https://sourceware.org/pipermail/gdb-prs/>
List-Help: <mailto:gdb-prs-request@sourceware.org?subject=help>
List-Subscribe: <http://sourceware.org/mailman/listinfo/gdb-prs>,
 <mailto:gdb-prs-request@sourceware.org?subject=subscribe>
X-List-Received-Date: Wed, 20 May 2020 01:57:57 -0000

https://sourceware.org/bugzilla/show_bug.cgi?id=3D26006

Simon Marchi <simark at simark dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-05-20
                 CC|                            |simark at simark dot ca
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Simon Marchi <simark at simark dot ca> ---
Hi Andy, could you please try the following patch?

It fixes the problem you described for me.  It also fixes
gdb.ada/exec_changed.exp, although I haven't run the full testsuite so I do=
n't
know if there are regressions.


>From 966cd4f85551958bf01c6469db0663f07a0c2610 Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@efficios.com>
Date: Tue, 19 May 2020 21:54:24 -0400
Subject: [PATCH] gdb: reset/recompute section offset in reread_symbols

---
 gdb/symfile.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gdb/symfile.c b/gdb/symfile.c
index dd8192a67fbb..4d0a12e533fe 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2543,6 +2543,7 @@ reread_symbols (void)
             will need to be called (see discussion below).  */
          obstack_free (&objfile->objfile_obstack, 0);
          objfile->sections =3D NULL;
+         objfile->section_offsets.clear ();
          objfile->compunit_symtabs =3D NULL;
          objfile->template_symbols =3D NULL;
          objfile->static_links.reset (nullptr);
@@ -2597,6 +2598,8 @@ reread_symbols (void)

          objfiles_changed ();

+         objfile->sf->sym_offsets (objfile, {});
+
          read_symbols (objfile, 0);

          if (!objfile_has_symbols (objfile))
--=20
2.26.2

--=20
You are receiving this mail because:
You are on the CC list for the bug.=


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-19 23:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19 23:47 GDB locks RPM database Muhammad Umer

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).