jtojnar has quit [Read error: Connection reset by peer]
init_6 has joined #nixos-dev
jtojnar has joined #nixos-dev
init_6 has quit [Ping timeout: 268 seconds]
init_6 has joined #nixos-dev
init_6 has quit []
pie__ has joined #nixos-dev
pie___ has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 246 seconds]
clever has joined #nixos-dev
hedning has joined #nixos-dev
jtojnar has quit [Quit: jtojnar]
hedning has quit [Remote host closed the connection]
<simpson>
To hopefully find something somebody's done before: Is there a NixOS or nixpkgs way to do things like ccache, where compilation units are cached individually, with compiler modifications?
<simpson>
I found `preferLocalBuild`, which seems a bit related, maybe.
init_6 has joined #nixos-dev
lassulus_ has joined #nixos-dev
drakonis has joined #nixos-dev
lassulus has quit [Ping timeout: 250 seconds]
lassulus_ is now known as lassulus
<samueldr>
if anyone has been successful in getting boehm's leak detector to print the location of leaks within nix, I'd be glad to take a look at their notes, maybe I'll have an idea later when I'll stop looking at that issue...
<samueldr>
the leak detector seems to see a bunch of leaks happening, both in nix-instantiate and hydra-eval-jobs, which I think might be what's causing `Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS`
<samueldr>
boehm's doc on the leak checker seems to indicate it can print where they've ben malloc'd, but I haven't been able to understand what I'm doing wrong yet
<samueldr>
?!? we had a successful eval in trunk-combined
<clever>
samueldr: it has a leak detector? :O
<clever>
samueldr: preferLocalBuild just disables build slaves, it still does a full rebuild, in a pure manner
<simpson>
I'm right now thinking that I have a folder of compilation units, and I have a Makefile with a rule, and I run that Makefile on each unit. AFAICT the only cost to caching each unit with Nix is that I have an additional derivation and store path (two paths total) for each unit.
<simpson>
And honestly I am weighing that a bit against a 30-60s time for some of our bigger units.
<clever>
simpson: snack is a haskell util, that will basically do what you want (but with haskell code)
<clever>
every single module gets its own derivation, and is built seperately
_rvl has joined #nixos-dev
<clever>
the major limiting factor i ran into, is that it needs IFD to parse a source file, and know what its deps are
<clever>
and the nix evaluator is single threaded, and halts when doing IFD
<clever>
so the entire parsing, of 800 source files, happens in a single-threaded manner
<clever>
but nix can cache that, and it goes much faster the 2nd time around
<simpson>
Mm. I'll have to look at that. We can do *much* better in Monte since compilation really is fully separate per-module. (Yay for no type system?)
<clever>
heh
drakonis has quit [Remote host closed the connection]
phreedom has quit [Ping timeout: 256 seconds]
phreedom has joined #nixos-dev
pie___ has joined #nixos-dev
pie__ has quit [Remote host closed the connection]
orivej has joined #nixos-dev
orivej has quit [Remote host closed the connection]
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 250 seconds]
fadenb has quit [Ping timeout: 268 seconds]
init_6 has quit []
jtojnar has joined #nixos-dev
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 250 seconds]
pie__ has joined #nixos-dev
pie___ has quit [Remote host closed the connection]
hedning has joined #nixos-dev
asymmetric has joined #nixos-dev
pie___ has joined #nixos-dev
pie__ has quit [Remote host closed the connection]
harrow has quit [Ping timeout: 245 seconds]
ivan has quit [Ping timeout: 268 seconds]
aszlig has quit [Quit: Kerneling down for reboot NOW.]
aszlig has joined #nixos-dev
harrow has joined #nixos-dev
ivan has joined #nixos-dev
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 240 seconds]
orivej has joined #nixos-dev
orivej has quit [Ping timeout: 250 seconds]
<samueldr>
:( I think I need to nerd-snipe someone... given a checkout of boehmgc 8.0.0, the leak_test program does print the debug information as expected, even with stock boehmgc from nix
<samueldr>
though applying `enableDebugging` to nix, using a patch to add `GC_set_find_leak(1);` to nix-instantiate.cc, nix-building that and running it still uses the "no debug info print" from boehm
<samueldr>
`file` says it's "not stripped", so I should be good for the debug symbols?
orivej has joined #nixos-dev
<bennofs[m]>
samueldr: with multiple outputs, is there a debug output? Not sure if nix uses debug splitting
<clever>
bennofs[m]: its an option you can enable
<clever>
bennofs[m]: search for separateDebugInfo
<clever>
also, anoyingly, seperateLibAvutil vs separateDebugInfo
<clever>
both spellings are in nixpkgs!
<samueldr>
bennofs[m], clever, assuming split output, and that I am nix-building and execing result/bin/nix-instantiate, how would that affect me?
<samueldr>
clever ^ forgot to make you first highlitee
<samueldr>
I see how it would be a separate output, but how would I use it?
<samueldr>
(and how to ensure it is using one)
<samueldr>
> nix-build -A nix.debug; file $(readlink -f result-debug/lib/debug/nix-instantiate )
<{^_^}>
error: syntax error, unexpected ';', expecting ')', at (string):214:23
<samueldr>
>> ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter *empty*, for GNU/Linux 2.6.32, BuildID[sha1]=20fad7897a5b5818690c5f8926150d6fad97b7d4, with debug_info, not stripped
<samueldr>
so "with debug_info" I gather is good
<samueldr>
interpreter *empty* is, uh, I don't know!
<samueldr>
I guess it's not an executable as forcing it with the interpreter from the binary results in a segfault :)
<samueldr>
so, commenting `#separateDebugInfo`, nix-building anew, I get `with debug_info, not stripped`, but yet boehm seems to use its printer without symbols :/, I'm now checking for ways to confirm the debug symbols are in the binary
<samueldr>
objdump --syms result/bin/nix-instantiate # seems to indicate it's alright
fadenb has joined #nixos-dev
<samueldr>
okay, verified running gdb, symbols seem to all be there
<samueldr>
good, at least I know I'm not chasing ghosts, next thing is looking up what am I doing wrong with boehm
fadenb has quit [Remote host closed the connection]
fadenb has joined #nixos-dev
<samueldr>
hm, using GC_ABORT_ON_LEAK I should be able to inspect the code that boehm execs around those bits... I could also look int o setting a breakpoint in the bits where it configures the backtrace printer
<clever>
samueldr: its not an executable, its just the raw debug info
<clever>
samueldr: gdb has a search path to find such debug into, and add it back in at runtime
<samueldr>
yeah, doesn't help when not running in gdb :)
<samueldr>
(I assumed it was that, I just didn't know for sure, given the output from `file`)
asymmetric has quit [Remote host closed the connection]
<clever>
samueldr: what are you trying to do with the debug info then?
<samueldr>
boehm will print where the leaked memory was allocated
<samueldr>
clever: it's done by boehm, at runtime
<clever>
ahh
<clever>
you may need to not seperate the debug then
<samueldr>
[17:27:58] <samueldr> so, commenting `#separateDebugInfo`, nix-building anew, I get `with debug_info, not stripped`, but yet boehm seems to use its printer without symbols :/, I'm now checking for ways to confirm the debug symbols are in the binary
<samueldr>
and I verified using both objdump, and launching a debug using gdb and infos seem to be there
<clever>
check the source and see how its getting symbols