-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Crash on cygwin x64 in nix 2.3.9 #4360
Comments
I traced that to boost coroutine2 not working under cygwin x64. The crash happens here, afaiu: I filed a bug to them; they don't claim cygwin support anywhere, though. Can there be an alternative code without coroutines, for cygwin builds? The last nix without coroutines was 2.0.x, as they were introduced in 2.1. |
"unfortunately cygwin is not supported", in the boost github issue. |
I built boost 1.75 and nix 2.3.9 with the flags below, and all worked! " If the architecture is not supported but the platform provides ucontext_t, Boost.Context should be compiled with BOOST_USE_UCONTEXT and b2 property context-impl=ucontext. " Unfortunately the cygwin boost 1.66 are built without that b2 property. I'll try to report that. |
I marked this as stale due to inactivity. → More info |
I've been trying to get nix working on cygwin for ages. My progress is in #4953. I didn't have the same luck as you with ucontext: https://cygwin.com/pipermail/cygwin-developers/2021-December/012536.html I've actually got through all the changes needed to build nix from nixpkgs on cygwin, but it involved a lot of hacks, like the ones from the PR, a modified version of cygwin, etc. Did you make any more progress? |
All worked for me, with a boost change, as I reported.
I even pushed the fix I did to boost one year ago, so if cygwin has a new
boost, it should be fixed. But I have not tried since then.
If I find some time I'll test again with whatever new boost cygwin may
have.
…On Tue, Dec 21, 2021 at 06:13:16PM -0800, David McFarland wrote:
I've been trying to get nix working on cygwin for ages. My progress is in #4953.
I didn't have the same luck as you with ucontext: https://cygwin.com/pipermail/cygwin-developers/2021-December/012536.html
I've actually got through all the changes needed to build nix from nixpkgs on cygwin, but it involved a lot of hacks, like the ones from the PR, a modified version of cygwin, etc.
Did you make any more progress?
--
Reply to this email directly or view it on GitHub:
#4360 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
--
(Escriu-me xifrat si saps PGP / Write ciphered if you know PGP)
PGP key 7CBD1DA5 - https://emailselfdefense.fsf.org/
|
I marked this as stale due to inactivity. → More info |
I try to build something that requires a file in the binary cache. It crashes bad, in a way that the program returns 0 so it's undetected by scripts.
In gdb the backtrace at crash point is useless (with set cygwin-exceptions on).
The crash seems realiably to happen in a lstat() call in the thread lambda https://github.com/NixOS/nix/blob/2.3.9/src/libstore/build.cc#L4093
It's "deletePath()" that calls lstat(). It's the first lstat() outside the the main thread - in case it's a cygwin problem. But I tried to reproduce that in a program apart (call lstat from another thread) and all worked fine.
It could be that the code is simply racy and the race goes bad under cygwin. I checked that the 'this' SubstitutionGoal is not destructed before the crash; that part should be fine. SubstitutionGoal::finished() is not called either.
nix 2.0.4 works fine.
The text was updated successfully, but these errors were encountered: