[Nix-dev] More news about the nix-env crash

Michael Raskin 7c6f434c at mail.ru
Fri Jan 20 06:43:28 CET 2012


>Hi,
>
>On 01/19/2012 10:27 PM, Eelco Dolstra wrote:
>
>> On 01/19/2012 10:23 PM, Mathijs Kwik wrote:
>>
>>> config.nix: https://gist.github.com/1642727
>>
>> Thanks, this gives me a segfault as well.  Will investigate.
>
>The cause seems to be in some builderDefs code, which is doing an 
>equality check ("uniqList") on derivations.  That was always a bad idea 
>because it's extremely inefficient, but now it no longer works at all 
>because derivations have a self-reference ("drv.out" points back at 
>"drv").  This was added to support multiple derivation outputs.  Thus 
>uniqList tries to compare infinite data structures, leading to a stack 
>overflow.

OK, is changing to comparing by outPath enough then?

Also, is listToAttrs with arbitrary strings as keys considered a feature
or a bug (it would allow an efficient uniqList for buildInputs)?

>I'll try to add a workaround.





More information about the nix-dev mailing list