Bug 1084552 - gdb hangs when libLLVM5-debuginfo is installed
gdb hangs when libLLVM5-debuginfo is installed
Status: RESOLVED INVALID
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Development
Current
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: Alexei Sorokin
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-08 18:47 UTC by Luigi Baldoni
Modified: 2018-03-16 14:20 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luigi Baldoni 2018-03-08 18:47:03 UTC
While trying to debug a problem with a qmmp plugin, I found myself in the following situation:

I installed qmmp and several debuginfo packages.
I ran qmmp under gdb.
If libLLVM5-debuginfo, among others, is installed then the main window of qmmp won't open and gdb will start eating CPU%.

I'm not sure if to ascribe this to gdb, qmmp, LLVM or myself, so I put it out there.
Comment 1 Richard Biener 2018-03-16 08:10:13 UTC
-rw-r--r--    1 root    root                957957272 Mar 10 08:35 /usr/lib/debug/usr/lib64/libLLVM.so.5.0.1-5.0.1-4.23.x86_64.debug

so it's "only" a GB of debuginfo.  How long did you wait for gdb to make progress here?  IIRC there are some non-linear parts of the DWARF reading process in gdb.

The symptom can be reproduced with

> echo 'int main(){}' > t.c
> gcc t.c -lLLVM
> gdb ./a.out
(gdb) start

when LLVM debuginfo is installed.  _But_ - it does finish processing for me
and gdb ends up with 1.6GB RSS.

On a quite fast machine with lots of RAM the initial processing of debuginfo
took 30s (from 'start' to the next prompt).

So I'd say this is not a bug but "reasonable"?

As said, I'm curious about numbers on your machine.
Comment 2 Luigi Baldoni 2018-03-16 12:49:40 UTC
Full disclosure: I'm doing this on a virtualbox VM with 2GB RAM and 16GB swap. Host machine is an i3540K.

After 5 minutes of launching gdb qmmp the whole UI becomes unresponsive and the ssh connection is slow as molasses. I gave up after waiting half an hour.

No problem with your program though. Could this possibly be related to the virtualbox X11 driver instead?
Comment 3 Richard Biener 2018-03-16 13:28:09 UTC
(In reply to Luigi Baldoni from comment #2)
> Full disclosure: I'm doing this on a virtualbox VM with 2GB RAM and 16GB
> swap. Host machine is an i3540K.
> 
> After 5 minutes of launching gdb qmmp the whole UI becomes unresponsive and
> the ssh connection is slow as molasses. I gave up after waiting half an hour.
> 
> No problem with your program though. Could this possibly be related to the
> virtualbox X11 driver instead?

More likely the VM is too small.  Given on my tiny testcase gdb takes 1.6GB RSS
I can very well imagine that the rest of the system plus the rest of 'qmmp'
causes the VM to go swapping.

So, can you check if it swaps?  If so then you need to assign more memory to the VM and this isn't a bug.
Comment 4 Luigi Baldoni 2018-03-16 14:20:06 UTC
Ok, 4GB RAM for my VM and the problem is gone.
Sorry.