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
[WSL] Errno::ENOMEM #5331
Comments
extended trace
|
seems like spawning out gets broken under WSL - being unable to allocate native memory ;( quite weird |
I do not have WSL handy at the moment but here's some thoughts on this... On Windows normally, we will not use the native process launching logic, because it is not completely rigged up right for Windows APIs and expects more POSIXy environment. Under WSL, I'm not sure what we do. I would think we detect the environment as Linux, which would make us go down the native path since our native exec logic is expected to work. Or we might still go down the Windows path depending on how the platform queries. So the reason this starts failing could be a bug introduced in the exec logic...or it could be that our detection of when to use the native logic has flipped one way or another in 9.2.1. |
@ahorek Got a few minutes to try to bisect this? |
WSL is recognized as Linux, so the native logic should be used. it's definitely a WSL bug in the POSIX#execve function that jruby uses simmilar issue microsoft/WSL#2959 it fails the same way even on jruby 1.7.20 workaround? #5352 also system() or `` works fine this will probably be fixed some day in WSL itself, so feel free to close it. |
proposed work-around looks like it will attempt a sub-sequent |
Right, +1 for checking ENOMEM explicitly. WSL could be detected by uname. |
was hoping for smt lighter like system properties or ENV instead so we do not have to spawn to detect. |
done |
I merged in the related PR. Hopefully some day WSL will be fixed and this can go away. |
originaly reported here rubygems/bundler#6700
I was able to reproduce the problem on a WSL https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux
by running
rails s
command, it fails at this linehttps://github.com/rails/rails/blob/5-2-1/railties/lib/rails/app_loader.rb#L53
there's a workaround
jruby -S rails s
Script
Environment
jruby 9.2.1.0-SNAPSHOT (2.5.0) 2018-09-28 8e6904f Java HotSpot(TM) 64-Bit Server VM 25.181-b13 on 1.8.0_181-b13 +jit [linux-x86_64]
Linux DESKTOP-2POPPQP 4.4.0-17134-Microsoft #285-Microsoft Thu Aug 30 17:31:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
WSL 9.2.0.0 - fails
WSL 9.2.1.0 (master) - fails
WSL MRI 2.5.1 - works
free -h
Linux test 3.16.0-6-amd64 #1 SMP Debian 3.16.57-2 (2018-07-14) x86_64 GNU/Linux
debian 9.2.0.0 - works
debian 9.2.1.0 (master) - works
Expected Behavior
exec Gem.ruby, '-v'
Actual Behavior
exec Gem.ruby, '-v'
it's probably a WSL bug, but anyone has an idea where the actual problem is? how to debug it?
The text was updated successfully, but these errors were encountered: