GDB locks RPM database

Simon Marchi simark@simark.ca
Wed May 20 00:28:47 GMT 2020


Changing the list to gdb@.

On 2020-05-19 7:47 p.m., Muhammad Umer via Gdb-prs wrote:
> 
> 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.
> 

I've never heard of this.  Can this be a RHEL-specific patch?

I'm guessing that GDB on RHEL might have a feature to locate debug info packages by querying
the package manager, and that's where it would take a lock.

Simon


More information about the Gdb mailing list