Skip to content
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

valgrind: enable debug info #47251

Merged
merged 1 commit into from Sep 24, 2018
Merged

Conversation

lopsided98
Copy link
Contributor

Motivation for this change

At least on ARM, valgrind produces no stack trace unless debug info is available for its own libraries.

Also, anyone who tries to use valgrind on NixOS should be aware that the option --extra-debuginfo-path does not work with .build-id debug files like NixOS uses, so until that is fixed, the only way to use valgrind on NixOS is to symlink the debug info directory to /usr/lib/debug

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@Mic92
Copy link
Member

Mic92 commented Sep 23, 2018

Please move this to the staging branch.

@lopsided98 lopsided98 changed the base branch from master to staging September 23, 2018 21:58
@lopsided98
Copy link
Contributor Author

@Mic92 done

At least on ARM, valgrind produces no stack trace unless debug info is
available for its own libraries.
@lopsided98
Copy link
Contributor Author

Wait, so does setting separateDebugInfo = true automatically break the package on Darwin? Does it always have to be separateDebugInfo = stdenv.isLinux?

@Mic92
Copy link
Member

Mic92 commented Sep 23, 2018

It is possible that we do not have this yet for macOS. I think I read something on those lines.

@lopsided98
Copy link
Contributor Author

If that is the case, it seems like it should just be automatically disabled for macOS, rather than requiring each package to disable it.

@Mic92
Copy link
Member

Mic92 commented Sep 24, 2018

true.

@xeji
Copy link
Contributor

xeji commented Sep 24, 2018

@GrahamcOfBorg build valgrind

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-darwin (full log)

Attempted: valgrind

Partial log (click to expand)

cannot build derivation '/nix/store/630rl9w4gpy0qzyfzxjg5bqvjj4ha88y-hook.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/zj5f2kapcjdnk3b9yn0wmifq7w8pwfxd-flex-2.6.4.drv': 7 dependencies couldn't be built
cannot build derivation '/nix/store/7jd8ymw7ivwnfs539z96kask7prqfl8y-bootstrap_cmds-dev-tools-7.0.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/cpzh74jf74pqiwxz68szj646gkw8rp12-xnu-osx-10.11.6.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/50xs5xpgsn6g81g1j5glbw10g5zpyyml-IOKit-osx-10.11.6.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/dj80kb5f2iljwk9vs2l7iyaf75f2mkjq-configd-osx-10.8.5.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/v74w6szfx6z1waxs14qbxcnrwcxzn62a-python-2.7.15.drv': 15 dependencies couldn't be built
cannot build derivation '/nix/store/i05by8nfn956614z9xhfllajhcj0a1jz-gdb-8.1.1.drv': 13 dependencies couldn't be built
cannot build derivation '/nix/store/3lxz4ywr878q8cj7yjvz69kr8l9l36j5-valgrind-3.13.0.drv': 8 dependencies couldn't be built
error: build of '/nix/store/3lxz4ywr878q8cj7yjvz69kr8l9l36j5-valgrind-3.13.0.drv' failed

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-linux (full log)

Attempted: valgrind

Partial log (click to expand)

cannot build derivation '/nix/store/wb4wc70fal9vlkahyvzbnf5bgi2i9q3j-gmp-6.1.2.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/xivgfrssf6596cw03kihjk9a15anzaji-ncurses-6.1.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/r0m1lbl2igifcgf88w0rn8fxj61cj7ac-openssl-1.0.2p.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/0b3gjwa2kr6ihp0accwhgdpi2dxsrg8j-texinfo-6.5.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/57532qrb02ywdavxmrp6nd68ncgi99w1-mpfr-4.0.1.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/p7lsi09fygn4wj1ghk05giz9dma02ihx-readline-6.3p08.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/j3n90cpjmixbm37ig858dgr7pzsg4cqn-python-2.7.15.drv': 10 dependencies couldn't be built
cannot build derivation '/nix/store/j22nnfwnqam5fgmg7f2hrvlz25nxg2x2-gdb-8.1.1.drv': 12 dependencies couldn't be built
cannot build derivation '/nix/store/ya2b33xmcxljiqxm6r3bas41lny42vql-valgrind-3.13.0.drv': 4 dependencies couldn't be built
error: build of '/nix/store/ya2b33xmcxljiqxm6r3bas41lny42vql-valgrind-3.13.0.drv' failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: valgrind

Partial log (click to expand)

gzipping man pages under /nix/store/74ldsik21m0gy7wx03jax3ydz9gnx1mq-valgrind-3.13.0-man/share/man/
patching script interpreter paths in /nix/store/74ldsik21m0gy7wx03jax3ydz9gnx1mq-valgrind-3.13.0-man
checking for references to /build in /nix/store/74ldsik21m0gy7wx03jax3ydz9gnx1mq-valgrind-3.13.0-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/y51y5sz4ixm0nb44699lmbgamxh4r69m-valgrind-3.13.0-doc
patching script interpreter paths in /nix/store/y51y5sz4ixm0nb44699lmbgamxh4r69m-valgrind-3.13.0-doc
checking for references to /build in /nix/store/y51y5sz4ixm0nb44699lmbgamxh4r69m-valgrind-3.13.0-doc...
shrinking RPATHs of ELF executables and libraries in /nix/store/zyzs15bidgdpfijmzlslws97bpqx2z6v-valgrind-3.13.0-debug
patching script interpreter paths in /nix/store/zyzs15bidgdpfijmzlslws97bpqx2z6v-valgrind-3.13.0-debug
checking for references to /build in /nix/store/zyzs15bidgdpfijmzlslws97bpqx2z6v-valgrind-3.13.0-debug...
/nix/store/rcqny3f04ys0yaisqwc9az5p5cyack7k-valgrind-3.13.0

@xeji xeji merged commit da18634 into NixOS:staging Sep 24, 2018
@lopsided98 lopsided98 deleted the valgrind-debug-info branch September 24, 2018 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants