Forums - FAQ: “STATUS_ACCESS_VIOLATION” issue during compilation (on Cygwin under Windows7)

1 post / 0 new
FAQ: “STATUS_ACCESS_VIOLATION” issue during compilation (on Cygwin under Windows7)
brianp
Join Date: 5 Dec 12
Posts: 41
Posted: Thu, 2013-10-10 18:26
There is one common issue, we generally face during compilation where we get “STATUS_ACCESS_VIOLATION” (on Cygwin under Windows7) as below.
This is caused due to permission restrictions imposed by windows 7.
 
"exception::handle: Exception: STATUS_ACCESS_VIOLATION
open_stackdumpfile: Dumping stack trace to xterm.exe.stackdump
fork: child -1 - died waiting for longjmp before initialization, retry 0, exit code 0x600, errno 11
Reason: spawn: fork() failed"
 
To temporarily solve the problem, we can also do in the following way:
Right click on C:\Utils\Cygwin\bin\bash.exe, C:\Utils\Cygwin\bin\sh.exe -> go to compatibility tab -> check ‘Run this program as administrator’
 
To solve this problem in windows 7 permanently, there is some Cygwin maintenance which is not part of Cygwin installation. But, can be done later to resolve it.
This maintenance task is named rebaseall.
Following is the process to resolve it.
1. Modify /bin/rebaseall script: This script needs a minor modification to not fail on 64bits MingW DLLs. Change its line 110 from
sed -e '/cygwin1\.dll$/d' -e '/cyglsa.*\.dll$/d' -e 's/^/\//' >"$TmpFile"
(to)
sed -e '/cygwin1\.dll$/d' -e '/mingw\/bin.\.dll$/d' -e '/cyglsa.\.dll$/d' -e 's/^/\//' >"$TmpFile"
2. Copy /bin/ash.exe to /usr/bin/ash.exe (eventually create the directory if it does not exist).
3. Kill all Cygwin related processes. This also includes any xterm, bash, and even XWin.exe server.
4. Execute /bin/ash.exe
5. In the ash terminal, execute /bin/rebaseall. It should (and has to) execute without any errors, otherwise it will leave your Cygwin install in a very unstable state. Warnings are acceptable though.
If it fails because of a used DLL, an executing Cygwin process, or anything, don’t panic: correct the problem (kill running Cygwin processes if any), and try again.
6. Still in the ash terminal, execute /bin/peflagsall. This should also run without errors, just warnings.
No need to restart, you should have your Cygwin processes running without exceptions.
Above process is the permanent solution to solve the exceptions issue.
  • Up0
  • Down0

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.