This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin-1.7.10-1 fork - address space needed by ... already in use


On Wed, Feb 08, 2012 at 10:27:11AM +0100, Corinna Vinschen wrote:
>> On Feb  8 10:08, Denis Excoffier wrote:
>> > Result is:
>> > 
>> >       1 [main] gcc-4 4084 dll_list::reserve_space: address space needed by 'cygiconv-2.dll' (0x674C0000 with type 1=DLL_LINK) is perhaps already occupied
>> >    1720 [main] gcc-4 4084 dll_list::reserve_space: address space needed by 'cygintl-8.dll' (0x6F5C0000 with type 1=DLL_LINK) is perhaps already occupied
>> >    2085 [main] gcc-4 4084 dll_list::reserve_space: address space needed by 'cygiconv-2.dll' (0x674C0000 with type 2=DLL_LOAD) is perhaps already occupied
>> >    2440 [main] gcc-4 4084 dll_list::reserve_space: address space needed by 'cygintl-8.dll' (0x6F5C0000 with type 2=DLL_LOAD) is perhaps already occupied
>> 
>> So both DLLs are in the list twice at the same spot with only different
>> load types?
>> 
>> Don't be afraid, but I have to ask a difficult question:  Huh?
>> 
>> How did that happen?  And why doesn't that occur on all systems but only
>> on some?!?

I can reproduce.

On my system (2012-02-07 snapshot instrumented), the following is able
to exercise the fork failure any time.

I do this from within a dedicated directory named "stc".
Current shell seems indifferent. Here it is /bin/tcsh and
i've tried with /bin/bash with the same result.

% cat doit1
#!/usr/bin/tcsh -f
setenv PATH "/usr/bin"
cp /usr/bin/cyggcc_s-1.dll .
ls
rm cyggcc_s-1.dll
%
% cat doit2
#!/tmp/tcsh -f
setenv PATH "/usr/bin"
cp /usr/bin/cyggcc_s-1.dll .
ls
rm cyggcc_s-1.dll
%

Also you will need to do (once): cp /usr/bin/tcsh.exe /tmp/tcsh.exe


% ./doit1
cyggcc_s-1.dll  doit1  doit2
%
% ./doit2
      1 [main] tcsh 3660 dll_list::reserve_space: address space needed by 'cygiconv-2.dll' (0x674C0000 with type 1=DLL_LINK)
     97 [main] tcsh 3660 dll_list::reserve_space: address space needed by 'cyggcc_s-1.dll' (0x6BF40000 with type 1=DLL_LINK)
    165 [main] tcsh 3660 dll_list::reserve_space: address space needed by 'cygncurses-10.dll' (0x69580000 with type 1=DLL_LINK)
    231 [main] tcsh 3660 dll_list::reserve_space: address space needed by 'cygcatgets1.dll' (0x70200000 with type 1=DLL_LINK)
    298 [main] tcsh 3660 dll_list::reserve_space: address space needed by 'cyggcc_s-1.dll' (0x6BF40000 with type 2=DLL_LOAD)
    376 [main] tcsh 3660 child_info_fork::abort: address space needed by 'cyggcc_s-1.dll' (0x6BF40000) is already occupied
[in the background, and this order:
- cp /proc/3660/maps /tmp/3660
- kill 3660 from TaskManager (or wait for 3600s)
]
      4 [main] tcsh 1756 fork: child -1 - forked process died unexpectedly, retry 0, exit code 1, errno 11
No more processes.
% cd ..
% rm stc/cyg*
% cd stc
% cat /tmp/3660
00010000-00011000 rw-p 00000000 0000:0000 0                   
00020000-00021000 rw-p 00000000 0000:0000 0                   
00030000-0020B000 ===p 00000000 0000:0000 0                   [stack (tid 3504)]
0020B000-0020C000 rw-g 001DB000 0000:0000 0                   [stack (tid 3504)]
0020C000-00230000 rw-p 001DC000 0000:0000 0                   [stack (tid 3504)]
00230000-00233000 r--s 00000000 0000:0000 0                   
00240000-00244000 rw-p 00000000 0000:0000 0                   
00244000-00340000 ===p 00004000 0000:0000 0                   
00340000-00346000 rw-p 00000000 0000:0000 0                   [win heap 0 default grow]
00346000-00350000 ===p 00006000 0000:0000 0                   [win heap 0 default grow]
00350000-00353000 rw-s 00000000 0000:0000 0                   [win heap 1 grow]
00353000-00360000 ===s 00003000 0000:0000 0                   [win heap 1 grow]
00360000-00376000 r--s 00000000 C095:C492 281474976712054     /cygdrive/d/WINDOWS/system32/unicode.nls
00380000-003C1000 r--s 00000000 C095:C492 281474976713091     /cygdrive/d/WINDOWS/system32/locale.nls
003D0000-003D6000 r--s 00000000 C095:C492 281474976713631     /cygdrive/d/WINDOWS/system32/sorttbls.nls
00400000-00401000 r--p 00000000 C095:C492 22517998136868557   /tmp/tcsh.exe
00401000-00444000 r-xp 00001000 C095:C492 22517998136868557   /tmp/tcsh.exe
00444000-00467000 rw-p 00044000 C095:C492 22517998136868557   /tmp/tcsh.exe
00470000-004B1000 r--s 00000000 C095:C492 281474976713630     /cygdrive/d/WINDOWS/system32/sortkey.nls
004C0000-006BB000 ===p 00000000 0000:0000 0                   [stack (tid 1520)]
006BB000-006BC000 rw-g 001FB000 0000:0000 0                   [stack (tid 1520)]
006BC000-006C0000 rw-p 001FC000 0000:0000 0                   [stack (tid 1520)]
20000000-20070000 rw-p 00000000 0000:0000 0                   [heap]
20070000-38000000 ===p 00070000 0000:0000 0                   [heap]
60FD0000-60FE0000 rw-s 00000000 0000:0000 0                   [procinfo]
60FE0000-60FE9000 rw-s 00000000 0000:0000 0                   [cygwin-user-shared]
60FF0000-60FF6000 rw-s 00000000 0000:0000 0                   [cygwin-shared]
61000000-61001000 r--p 00000000 C095:C492 38280596832707965   /usr/bin/cygwin1.dll
61001000-6117B000 r-xp 00001000 C095:C492 38280596832707965   /usr/bin/cygwin1.dll
6117B000-6117D000 rwxp 0017B000 C095:C492 38280596832707965   /usr/bin/cygwin1.dll
6117D000-6119D000 rw-p 0017D000 C095:C492 38280596832707965   /usr/bin/cygwin1.dll
6119D000-611FC000 r--p 0019D000 C095:C492 38280596832707965   /usr/bin/cygwin1.dll
611FC000-61231000 rw-p 001FC000 C095:C492 38280596832707965   /usr/bin/cygwin1.dll
61231000-6123B000 r--p 00231000 C095:C492 38280596832707965   /usr/bin/cygwin1.dll
6123B000-6123C000 rw-p 0023B000 C095:C492 38280596832707965   /usr/bin/cygwin1.dll
6123C000-61256000 r--p 0023C000 C095:C492 38280596832707965   /usr/bin/cygwin1.dll
61256000-61261000 rw-p 00256000 C095:C492 38280596832707965   /usr/bin/cygwin1.dll
61261000-61262000 r--p 00261000 C095:C492 38280596832707965   /usr/bin/cygwin1.dll
61262000-61470000 rw-p 00262000 C095:C492 38280596832707965   /usr/bin/cygwin1.dll
674C0000-674C1000 r--p 00000000 C095:C492 2251799814315820    /usr/bin/cygiconv-2.dll
674C1000-674D8000 r-xp 00001000 C095:C492 2251799814315820    /usr/bin/cygiconv-2.dll
674D8000-675B8000 rw-p 00018000 C095:C492 2251799814315820    /usr/bin/cygiconv-2.dll
675B8000-675B9000 r--p 000F8000 C095:C492 2251799814315820    /usr/bin/cygiconv-2.dll
675B9000-675BB000 rw-p 000F9000 C095:C492 2251799814315820    /usr/bin/cygiconv-2.dll
675BB000-675BC000 r--p 000FB000 C095:C492 2251799814315820    /usr/bin/cygiconv-2.dll
69580000-69581000 r--p 00000000 C095:C492 1407374884187364    /usr/bin/cygncurses-10.dll
69581000-695A2000 r-xp 00001000 C095:C492 1407374884187364    /usr/bin/cygncurses-10.dll
695A2000-695AF000 rw-p 00022000 C095:C492 1407374884187364    /usr/bin/cygncurses-10.dll
695AF000-695B3000 r--p 0002F000 C095:C492 1407374884187364    /usr/bin/cygncurses-10.dll
695B3000-695B4000 rw-p 00033000 C095:C492 1407374884187364    /usr/bin/cygncurses-10.dll
695B4000-695B5000 r--p 00034000 C095:C492 1407374884187364    /usr/bin/cygncurses-10.dll
6BF40000-6BF41000 r--p 00000000 C095:C492 45035996273718856   /cygdrive/d/Home/dexcoff1/dexcoff1/cygscf/stc/cyggcc_s-1.dll
6BF41000-6BF52000 r-xp 00001000 C095:C492 45035996273718856   /cygdrive/d/Home/dexcoff1/dexcoff1/cygscf/stc/cyggcc_s-1.dll
6BF52000-6BF55000 rw-p 00012000 C095:C492 45035996273718856   /cygdrive/d/Home/dexcoff1/dexcoff1/cygscf/stc/cyggcc_s-1.dll
6BF55000-6BF56000 r--p 00015000 C095:C492 45035996273718856   /cygdrive/d/Home/dexcoff1/dexcoff1/cygscf/stc/cyggcc_s-1.dll
6BF56000-6BF57000 rw-p 00016000 C095:C492 45035996273718856   /cygdrive/d/Home/dexcoff1/dexcoff1/cygscf/stc/cyggcc_s-1.dll
6BF57000-6BF58000 r--p 00017000 C095:C492 45035996273718856   /cygdrive/d/Home/dexcoff1/dexcoff1/cygscf/stc/cyggcc_s-1.dll
70200000-70201000 r--p 00000000 C095:C492 1970324837587761    /usr/bin/cygcatgets1.dll
70201000-70203000 r-xp 00001000 C095:C492 1970324837587761    /usr/bin/cygcatgets1.dll
70203000-70206000 rw-p 00003000 C095:C492 1970324837587761    /usr/bin/cygcatgets1.dll
70206000-70207000 r--p 00006000 C095:C492 1970324837587761    /usr/bin/cygcatgets1.dll
70207000-70208000 rw-p 00007000 C095:C492 1970324837587761    /usr/bin/cygcatgets1.dll
70208000-70209000 r--p 00008000 C095:C492 1970324837587761    /usr/bin/cygcatgets1.dll
7C800000-7C801000 r--p 00000000 C095:C492 562949953454378     /cygdrive/d/WINDOWS/system32/kernel32.dll
7C801000-7C885000 r-xp 00001000 C095:C492 562949953454378     /cygdrive/d/WINDOWS/system32/kernel32.dll
7C885000-7C88A000 rw-p 00085000 C095:C492 562949953454378     /cygdrive/d/WINDOWS/system32/kernel32.dll
7C88A000-7C906000 r--p 0008A000 C095:C492 562949953454378     /cygdrive/d/WINDOWS/system32/kernel32.dll
7C910000-7C911000 r--p 00000000 C095:C492 2533274790880158    /cygdrive/d/WINDOWS/system32/ntdll.dll
7C911000-7C98E000 r-xp 00001000 C095:C492 2533274790880158    /cygdrive/d/WINDOWS/system32/ntdll.dll
7C98E000-7C993000 rw-p 0007E000 C095:C492 2533274790880158    /cygdrive/d/WINDOWS/system32/ntdll.dll
7C993000-7C9C9000 r--p 00083000 C095:C492 2533274790880158    /cygdrive/d/WINDOWS/system32/ntdll.dll
7F6F0000-7F6F7000 r-xs 00000000 0000:0000 0                   
7F6F7000-7F7F0000 ===s 00007000 0000:0000 0                   
7FFB0000-7FFD4000 r--s 00000000 0000:0000 0                   
7FFDD000-7FFDE000 rw-p 00000000 0000:0000 0                   [teb (tid 1520)]
7FFDE000-7FFDF000 rw-p 00000000 0000:0000 0                   [teb (tid 3504)]
7FFDF000-7FFE0000 rw-p 00000000 0000:0000 0                   [peb]
7FFE0000-7FFE1000 r--p 00000000 0000:0000 0                   [shared-user-data]
7FFE1000-7FFF0000 ===p 00001000 0000:0000 0                   
% rm /tmp/3660
%


Hope this helps.


Denis Excoffier.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]