[Nix-dev] Haskell packages in the binary cache broken?
Vladimír Čunát
vcunat at gmail.com
Mon May 27 18:21:35 CEST 2013
On 05/27/2013 06:02 PM, Karn Kallio wrote:
>> I don't know
>> where the non-determinism comes from, but if they just use a random
>> generator, it would be enough to seed it e.g. from the hash of $out
>> instead of the standard sources.
>
> As I understand, GHC has many uses of unsafeInterleaveIO in its
> implementation, so the order of effects such as the generation of fresh names
> will depend on how the IO manager schedules evaluation of those thunks, which
> could depend on eg time for receiving a filesystem response, which may depend
> on installed hardware (eg amount of RAM for filesystem buffer) and state of
> the machine (eg how many other processes are using IO at the moment). So the
> nondeterminism arises not via a controlled mechanism like a random generator
> but from races influenced by the configuration and state of the wider machine.
I see, but then passing +RTS -V0 to the compiler might make it
deterministic. I suppose it will impact build performance by increasing
I/O wait time, but IMHO builders are usually so loaded that total
rebuild performance won't suffer so much (all these are pure
speculations, I've never tried).
[-V option]:
http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.html#rts-options-misc
I would suggest this only for nix builds, *not* for user-run GHC from store.
Vlada
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3251 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20130527/b299131b/attachment.bin
More information about the nix-dev
mailing list