New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitian: Ship debug tarballs/zips with debug symbols #8167

Merged
merged 3 commits into from Jun 9, 2016

Conversation

Projects
None yet
5 participants
@theuni
Member

theuni commented Jun 8, 2016

Addresses #7770, though only Linux and Windows for now. OSX will need a little more attention, since dsymutil isn't yet built as part of our toolchain.

To test, simply untar/unzip the new -debug files in the same path as the binaries, and gdb should find them automatically.

To make my life easier while I was in there, I fixed up depends to play nice with CONFIG_SITE, which can be used now instead of abusing --prefix, though the --prefix hack still works fine.

Now, configure can also be run like:

CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site --prefix=/whatever/you/want

theuni added some commits Jun 7, 2016

depends: allow for CONFIG_SITE to be used rather than stealing prefix
This does not break any existing prefix behavior, only makes new behavior work.

For example:
CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure --prefix=/
gitian: create debug packages for linux/windows
The -debug tarballs/zips contain detached debugging symbols. To use them, place
in the same dir as the target binary, and invoke gdb as usual.

Also, because the debug symbols add a substantial space requirement, the build
dirs are now deleted when they're no longer needed.
@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jun 8, 2016

Member

Very cool!
utACK 7e7eb27

Member

laanwj commented Jun 8, 2016

Very cool!
utACK 7e7eb27

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Jun 8, 2016

Member

Nice utACK 7e7eb27

Member

jonasschnelli commented Jun 8, 2016

Nice utACK 7e7eb27

@sipa

This comment has been minimized.

Show comment
Hide comment
@sipa

sipa Jun 8, 2016

Member

Concept ACK

Member

sipa commented Jun 8, 2016

Concept ACK

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jun 8, 2016

Member

Tested ACK for Linux (gitian-built executables):

  • Generating a backtrace shows names and debug info when loading the symbols in gdb, but not when not having loaded the symbols (e.g. when moving the .gdb out of the way)
  • addr2line works
$ addr2line -Caife bitcoind.dbg 0xb258c                                                           
0x00000000000b258c
ReadBlockFromDisk(CBlock&, CBlockIndex const*, Consensus::Params const&)
/home/ubuntu/build/bitcoin/distsrc-x86_64-unknown-linux-gnu/src/main.cpp:1562

Haven't tested windows yet.

Member

laanwj commented Jun 8, 2016

Tested ACK for Linux (gitian-built executables):

  • Generating a backtrace shows names and debug info when loading the symbols in gdb, but not when not having loaded the symbols (e.g. when moving the .gdb out of the way)
  • addr2line works
$ addr2line -Caife bitcoind.dbg 0xb258c                                                           
0x00000000000b258c
ReadBlockFromDisk(CBlock&, CBlockIndex const*, Consensus::Params const&)
/home/ubuntu/build/bitcoin/distsrc-x86_64-unknown-linux-gnu/src/main.cpp:1562

Haven't tested windows yet.

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jun 8, 2016

Member

Hm, only tangentially related to this pull, but this is strange, looks like windows .zip still has bench_bitcoin.exe:

-rwxr-xr-x 1 orion orion   2886675 Jan  1 00:00 bench_bitcoin.exe
-rwxrwxr-x 1 orion orion  15123409 Jan  1 00:00 bench_bitcoin.exe.dbg

Seems I overlooked that one in #7776 (gitian-win.yml doesn't have the --disable-bench). Fixed in #8175.

Member

laanwj commented Jun 8, 2016

Hm, only tangentially related to this pull, but this is strange, looks like windows .zip still has bench_bitcoin.exe:

-rwxr-xr-x 1 orion orion   2886675 Jan  1 00:00 bench_bitcoin.exe
-rwxrwxr-x 1 orion orion  15123409 Jan  1 00:00 bench_bitcoin.exe.dbg

Seems I overlooked that one in #7776 (gitian-win.yml doesn't have the --disable-bench). Fixed in #8175.

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jun 8, 2016

Member

Tested ACK Windows:

$ /usr/bin/x86_64-w64-mingw32-addr2line -Caife bitcoind.exe.dbg 504000                                   
0x0000000000504000
CBlockIndex::GetMedianTimePast() const
/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/src/chain.h:291
UpdateTime(CBlockHeader*, Consensus::Params const&, CBlockIndex const*)
/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/src/miner.cpp:62

(haven't tried mingw-wine gdb, but I believe you that it works)

Member

laanwj commented Jun 8, 2016

Tested ACK Windows:

$ /usr/bin/x86_64-w64-mingw32-addr2line -Caife bitcoind.exe.dbg 504000                                   
0x0000000000504000
CBlockIndex::GetMedianTimePast() const
/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/src/chain.h:291
UpdateTime(CBlockHeader*, Consensus::Params const&, CBlockIndex const*)
/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/src/miner.cpp:62

(haven't tried mingw-wine gdb, but I believe you that it works)

@theuni

This comment has been minimized.

Show comment
Hide comment
@theuni

theuni Jun 8, 2016

Member

I tried it insomuch as gdb finds the symbols, but I had other local issues preventing gdb from working with wine. I'm not sure that I've ever actually used gdb for win debugging.

I'm assuming most windows crash investigations will happen via add2rline, but if you've used gdb that way in the past and would like to verify that it works, I'll see if I can work out my issue and test.

Member

theuni commented Jun 8, 2016

I tried it insomuch as gdb finds the symbols, but I had other local issues preventing gdb from working with wine. I'm not sure that I've ever actually used gdb for win debugging.

I'm assuming most windows crash investigations will happen via add2rline, but if you've used gdb that way in the past and would like to verify that it works, I'll see if I can work out my issue and test.

@laanwj laanwj merged commit 7e7eb27 into bitcoin:master Jun 9, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Jun 9, 2016

Merge #8167: gitian: Ship debug tarballs/zips with debug symbols
7e7eb27 gitian: create debug packages for linux/windows (Cory Fields)
ad38204 gitian: use CONFIG_SITE rather than hijacking the prefix (Cory Fields)
b676f38 depends: allow for CONFIG_SITE to be used rather than stealing prefix (Cory Fields)
@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jun 9, 2016

Member

I'm assuming most windows crash investigations will happen via add2rline, but if you've used gdb that way in the past and would like to verify that it works, I'll see if I can work out my issue and test.

Yes, I've done so once, it was not a very pleasant experience.
No need to spend more work there, that's so rare that we can fix it up if it happens to not work then.

Member

laanwj commented Jun 9, 2016

I'm assuming most windows crash investigations will happen via add2rline, but if you've used gdb that way in the past and would like to verify that it works, I'll see if I can work out my issue and test.

Yes, I've done so once, it was not a very pleasant experience.
No need to spend more work there, that's so rare that we can fix it up if it happens to not work then.

laanwj added a commit to laanwj/bitcoin that referenced this pull request Jun 21, 2016

doc: Mention ARM executables in release process
Mention ARM executables in the release process documentation
(these were introduced in #8188).
As well as that Linux tarballs have changed name to contain an
architecture tuple, instead of `linux32`/`linux64`.
Also mention that `-debug` files should not be uploaded (these were
introduced in #8167).

@str4d str4d referenced this pull request Oct 15, 2016

Merged

Upstream gitian updates #1541

zkbot pushed a commit to zcash/zcash that referenced this pull request Oct 17, 2016

zkbot
Auto merge of #1541 - str4d:upstream-gitian-updates, r=bitcartel
Upstream gitian updates

This PR pulls in all gitian-related PRs that have been merged upstream since 0.11.2. The only ones I left out were documentation-only PRs, because we removed `doc/gitian-building.md` at some point. Here are the commits applied here, in the order shown in `git log` (ie. last to first):

- bitcoin/bitcoin#7283
  - fa42a67
  - fa58c76
- bitcoin/bitcoin#8175
  - 74c1347
- bitcoin/bitcoin#8167
  - 7e7eb27
  - ad38204
  - b676f38
- bitcoin/bitcoin#7776
  - f063863
- bitcoin/bitcoin#7424
  - a81c87f ~ we already partly applied
  - a8ce872
  - f3d3eaf ~ we already partly applied
  - 475813b
  - ~~cd27bf5~~ X we already applied
- bitcoin/bitcoin#7060
  - 3b468a0 ~ we removed doc/gitian-building.md
  - ~~99fda26~~ X we removed doc/gitian-building.md
- bitcoin/bitcoin#7251
  - fa09562
- bitcoin/bitcoin#6900
  - ~~2cecb24~~ X we removed doc/gitian-building.md
  - 957c0fd
  - 2e31d74
  - ~~0b416c6~~ X we removed QT
  - 9f251b7
- bitcoin/bitcoin#6854
  - 579b863 ~ we already partly applied

Part of #540

codablock added a commit to codablock/dash that referenced this pull request Sep 16, 2017

Merge #8167: gitian: Ship debug tarballs/zips with debug symbols
7e7eb27 gitian: create debug packages for linux/windows (Cory Fields)
ad38204 gitian: use CONFIG_SITE rather than hijacking the prefix (Cory Fields)
b676f38 depends: allow for CONFIG_SITE to be used rather than stealing prefix (Cory Fields)

codablock added a commit to codablock/dash that referenced this pull request Sep 19, 2017

Merge #8167: gitian: Ship debug tarballs/zips with debug symbols
7e7eb27 gitian: create debug packages for linux/windows (Cory Fields)
ad38204 gitian: use CONFIG_SITE rather than hijacking the prefix (Cory Fields)
b676f38 depends: allow for CONFIG_SITE to be used rather than stealing prefix (Cory Fields)

schinzelh added a commit to dashpay/dash that referenced this pull request Oct 19, 2017

doc: Mention ARM executables in release process
Mention ARM executables in the release process documentation
(these were introduced in #8188).
As well as that Linux tarballs have changed name to contain an
architecture tuple, instead of `linux32`/`linux64`.
Also mention that `-debug` files should not be uploaded (these were
introduced in #8167).

schinzelh added a commit to dashpay/dash that referenced this pull request Oct 19, 2017

doc: Mention ARM executables in release process
Mention ARM executables in the release process documentation
(these were introduced in #8188).
As well as that Linux tarballs have changed name to contain an
architecture tuple, instead of `linux32`/`linux64`.
Also mention that `-debug` files should not be uploaded (these were
introduced in #8167).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment