ldc icon indicating copy to clipboard operation
ldc copied to clipboard

Internal error: pc read in psymtab, but not in symtab when debugging with GDB

Open Geod24 opened this issue 3 years ago • 2 comments

We have a fairly large project with many dependencies, including Vibe.d. Recently we started to distribute binaries for Ubuntu 20.04 x86_64, built on the Github runners. That latest LDC (v1.28.1) is downloaded from dlang-community/setup-dlang, which AFAIK uses the releases from this repository.

Our latest release had a silly null pointer dereference which caused a SEGV. We got the core file from the servers (Ubuntu 20.04) and entered it in gdb:

# gdb --version
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

This is what the bt output looks like: Screen Shot 2022-01-20 at 18 42 04

The build log for the binary is here. Something that might be relevant, we use --export-dynamic as it allows us to have better backtrace (normally).

I have also attached the core dump: It's 4.3G uncompressed, but the zip contains an lz4 archive (because Github wants zip and systemd gave me lz4).

Geod24 avatar Jan 20 '22 10:01 Geod24

Have you tried it without --export-dynamic? IIRC, they're not needed for gdb backtraces, just for the druntime one.

kinke avatar Jan 20 '22 12:01 kinke

Yes, same problem. BTW in our case, we use --export-dynamic for Tracy, too.

Geod24 avatar Jan 21 '22 11:01 Geod24