Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: docs/cygwin_dll_remapping_failure.md

Issue 1318503005: A batch of docs style fixes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « docs/clang_static_analyzer.md ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Handling repeated failures of rebaseall to allow cygwin remaps 1 # Handling repeated failures of rebaseall to allow cygwin remaps
2 2
3 # Introduction
4
5 Sometimes DLLs over which cygwin has no control get mapped into cygwin 3 Sometimes DLLs over which cygwin has no control get mapped into cygwin
6 processes at locations that cygwin has chosen for its libraries. 4 processes at locations that cygwin has chosen for its libraries.
7 This has been seen primarily with anti-virus DLLs. When this occurs, 5 This has been seen primarily with anti-virus DLLs. When this occurs,
8 cygwin must be instructed during the rebase to avoid the area of 6 cygwin must be instructed during the rebase to avoid the area of
9 memory where that DLL is mapped. 7 memory where that DLL is mapped.
10 8
11 # Background 9 ## Background
12 10
13 Some background for this is available on http://www.dont-panic.cc/capi/2007/10/2 9/git-svn-fails-with-fatal-error-unable-to-remap/ 11 Some background for this is available on
12 http://www.dont-panic.cc/capi/2007/10/29/git-svn-fails-with-fatal-error-unable-t o-remap/
14 13
15 Because of unix fork semantics (presumably), cygwin libraries must be 14 Because of unix fork semantics (presumably), cygwin libraries must be
16 mapped in the same location in both parent and child of a fork. All 15 mapped in the same location in both parent and child of a fork. All
17 cygwin libraries have hints in them as to where they should be mapped 16 cygwin libraries have hints in them as to where they should be mapped
18 in a processes address space; if those hints are followed, each 17 in a processes address space; if those hints are followed, each
19 library will be mapped in the same location in both address spaces. 18 library will be mapped in the same location in both address spaces.
20 However, Windows is perfectly happy mapping a DLL anywhere in the 19 However, Windows is perfectly happy mapping a DLL anywhere in the
21 address space; the hint is not considered controlling. The remapping 20 address space; the hint is not considered controlling. The remapping
22 error occurs when a cygwin process starts and one of its libraries 21 error occurs when a cygwin process starts and one of its libraries
23 cannot be mapped to the location specified by its hint. 22 cannot be mapped to the location specified by its hint.
24 23
25 /usr/bin/rebaseall changes the DLL hints for all of the cygwin 24 /usr/bin/rebaseall changes the DLL hints for all of the cygwin
26 libraries so that there are no inter-library conflicts; it does this 25 libraries so that there are no inter-library conflicts; it does this
27 by choosing a contiguous but not overlapping library layout starting 26 by choosing a contiguous but not overlapping library layout starting
28 at a base address and working down. This process makes sure there are 27 at a base address and working down. This process makes sure there are
29 no intra-cygwin conflicts, but cannot deal with conflicts with 28 no intra-cygwin conflicts, but cannot deal with conflicts with
30 external DLLs that are in cygwin process address spaces 29 external DLLs that are in cygwin process address spaces
31 (e.g. anti-virus DLLs). 30 (e.g. anti-virus DLLs).
32 31
33 To handle this case, you need to figure out what the problematic 32 To handle this case, you need to figure out what the problematic
34 non-cygwin library is, where it is in the address space, and do the 33 non-cygwin library is, where it is in the address space, and do the
35 rebase all so that no cygwin hints map libraries to that location. 34 rebase all so that no cygwin hints map libraries to that location.
36 35
37 # Details 36 ## Details
38 37
39 <ul> 38 * Download the ListDLLs executable from
40 <li>Download the ListDLLs executable from sysinternals<br> 39 [sysinternals](http://technet.microsoft.com/en-us/sysinternals/bb896656.aspx )
41 (<a href='http://technet.microsoft.com/en-us/sysinternals/bb896656.aspx'>http:// technet.microsoft.com/en-us/sysinternals/bb896656.aspx</a>)</li> 40 * Run it as administrator while some cygwin commands are running.
42 <li>Run it as administrator while some cygwin commands are running.</li> 41 * Scan the output for the cygwin process (identifiable by the command) and for
43 <li>Scan the output for the cygwin process (identifiable by the command) and for DLLs in that process that do not look like cygwin DLLs (like an AV). Note the location of those libraries (there will usually only be the one). Pick an addre ss space location lower than its starting address.</li> 42 DLLs in that process that do not look like cygwin DLLs (like an AV). Note
44 <li>Quit all cygwin processes.</li> 43 the location of those libraries (there will usually only be the one).
45 <li>Run a windows command shell as administrator</li> 44 * Pick an address space location lower than its starting address.
46 <li>cd in \cygwin\bin</li> 45 * Quit all cygwin processes.
47 <li>Run "ash /usr/bin/rebaseall -b <base address>" (This command can also take a "-v" flag if you want to see the DLL layout.)</li> 46 * Run a windows command shell as administrator
48 </ul> 47 * cd in \cygwin\bin
49 48 * Run `ash /usr/bin/rebaseall -b <base address>` (This command can also take a
49 `-v` flag if you want to see the DLL layout.)
50 50
51 That should fix the problem. 51 That should fix the problem.
52 52
53 # Failed rebaseall 53 ## Failed rebaseall
54 54
55 If you pick a base address that is too low, you may end up with a broken cygwin install. You can reinstall it by running cygwin's setup.exe again, and on the pa ckage selection page, clicking the "All" entry to Reinstall. You may have to do this twice, as you may get errors on the first reinstall pass. 55 If you pick a base address that is too low, you may end up with a broken cygwin
56 install. You can reinstall it by running cygwin's setup.exe again, and on the
57 package selection page, clicking the "All" entry to Reinstall. You may have to
58 do this twice, as you may get errors on the first reinstall pass.
OLDNEW
« no previous file with comments | « docs/clang_static_analyzer.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698