-
Notifications
You must be signed in to change notification settings - Fork 2
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
RTS ticker thread can cause trouble #3
Comments
Thanks for this report and apologies for the late reply. I have never run into this problem. Maybe it is caused in the scenario when the ticker thread uses signals? I thought that this only happens on old kernels. I would be happy to add a note to the documentation and the place where So a PR would be welcome. |
I think it is the opposite - the signals are fine but less efficient so newer configurations of GHC spawn a separate thread for the ticker. I wish I've had an exact commit where this changed but the test+CI where this started failing wasn't rolling with nixpkgs versions so I would have to bisect a lot and I guess I would arrive at some GHC bump. It also depends on the build environment/configuration so the some GHCs might exhibit this depending on the distro while the exact same version might not elsewhere. I'm mostly using this package for testsuites (in Btw if you have a more elaborate example of unshare and then a subprocess using unshare with multiple mappings that would help me a lot improving the test environment for |
Recently I found that a testsuite using this package started failing with
unshare: invalid argument
but I wasn't sure what was going on as command lineunshare
worked just fine. Comparing both calls I didn't see much difference but then stumbled onclone3
call done by GHC forking a process calledghc_ticker
. The use of ticker seems to depend on compile time options and availability of packages during GHC build.Some more info https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/rts/signals#the-rts-timer-signal
This started manifesting in CI which used latest Ubuntu and on NixOS as well.
The fix is to disable the timer with
From help:
Should we add this to the comments (or README) that already mention issues with
-threaded
?During the debugging I've also extracted the example to separate cabal executable - want a PR? I can also PR a simple testsuite + CI if you want.
The text was updated successfully, but these errors were encountered: