Cygwin error: "-bash: fork: retry: Resource temporarily unavailable"

David C picture David C · Feb 15, 2012 · Viewed 67.3k times · Source

I recently reinstalled Cygwin on my computer in order to get access to several command line elements that I was missing. I have never had previous difficulty with Cygwin, but after this reinstallation, an error message continues to appear after (almost) each command entered. For instance:

-bash-4.1$ wc m1.txt
      3 [main] bash 2216 child_info_fork::abort: data segment start: parent(0x26D000) !=     child(0x38D000)
-bash: fork: retry: Resource temporarily unavailable
2013930  4027950 74968256 m1.txt

Generally, the command still runs (as seen above), but not always. Occasionally, the 'error' message occurs several times in a row (the initial number "3" will then change to a "4" or "2", notably if I start a second Cygwin window.

Also, as soon as I start up Cygwin, I get the following message before the prompt:

      3 [main] bash 6140 child_info_fork::abort: data segment start: parent(0x26D000)     != child(0x36D000)
-bash: fork: retry: Resource temporarily unavailable
-bash: fork: Resource temporarily unavailable
-bash-4.1$

At the moment, I am debating whether to uninstall/reinstall Cygwin again or just live with the error messages, but I was curious if there might be an issue that I am unaware of.

Answer

Cody S picture Cody S · Jan 24, 2013

(assuming Cygwin is installed at C:\Cygwin):

  1. Open Task Manager and close any processes that look to be Cygwin related.
  2. Open C:\Cygwin\bin in Windows Explorer
  3. Verify that dash.exe, ash.exe, rebase.exe, and rebaseall exist in this folder
    • If any of them are missing, re-run Cygwin setup and select the dash, ash, and rebase packages
  4. right-click your C:\Cygwin folder, uncheck Read-only (if its checked), and press OK.
    • When an error about not being able to switch some files comes up, select "Ignore All". Wait for this process to complete.
  5. Browse to C:\Cygwin\bin in Windows Explorer
  6. Right click dash.exe and click "Run as Administrator". A command Prompt should appear with nothing but a $
  7. Type /usr/bin/rebaseall -v, hit enter, and wait for the process to complete.
    • If you get errors about Cygwin processes running, try Step 1 again. If that still doesn't work, Restart your computer into safe mode and try these steps again.
    • A commenter noted that, depending on your settings, you may have to type cd /usr/bin && ./rebaseall -v instead.
  8. Try opening Cygwin again.

This process worked for me. I hope it works for you guys too.

Source: http://cygwin.wikia.com/wiki/Rebaseall