public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [1.7] rebaseall doesn't solve the problem
@ 2009-02-21  2:27 Charles Wilson
  2009-02-24 10:06 ` Corinna Vinschen
  0 siblings, 1 reply; 43+ messages in thread
From: Charles Wilson @ 2009-02-21  2:27 UTC (permalink / raw)
  To: Cygwin Mailing List

For the last several days I have been having a terrible time with the old

      2 [main] perl 3620 C:\cygwin-1.7\bin\perl.exe: *** fatal error -
unable to remap
C:\cygwin-1.7\lib\perl5\5.10\i686-cygwin\auto\Cwd\Cwd.dll to same
address as parent(0x860000) != 0x14E0000
      5 [main] perl 3636 child_info::sync: wait failed, pid 3620, Win32
error 183
    418 [main] perl 3636 fork: child 3620 - died waiting for dll
loading, errno 11


issue.  It's being triggered when running the autotools (so the libtool
testsuite is a nightmare, as is trying to package anything using cygport
for 1.7) -- and the culprit is ALWAYS Cwd.dll. I've tried rebasing to
various addresses (0x70000000, 0x68000000, 0x6500000) but to no avail.

Using process explorer, I find that for SOME reason, even in the parent
perl, the Cwd.dll (one of the DLLs shipped with perl, in
/usr/lib/perl5/5.10/i686-pc-cygwin/auto/Cwd/Cwd.dll) is being loaded in
a strange location:

Image Base: 0x5d6a0000
Location in Parent: 0x00860000
Location in Child : 0x014E0000

I can't see that there is any conflict at the image base location of
0x5d6a0000, so I'm not sure why, in the parent, Cwd.dll was loaded that
low.  However, the low memory region is rife with conflict, and in fact,
in the child:

C:\Windows\system32\locale.nls
image base: 0x0
mapped location: 0x00960000
mapped size:     0x0037F000

which means that locale.nls extends all the way down to 0x005E1000, so
Cwd.dll can't go at 0x00860000.

Rebasing won't solve this problem, because Cwd.dll is NOT being loaded
at the rebased (0x5d6a0000) location even tho, as far as I can tell,
there is no conflict there. Instead, it's being loaded at a traffic
heavy location for no good reason that I can see -- and I keep getting
hit by passing cars.

Help?

--
Chuck

PS. The full output of sysinternal's listdll for the parent (first) and
child (second) is below. But first: in the parent, there are three items
that have an image base of 0x0, so they are "relocated", in addition to
Cwd.dll:

name         mapped to   mapped size   image base
locale.nls   0x19990000  0x0037f000    0x0
locale.nls   0x00a10000  0x0037f000    0x0
oleaccrc.dll 0x008d0000  0x00001000    0x0
Cwd.dll      0x00860000  0x00008000    0x5d6a0000

In the (partially loaded) child, there is as yet only one copy of
locale.nls loaded, and the Cwd.dll that are relocated from their actual
image base:

name         mapped to   mapped size   image base
locale.nls   0x00960000  0x0037f000    0x0
Cwd.dll      0x014e0000  0x00008000    0x5d6a0000

In each case, all of the other dlls are loaded at their actual image
base and are not relocated.



ListDLLs v2.25 - DLL lister for Win9x/NT
Copyright (C) 1997-2004 Mark Russinovich
Sysinternals - www.sysinternals.com

------------------------------------------------------------------------------
perl.exe pid: 4948
Command line: C:\cygwin-1.7\bin\perl.exe -w /usr/bin/autom4te-2.63
--language=m4sh -B libltdl/config libltdl/config/ltmain.m4sh

  Base        Size      Version	        Path
  0x52060000  0x8000                    C:\cygwin-1.7\bin\perl.exe
  0x77a80000  0x127000  6.00.6001.18000  C:\Windows\system32\ntdll.dll
  0x763a0000  0xdb000   6.00.6001.18000  C:\Windows\system32\kernel32.dll
  0x61000000  0x300000  1007.00.0000.0000  C:\cygwin-1.7\bin\cygwin1.dll
  0x76c10000  0xc6000   6.00.6001.18000  C:\Windows\system32\ADVAPI32.DLL
  0x76ab0000  0xc2000   6.00.6001.18051  C:\Windows\system32\RPCRT4.dll
  0x5d760000  0x184000                  C:\cygwin-1.7\bin\cygperl5_10.dll
  0x64ed0000  0x7000                    C:\cygwin-1.7\bin\cygcrypt-0.dll
  0x75630000  0x3b000   6.00.6001.18000  C:\Windows\system32\rsaenh.dll
  0x77c10000  0xaa000   7.00.6001.18000  C:\Windows\system32\msvcrt.dll
  0x5d680000  0xd000
C:\cygwin-1.7\lib\perl5\5.10\i686-cygwin\auto\Data\Dumper\Dumper.dll
  0x5d050000  0x9000
C:\cygwin-1.7\lib\perl5\5.10\i686-cygwin\auto\IO\IO.dll
  0x5d130000  0x7000
C:\cygwin-1.7\lib\perl5\5.10\i686-cygwin\auto\Fcntl\Fcntl.dll
  0x5cee0000  0x1c000
C:\cygwin-1.7\lib\perl5\5.10\i686-cygwin\auto\POSIX\POSIX.dll
  0x00860000  0x8000
C:\cygwin-1.7\lib\perl5\5.10\i686-cygwin\auto\Cwd\Cwd.dll
  0x76130000  0x2c000   6.00.6001.18000  C:\Windows\system32\apphelp.dll
  0x73fd0000  0x32000   6.00.6001.18000  C:\Windows\system32\winmm.dll
  0x76300000  0x9d000   6.00.6001.18000  C:\Windows\system32\USER32.dll
  0x76780000  0x4b000   6.00.6001.18159  C:\Windows\system32\GDI32.dll
  0x76480000  0x144000  6.00.6001.18000  C:\Windows\system32\ole32.dll
  0x767d0000  0x8d000   6.00.6001.18000  C:\Windows\system32\OLEAUT32.dll
  0x74680000  0x39000   4.02.5406.0000  C:\Windows\system32\OLEACC.dll
  0x76760000  0x1e000   6.00.6001.18000  C:\Windows\system32\IMM32.DLL
  0x76d10000  0xc8000   6.00.6001.18000  C:\Windows\system32\MSCTF.dll
  0x77cd0000  0x9000    6.00.6001.18000  C:\Windows\system32\LPK.DLL
  0x768e0000  0x7d000   1.626.6001.18000  C:\Windows\system32\USP10.dll
  0x6c1b0000  0x5000    8.00.0000.0223  C:\Windows\system32\avgrsstx.dll
------------------------------------------------------------------------------
perl.exe pid: 3620
Command line: C:\cygwin-1.7\bin\perl.exe

  Base        Size      Version	        Path
  0x52060000  0x8000                    C:\cygwin-1.7\bin\perl.exe
  0x77a80000  0x127000  6.00.6001.18000  C:\Windows\system32\ntdll.dll
  0x763a0000  0xdb000   6.00.6001.18000  C:\Windows\system32\kernel32.dll
  0x61000000  0x300000  1007.00.0000.0000  C:\cygwin-1.7\bin\cygwin1.dll
  0x76c10000  0xc6000   6.00.6001.18000  C:\Windows\system32\ADVAPI32.DLL
  0x76ab0000  0xc2000   6.00.6001.18051  C:\Windows\system32\RPCRT4.dll
  0x5d760000  0x184000                  C:\cygwin-1.7\bin\cygperl5_10.dll
  0x64ed0000  0x7000                    C:\cygwin-1.7\bin\cygcrypt-0.dll
  0x5d680000  0xd000
C:\cygwin-1.7\lib\perl5\5.10\i686-cygwin\auto\Data\Dumper\Dumper.dll
  0x5d050000  0x9000
C:\cygwin-1.7\lib\perl5\5.10\i686-cygwin\auto\IO\IO.dll
  0x5d130000  0x7000
C:\cygwin-1.7\lib\perl5\5.10\i686-cygwin\auto\Fcntl\Fcntl.dll
  0x5cee0000  0x1c000
C:\cygwin-1.7\lib\perl5\5.10\i686-cygwin\auto\POSIX\POSIX.dll
  0x014e0000  0x8000
C:\cygwin-1.7\lib\perl5\5.10\i686-cygwin\auto\Cwd\Cwd.dll



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 43+ messages in thread
* Re: [1.7] rebaseall doesn't solve the problem
@ 2009-04-09  3:18 Jonathan
  0 siblings, 0 replies; 43+ messages in thread
From: Jonathan @ 2009-04-09  3:18 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1379 bytes --]

I've read the entire thread here
http://cygwin.com/ml/cygwin/2009-02/msg00488.html and it seems to be the
exact same problem I'm having.  Discussion seems to have stopped though,
I didn't seem any emails on it for the last three weeks or so.  Is this
fix or tool ready for end users, or testers?  I've seen this rebase
issue on Vista with both Perl and Python.

Thanks,
Jonathan

[Below was written before reading the thread linked above]

cygcheck output is attached minus the registry information, cygcheck
seems to go into an endless loop on 64bit Vista when dumping registry
information.

I'm trying to run the django test server on a new created project with a
trunk checkout of django.  I have updated cygwin to the latest version
and reinstalled python as well.

% python manage.py runserver
     90 [main] python 3852 C:\cygwin\bin\python.exe: *** fatal error -
unable to remap C:\cygwin\bin\cygssl-0.9.8.dll to same address as
parent(0x6B4A0000) != 0x6B4B0000
      2 [main] python 5732 fork: child 3852 - died waiting for dll
loading, errno 11

% python manage.py runserver
      2 [main] python 6664 C:\cygwin\bin\python.exe: *** fatal error -
unable to remap C:\cygwin\bin\cygssl-0.9.8.dll to same address as
parent(0x6B4A0000) != 0x6B4B0000
      3 [main] python 6748 fork: child 6664 - died waiting for dll
loading, errno 11

Any help is much appreciated,
Jonathan

[-- Attachment #2: cygcheck.out --]
[-- Type: text/plain, Size: 4590 bytes --]


Cygwin Configuration Diagnostics
Current System Time: Wed Apr 08 21:03:18 2009

Windows Vista Ultimate Ver 6.0 Build 6001 Service Pack 1

Running under WOW64 on AMD64

Path:	C:\j2sdk1.4.2_06\bin
	.\
	C:\cygwin\usr\local\bin
	C:\cygwin\bin
	C:\cygwin\bin
	.\
	C:\cygwin\bin
	C:\cygwin\usr\X11R6\bin
	C:\cygwin\usr\X11R6\bin
	C:\cygwin\usr\X11R6\bin
	C:\cygwin\home\Jonathan\bin

Output from c:\cygwin\bin\id.exe (nontsec)
UID: 1000(Jonathan) GID: 513(None)
0(root)             544(Administrators) 545(Users)          513(None)
10545(Users)

Output from c:\cygwin\bin\id.exe (ntsec)
UID: 1000(Jonathan) GID: 513(None)
0(root)             544(Administrators) 545(Users)          513(None)
10545(Users)

SysDir: C:\Windows\system32
WinDir: C:\Windows

HOME = '/home/Jonathan'
PWD = '/cygdrive/c/Users/Jonathan/Desktop'
USER = 'jonathan'
MAKE_MODE = 'unix'

!:: = '::\'
!C: = 'C:\'
!ExitCode = '00000000'
ALLUSERSPROFILE = 'C:\ProgramData'
APPDATA = 'C:\Users\Jonathan\AppData\Roaming'
COMMONPROGRAMFILES = 'C:\Program Files (x86)\Common Files'
CommonProgramFiles(x86) = 'C:\Program Files (x86)\Common Files'
CommonProgramW6432 = 'C:\Program Files\Common Files'
COMPUTERNAME = 'SAGER9262'
COMSPEC = 'C:\Windows\system32\cmd.exe'
configsetroot = 'C:\Windows\ConfigSetRoot'
CYGWIN_ROOT = '\cygwin'
DFSTRACINGON = 'FALSE'
DISPLAY = '127.0.0.1:0.0'
FP_NO_HOST_CHECK = 'NO'
HOMEDRIVE = 'C:'
HOMEPATH = '\Users\Jonathan'
LOCALAPPDATA = 'C:\Users\Jonathan\AppData\Local'
LOGONSERVER = '\\SAGER9262'
NUMBER_OF_PROCESSORS = '4'
OS = 'Windows_NT'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC'
PROCESSOR_ARCHITECTURE = 'x86'
PROCESSOR_ARCHITEW6432 = 'AMD64'
PROCESSOR_IDENTIFIER = 'Intel64 Family 6 Model 23 Stepping 7, GenuineIntel'
PROCESSOR_LEVEL = '6'
PROCESSOR_REVISION = '1707'
ProgramData = 'C:\ProgramData'
PROGRAMFILES = 'C:\Program Files (x86)'
ProgramFiles(x86) = 'C:\Program Files (x86)'
ProgramW6432 = 'C:\Program Files'
PROMPT = '$P$G'
PUBLIC = 'C:\Users\Public'
RUN = '\cygwin\bin\run -p /usr/X11R6/bin'
SESSIONNAME = 'Console'
SYSTEMDRIVE = 'C:'
SYSTEMROOT = 'C:\Windows'
TERM = 'xterm'
TRACE_FORMAT_SEARCH_PATH = '\\NTREL202.ntdev.corp.microsoft.com\34FB5F65-FFEB-4B61-BF0E-A6A76C450FAA\TraceFormat'
USERDOMAIN = 'SAGER9262'
USERNAME = 'jonathan'
USERPROFILE = 'C:\Users\Jonathan'
WINDIR = 'C:\Windows'
XAPPLRESDIR = '/usr/X11R6/lib/X11/app-defaults'
XCMSDB = '/usr/X11R6/lib/X11/Xcms.txt'
XKEYSYMDB = '/usr/X11R6/lib/X11/XKeysymDB'
XNLSPATH = '/usr/X11R6/lib/X11/locale'
WINDOWID = '2097190'
XTERM_VERSION = 'Cygwin 6.8.99.903(242)'
XTERM_LOCALE = 'C'
LOGNAME = 'jonathan'
TERMCAP = 'xterm-r6|xterm|xterm X11R6 version:am:km:mi:ms:xn:co#145:it#8:li#53:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:ae=^O:al=\E[L:as=^N:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:dl=\E[M:do=^J:ei=\E[4l:ho=\E[H:im=\E[4h:is=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:kI=\E[2~:kN=\E[6~:kP=\E[5~:kd=\EOB:ke=\E[?1l\E>:kh=\E[1~:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:ku=\EOA:le=^H:md=\E[1m:me=\E[m:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:ta=^I:te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:ue=\E[m:up=\E[A:us=\E[4m:kb=\010:'
XTERM_SHELL = '/usr/bin/tcsh'
HOSTTYPE = 'i386-cygwin'
VENDOR = 'intel'
OSTYPE = 'cygwin'
MACHTYPE = 'i386'
SHLVL = '1'
GROUP = 'None'
HOST = 'SAGER9262'
REMOTEHOST = '127.0.0.1'
MANPATH = ':/usr/ssl/man'
PKG_CONFIG_PATH = '/usr/X11R6/lib/pkgconfig'
SHELL = '/bin/tcsh'
PAGER = 'less'
BLOCKSIZE = 'K'

Use '-r' to scan registry

obcaseinsensitive set to 1

c:  hd  NTFS     51200Mb  89% CP CS UN PA FC     
d:  cd             N/A    N/A                    
e:  hd  NTFS    238472Mb  91% CP CS UN PA FC     SimpleDrive
f:  cd             N/A    N/A                    
q:  hd  NTFS    202840Mb  87% CP CS UN PA FC     
r:  hd  NTFS    305242Mb  85% CP CS UN PA FC     

c:\cygwin      /          system  binmode
C:\cygwin\bin  /usr/bin   system  binmode
C:\cygwin\lib  /usr/lib   system  binmode
.              /cygdrive  user    binmode,cygdrive

Found: C:\cygwin\bin\awk.exe
Found: C:\cygwin\bin\awk.exe
Found: C:\cygwin\bin\awk.exe
 -> C:\cygwin\bin\gawk.exe
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cp.exe
Found: C:\cygwin\bin\cp.exe
Found: C:\cygwin\bin\cp.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\cpp.exe


[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 43+ messages in thread
* Re: [1.7] rebaseall doesn't solve the problem
@ 2009-04-09  3:55 Charles Wilson
  0 siblings, 0 replies; 43+ messages in thread
From: Charles Wilson @ 2009-04-09  3:55 UTC (permalink / raw)
  To: cygwin

Jonathan wrote:
> I've read the entire thread here
> http://cygwin.com/ml/cygwin/2009-02/msg00488.html and it seems to be the
> exact same problem I'm having.  Discussion seems to have stopped though,
> I didn't seem any emails on it for the last three weeks or so.  Is this
> fix or tool ready for end users, or testers?  I've seen this rebase
> issue on Vista with both Perl and Python.

rebase-3.0-2 was announced here:
http://cygwin.com/ml/cygwin/2009-04/msg00174.html
and it includes the new peflags tool and peflagsall script.

However...

I've found that setting the ASLR flag on the DLLs *helps* on Vista --
but doesn't always work.  Sometimes I'll still get the "fatal error -
unable to remap" issue. This usually happens when:

1) The computer has recently hibernated
2) And I'm doing a TON of perl stuff with lots of fork/execs (e.g.
autoreconf).

It usually fixes itself if you reboot.  This allows Vista to re-allocate
the random base addresses, AND actually obey them.  It's as if it
"forgets" about ASLR after hibernation.

--
Chuck

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2009-04-09  3:18 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-21  2:27 [1.7] rebaseall doesn't solve the problem Charles Wilson
2009-02-24 10:06 ` Corinna Vinschen
2009-02-27 21:22   ` Charles Wilson
2009-02-28 10:43     ` Corinna Vinschen
2009-02-28 18:50       ` Charles Wilson
2009-02-28 19:34         ` Matt Wozniski
2009-02-28 19:51         ` Christopher Faylor
2009-02-28 20:04           ` Charles Wilson
2009-02-28 20:29           ` Corinna Vinschen
2009-02-28 21:30             ` Charles Wilson
2009-03-01  9:47               ` Corinna Vinschen
2009-03-01 10:05                 ` Corinna Vinschen
2009-03-02 12:08             ` Corinna Vinschen
2009-03-02 15:14               ` Charles Wilson
2009-03-03  1:45                 ` Dave Korn
2009-03-03  2:06                   ` Charles Wilson
2009-03-03  2:44                     ` Dave Korn
2009-03-03 14:31                       ` Dave Korn
2009-03-03  4:28                   ` Christopher Faylor
2009-03-03  4:51                     ` Dave Korn
2009-03-03  5:07                       ` Christopher Faylor
2009-03-03  5:46                         ` Dave Korn
2009-02-28 20:16         ` Corinna Vinschen
2009-02-28 21:19           ` Charles Wilson
2009-03-01 10:20             ` Corinna Vinschen
2009-03-02  3:52               ` Charles Wilson
2009-03-04  6:00               ` Charles Wilson
2009-03-04  6:01                 ` Charles Wilson
2009-03-04  8:49                   ` Corinna Vinschen
2009-03-04 11:19                     ` Corinna Vinschen
2009-03-04 14:59                       ` Charles Wilson
2009-03-04 15:30                         ` Corinna Vinschen
2009-03-05  3:39                           ` peflags utility [Was: Re: [1.7] rebaseall doesn't solve the problem] Charles Wilson
2009-03-05  3:55                             ` Dave Korn
2009-03-16  6:33                             ` peflags utility Charles Wilson
2009-03-16 12:43                               ` Corinna Vinschen
2009-03-17  6:49                               ` Charles Wilson
2009-03-10  0:30               ` [1.7] rebaseall doesn't solve the problem Matthew Woehlke
2009-03-10 13:34                 ` Charles Wilson
2009-03-10 18:39                   ` Matthew Woehlke
2009-03-11  3:55                   ` ABCD
2009-04-09  3:18 Jonathan
2009-04-09  3:55 Charles Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).