dll_list::load_after_fork() blues (was Re: [ python-Bugs-489709 ] Building Fails ...)

Jason Tishler jason@tishler.net
Mon Dec 10 04:46:00 GMT 2001


On Sat, Dec 08, 2001 at 10:08:14AM +1100, Robert Collins wrote:
> Yes. There is actually a longer term solution... which is to 'rebase'
> every cygwin linked .dll on a particular system to not conflict with
> each other - which has to be done by setup.exe.

I just tried a hand rebase of my system using the MS supplied rebase
tool to see if this will fix the problem at least for the Python case.
Specifically, I rebased the following DLLs:

    o Python DLL (e.g., libpython2.2.dll)
    o all Python standard shared extension modules (e.g., _socket.dll)
    o all Cygwin DLLs in /usr/bin that match cyg*.dll except for the
      following:

          - cygwin1.dll: since I believe that it relies on being based
            at 0x61000000
          - cygcurl-2.dll: because it gets "whacked" by rebase and
            AFAICT is not used by Python anyway
          - cygtclpip80.dll: because it appears not to be relocatable

Additionally, following the suggestions from the MSDN, I rebased from
0x68000000 down.  So, all of the above DLLs were rebased into the range
of 0x672e0000 - 0x68000000.

After rebasing, the minimal test case that previously exhibited the
problem:

    http://cygwin.com/ml/cygwin/2001-12/msg00419.html

now works fine.

Unfortunately, when I run the complete Python regression test, I still
get the same three test failures as reported by Michael without rebasing:

    test_popen2
    test_pty
    test_socket

When I run these tests individually (i.e., not part of the complete test
suite), then they pass.  Hence, the rebasing appears not to completely
solve this problem.

See the attached snippet of output from a regression test run (and
search for 0x1A).  It shows that although there should not be DLL base
address conflicts, some DLLs are being rebased in the parent anyway.
A few examples are:

    _socket.dll: rebased to 0x67f50000 loaded at 0x1A260000
    cygz.dll:    rebased to 0x678b0000 loaded at 0x1A310000

Would other Python users (with access to MS's rebase tool) be willing
to try to reproduce my findings to eliminate the possibility of cockpit
error on my part?

Does anyone understand why the DLLs are being rebased even though there
theoretically is no chance of a base address conflict anymore?

Thanks,
Jason
-------------- next part --------------
test_popen2
      0 [main] python 648 dll_list::load_after_fork: remap failed for C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\strop.dll with old handle = 0x1A230000, new handle = 0x420000
  97411 [main] python 648 dll_list::load_after_fork: remap failed for C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\readline.dll with old handle = 0x1A340000, new handle = 0x1A790000
 115881 [main] python 648 dll_list::load_after_fork: remap failed twice for C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\readline.dll with old handle = 0x1A340000, new handle = 0x1A790000
 123685 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\libpython2.2.dll handle = 0x675E0000
 123997 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\math.dll handle = 0x675C0000
 124122 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\time.dll handle = 0x67370000
 124742 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\errno.dll handle = 0x67890000
 124875 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\struct.dll handle = 0x673D0000
 125032 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\_codecs.dll handle = 0x67FE0000
 125155 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\strop.dll handle = 0x1A230000
 125473 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\_testcapi.dll handle = 0x67F30000
 125600 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\cStringIO.dll handle = 0x67E70000
 126484 [main] python 648 dll_list::load_after_fork: name = C:\cygwin\bin\cygcrypto.dll handle = 0x67D40000
 126616 [main] python 648 dll_list::load_after_fork: name = C:\cygwin\bin\cygssl.dll handle = 0x67A60000
 126924 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\_socket.dll handle = 0x1A260000
 127044 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\cPickle.dll handle = 0x1A2A0000
 127650 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\binascii.dll handle = 0x67EC0000
 127777 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\termios.dll handle = 0x1A2E0000
 127924 [main] python 648 dll_list::load_after_fork: name = C:\cygwin\bin\cygz.dll handle = 0x1A310000
 128040 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\zlib.dll handle = 0x672E0000
 128337 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\_locale.dll handle = 0x67F80000
 128459 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\pcre.dll handle = 0x67500000
 129262 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\select.dll handle = 0x67430000
 129388 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\regex.dll handle = 0x674B0000
 129694 [main] python 648 dll_list::load_after_fork: name = C:\cygwin\bin\cygncurses5.dll handle = 0x67BB0000
 129814 [main] python 648 dll_list::load_after_fork: name = C:\cygwin\bin\cygreadline5.dll handle = 0x67AB0000
 133807 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\readline.dll handle = 0x1A340000
 133958 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\fcntl.dll handle = 0x67870000
 143197 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\_weakref.dll handle = 0x67F20000
 143353 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\array.dll handle = 0x67F00000
 143780 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\audioop.dll handle = 0x410000
 143907 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\cmath.dll handle = 0x67E50000
 144735 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\crypt.dll handle = 0x67E30000
 144864 [main] python 648 dll_list::load_after_fork: name = C:\cygwin\bin\cyggdbm.dll handle = 0x67D10000
 145173 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\gdbm.dll handle = 0x67840000
 145295 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\grp.dll handle = 0x67830000
 145425 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\md5.dll handle = 0x675A0000
 145541 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\sha.dll handle = 0x67410000
 146303 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\_hotshot.dll handle = 0x640000
 146453 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\parser.dll handle = 0x670000
 146761 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\imageop.dll handle = 0x6B0000
 146880 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\rgbimg.dll handle = 0x67470000
 147536 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\xreadlines.dll handle = 0x6E0000
 147664 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\operator.dll handle = 0x67560000
 147969 [main] python 648 dll_list::load_after_fork: name = C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\mmap.dll handle = 0x700000
C:\home\jtishler\src\PythonCvs\nothreads\python.exe: *** unable to remap C:\home\jtishler\src\PythonCvs\nothreads\build\lib.cygwin-1.3.5-i686-2.2\mmap.dll to same address as parent -- 0x1A790000
      0 [main] python 1628 sync_with_child: child 648(0x1D8) died before initialization with status code 0x1
    225 [main] python 1628 sync_with_child: *** child state child loading dlls
test test_popen2 crashed -- exceptions.OSError: [Errno 11] Resource temporarily unavailable

-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list