public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump
@ 2023-03-07 13:57 pastas at learn4good dot com
  2023-03-07 14:22 ` [Bug gdb/30207] " simark at simark dot ca
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: pastas at learn4good dot com @ 2023-03-07 13:57 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 30207
           Summary: GDB crashes on processing Apache2 crash dump
           Product: gdb
           Version: 12.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: pastas at learn4good dot com
  Target Milestone: ---

Created attachment 14738
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14738&action=edit
GDB core dump

GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1

Architecture: amd64


Command run: gdb /usr/sbin/apache2 CoreDump

Then processed GDB core dump of its own and made output which I have attached
which I hope is of help.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/30207] GDB crashes on processing Apache2 crash dump
  2023-03-07 13:57 [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump pastas at learn4good dot com
@ 2023-03-07 14:22 ` simark at simark dot ca
  2023-03-07 18:22 ` pastas at learn4good dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: simark at simark dot ca @ 2023-03-07 14:22 UTC (permalink / raw)
  To: gdb-prs

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

Simon Marchi <simark at simark dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simark at simark dot ca

--- Comment #1 from Simon Marchi <simark at simark dot ca> ---
Since you are on Ubuntu, you could perhaps install the dbgsym package for gdb,
to get better backtraces.

https://wiki.ubuntu.com/Debug%20Symbol%20Packages

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/30207] GDB crashes on processing Apache2 crash dump
  2023-03-07 13:57 [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump pastas at learn4good dot com
  2023-03-07 14:22 ` [Bug gdb/30207] " simark at simark dot ca
@ 2023-03-07 18:22 ` pastas at learn4good dot com
  2023-03-07 19:54 ` simark at simark dot ca
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pastas at learn4good dot com @ 2023-03-07 18:22 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from Erlandas <pastas at learn4good dot com> ---
Tried following those instructions and have tried:

apt-get install gdb-dbgsym

which gives:

The following packages have unmet dependencies:
 gdb-dbgsym : Depends: gdb (= 12.0.90-0ubuntu1) but 12.1-0ubuntu1~22.04 is to
be installed

Yes, debug symbol package could provide more valuable info.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/30207] GDB crashes on processing Apache2 crash dump
  2023-03-07 13:57 [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump pastas at learn4good dot com
  2023-03-07 14:22 ` [Bug gdb/30207] " simark at simark dot ca
  2023-03-07 18:22 ` pastas at learn4good dot com
@ 2023-03-07 19:54 ` simark at simark dot ca
  2023-03-09 19:58 ` pastas at learn4good dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: simark at simark dot ca @ 2023-03-07 19:54 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Simon Marchi <simark at simark dot ca> ---
Ah, that's unfortunate, it must be that the dbgsym package is out of date.

Alternatively, you can build GDB yourself, it's quite simple, just ./configure
&& make.  There are only a few dependencies that are very common packages.

Another option would be for you to upload your executable and core, see if
somebody else can reproduce.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/30207] GDB crashes on processing Apache2 crash dump
  2023-03-07 13:57 [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump pastas at learn4good dot com
                   ` (2 preceding siblings ...)
  2023-03-07 19:54 ` simark at simark dot ca
@ 2023-03-09 19:58 ` pastas at learn4good dot com
  2023-03-09 20:21 ` simon.marchi at polymtl dot ca
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pastas at learn4good dot com @ 2023-03-09 19:58 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Erlandas <pastas at learn4good dot com> ---
Have removed version 12.1 which comes with "apt install gdb"

Built version 13.1 from source. But I do not see gdb-dbgsym executable. Am I
missing something or did I have to build it with some additional config?

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/30207] GDB crashes on processing Apache2 crash dump
  2023-03-07 13:57 [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump pastas at learn4good dot com
                   ` (3 preceding siblings ...)
  2023-03-09 19:58 ` pastas at learn4good dot com
@ 2023-03-09 20:21 ` simon.marchi at polymtl dot ca
  2023-04-01 18:11 ` pastas at learn4good dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: simon.marchi at polymtl dot ca @ 2023-03-09 20:21 UTC (permalink / raw)
  To: gdb-prs

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

Simon Marchi <simon.marchi at polymtl dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simon.marchi at polymtl dot ca

--- Comment #5 from Simon Marchi <simon.marchi at polymtl dot ca> ---
(In reply to Erlandas from comment #4)
> Have removed version 12.1 which comes with "apt install gdb"
> 
> Built version 13.1 from source. But I do not see gdb-dbgsym executable. Am I
> missing something or did I have to build it with some additional config?

If you build it from source, you wouldn't use the dbgsym package.  The dbgsym
packages contain debug info matching the binaries distributed in the distro
packages.

When configuring (./configure) GDB, pass:

  CFLAGS="-g -O0" CXXFLAGS="-g -O0"

That will make it build with no optimizations (it will be slower, but easier to
debug) and with debug info directly inside the binary.

Btw, since you are using Ubuntu 22.04, you could have also configured the
top-level GDB to use debuginfod, as described here:

https://wiki.ubuntu.com/Debug%20Symbol%20Packages#Debuginfod

This is pretty cool, it makes GDB download debug info for distro packages
transparently, when it needs it.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/30207] GDB crashes on processing Apache2 crash dump
  2023-03-07 13:57 [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump pastas at learn4good dot com
                   ` (4 preceding siblings ...)
  2023-03-09 20:21 ` simon.marchi at polymtl dot ca
@ 2023-04-01 18:11 ` pastas at learn4good dot com
  2023-04-01 19:14 ` simark at simark dot ca
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pastas at learn4good dot com @ 2023-04-01 18:11 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #6 from Erlandas <pastas at learn4good dot com> ---
I have finally got a possibly reproducible case where I still have a core dump
which I was trying to debug and it in turn made GDB crash itself. This time it
is not Apache, but ManticoreSearch Core Dump.

The commands used on Ubuntu 22:

cd /var/crash;mkdir searchd;apport-unpack _usr_bin_searchd.1003.crash
searchd;cd searchd;gdb /usr/bin/searchd CoreDump

Then:

set pagination off
set logging on
info threads
thread apply all bt
bt full
info locals
detach


Where it crashed on INFO LOCALS or DETACH. searchd process core file is about
500 Kb, GDB core dump is 50Mb.

Tried processing GDB own coredump and on DETACH it crashed again. Processing
core dump did not show any symbols of its own

WHere /how do I provide both core dumps for someone to examine them?

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/30207] GDB crashes on processing Apache2 crash dump
  2023-03-07 13:57 [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump pastas at learn4good dot com
                   ` (5 preceding siblings ...)
  2023-04-01 18:11 ` pastas at learn4good dot com
@ 2023-04-01 19:14 ` simark at simark dot ca
  2023-04-02  6:26 ` pastas at learn4good dot com
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: simark at simark dot ca @ 2023-04-01 19:14 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #7 from Simon Marchi <simark at simark dot ca> ---
You could try to attach the searchd binary and the searchd core dump to this
bug.  If it's too big to attach directly, upload it somewhere and provide the
link.

The GDB coredump is likely only useful to you, if you did your own build.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/30207] GDB crashes on processing Apache2 crash dump
  2023-03-07 13:57 [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump pastas at learn4good dot com
                   ` (6 preceding siblings ...)
  2023-04-01 19:14 ` simark at simark dot ca
@ 2023-04-02  6:26 ` pastas at learn4good dot com
  2023-04-02  6:27 ` pastas at learn4good dot com
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pastas at learn4good dot com @ 2023-04-02  6:26 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #8 from Erlandas <pastas at learn4good dot com> ---
Created attachment 14797
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14797&action=edit
Searchd (ManticoreSearch) Binary

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/30207] GDB crashes on processing Apache2 crash dump
  2023-03-07 13:57 [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump pastas at learn4good dot com
                   ` (7 preceding siblings ...)
  2023-04-02  6:26 ` pastas at learn4good dot com
@ 2023-04-02  6:27 ` pastas at learn4good dot com
  2023-04-02  6:28 ` pastas at learn4good dot com
  2023-04-02 18:10 ` simark at simark dot ca
  10 siblings, 0 replies; 12+ messages in thread
From: pastas at learn4good dot com @ 2023-04-02  6:27 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #9 from Erlandas <pastas at learn4good dot com> ---
Created attachment 14798
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14798&action=edit
Searchd crash core dump

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/30207] GDB crashes on processing Apache2 crash dump
  2023-03-07 13:57 [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump pastas at learn4good dot com
                   ` (8 preceding siblings ...)
  2023-04-02  6:27 ` pastas at learn4good dot com
@ 2023-04-02  6:28 ` pastas at learn4good dot com
  2023-04-02 18:10 ` simark at simark dot ca
  10 siblings, 0 replies; 12+ messages in thread
From: pastas at learn4good dot com @ 2023-04-02  6:28 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #10 from Erlandas <pastas at learn4good dot com> ---
Attached coredump which make GDB crash and binary which produced the crash
dump.

Gdb does process the core dump as per my instructions below, but crashes on 
DETACH.

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug gdb/30207] GDB crashes on processing Apache2 crash dump
  2023-03-07 13:57 [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump pastas at learn4good dot com
                   ` (9 preceding siblings ...)
  2023-04-02  6:28 ` pastas at learn4good dot com
@ 2023-04-02 18:10 ` simark at simark dot ca
  10 siblings, 0 replies; 12+ messages in thread
From: simark at simark dot ca @ 2023-04-02 18:10 UTC (permalink / raw)
  To: gdb-prs

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

Simon Marchi <simark at simark dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #11 from Simon Marchi <simark at simark dot ca> ---
I tried reproducing on an Ubuntu 22.04 system, using a recent build from
master, but got:

(gdb) detach
No core file now.

But I then realized that all this time I was not using the gdb from the distro,
as I thought, but a more recent build.  With /usr/bin/gdb, I do get a crash
when trying to "detach" a core.

It was fixed by this commit:

https://gitlab.com/gnutools/binutils-gdb/-/commit/0fe74cb9ad35add9c6da4df5c9879f254d918a6a

*** This bug has been marked as a duplicate of bug 29275 ***

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-04-02 18:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 13:57 [Bug gdb/30207] New: GDB crashes on processing Apache2 crash dump pastas at learn4good dot com
2023-03-07 14:22 ` [Bug gdb/30207] " simark at simark dot ca
2023-03-07 18:22 ` pastas at learn4good dot com
2023-03-07 19:54 ` simark at simark dot ca
2023-03-09 19:58 ` pastas at learn4good dot com
2023-03-09 20:21 ` simon.marchi at polymtl dot ca
2023-04-01 18:11 ` pastas at learn4good dot com
2023-04-01 19:14 ` simark at simark dot ca
2023-04-02  6:26 ` pastas at learn4good dot com
2023-04-02  6:27 ` pastas at learn4good dot com
2023-04-02  6:28 ` pastas at learn4good dot com
2023-04-02 18:10 ` simark at simark dot ca

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