Skip to content
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

fork() function is unimplemented on this machine (NotImplementedError) #5238

Closed
alexbruno opened this issue May 20, 2020 · 5 comments
Closed

Comments

@alexbruno
Copy link

alexbruno commented May 20, 2020

  • Your Windows build number:
    Microsoft Windows [versão 10.0.18363.836] (Windows 10 Pro v1909)

  • What you're doing and what's happening?
    Resp.: I'm running a Ruby on Rails server app inside WSL Ubuntu 20.04 LTS. Not my code, I'm running an API from my job team to develop the frontend. When I was running the same API inside a Multipass instance it just worked.
    Ruby : 2.5.1
    Rails : 5.2.2

  • What's wrong / what should be happening instead?
    Resp.: It's expected the Rails server works, but it breaks with this message:
    fork() function is unimplemented on this machine (NotImplementedError)

  • Strace of the failing command, if applicable.
    Gist : https://gist.github.com/alexbruno/a8def6b8d8e7a4046fdec80fa6c132a3

  • For WSL launch issues, please collect detailed logs.
    WSL Launch is OK.

@therealkenc
Copy link
Collaborator

therealkenc commented May 20, 2020

Appreciate the strace log. Unfortunately it appears to be cut off (possibly?). Obv fork() is implemented, but it isn't too unusual for a failpath to go off the (cough) rails and get confused. There is no ENOSYS in the logs, also (worse) no "function is unimplemented" string to guess the place it goes south.

Rails in general works (plenty of folks use ruby/rails on WSL1) so whatever it is, the problem is probably going to be specific to your scenario. No repro provided so that's about as far as this one can go. Following up with a minimal repro from semi-clean distro condition would probably identify the fail, but you'll probably get better eyeballs wherever Rail people hang out.

@alexbruno
Copy link
Author

Sorry, I can't provide more info about this now!
It blocked my job, so I dropped Windows and turn my machine a full Ubuntu SO.
And the same code just works inside a full Ubuntu environment with no changes.

@alexbruno
Copy link
Author

Great! I came here with good news.
I installed Windows 10 on my laptop again after last update that brings WSL 2.
And with WSL 2 Ubuntu 20.04 setup for my development enviroment the same code works.
It's running OK now.
Thanks for trying help me before @therealkenc !

@GaboFDC
Copy link

GaboFDC commented Jul 24, 2020

Hey, I'm getting the same issue. I'm under WSL 2, win 10 build 2004.
I get the error trying to run the workers, they use the sneakers gem.
Here is the full out:

 $ bin/workers
Traceback (most recent call last):
        4: from bin/workers:5:in `<main>'
        3: from /home/wsl-unix-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sneakers-2.11.0/lib/sneakers/spawner.rb:16:in `spawn'
        2: from /home/wsl-unix-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sneakers-2.11.0/lib/sneakers/spawner.rb:16:in `each'
        1: from /home/wsl-unix-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sneakers-2.11.0/lib/sneakers/spawner.rb:19:in `block in spawn'
/home/wsl-unix-user/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sneakers-2.11.0/lib/sneakers/spawner.rb:19:in `fork': fork() function is unimplemented on this machine (NotImplementedError)

@TildaDares
Copy link

I have the same issue too when trying to test my app with minintest. I'm using a WSL2 Ubuntu 20.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants