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: simple test triggers fork errs for me in 5/27 snapshot


On 29 May 2006 12:03, Dave Korn wrote:

  Ok, it's real weird.

> Here's the nonsense command sequence again:
> 
>   cd /tmp;echo -ne '#!/bin/bash -u\nfoo "$@"\n' >bar;chmod +x bar
>   foo() { for f ;do bash -c true ;done ; } ; export -f foo
>   find /usr -print0|xargs -0 ./bar

  I found that it also works just as well to run "find /usr -print0 >
file.txt" first, let it run until it's about half a meg, and then can
reproduce the problem each time with

xargs -a file.txt -0 ./bar.sh

  I managed to get one caught in windbg by putting a breakpoint in the error
message code:

      5 [main] bash 2760 child_info_fork::alloc_stack_hard_way: fork: can't
rese
rve memory for stack 0x23C580 - 0x240000, Win32 error 487

  I really can't understand why it won't let us allocate the memory.  Here's
the surrounding area info from !vadump:

BaseAddress:       00230000
AllocationBase:    00230000
AllocationProtect: 00000002  PAGE_READONLY
RegionSize:        00003000
State:             00001000  MEM_COMMIT
Protect:           00000002  PAGE_READONLY
Type:              00040000  MEM_MAPPED

BaseAddress:       00233000
AllocationBase:    00000000
RegionSize:        0000d000
State:             00010000  MEM_FREE
Protect:           00000001  PAGE_NOACCESS

BaseAddress:       00240000
AllocationBase:    00240000
AllocationProtect: 00000004  PAGE_READWRITE
RegionSize:        00013000
State:             00001000  MEM_COMMIT
Protect:           00000004  PAGE_READWRITE
Type:              00020000  MEM_PRIVATE

  So AFAICT the memory is free and should be allocatable, but it really isn't
going to let us:

0:000>  !address 0x23C580
    00233000 : 00233000 - 0000d000
                    Type     00000000 
                    Protect  00000001 PAGE_NOACCESS
                    State    00010000 MEM_FREE
                    Usage    RegionUsageFree
0:000>  !vprot 0x23C580
BaseAddress:       0023c000
AllocationBase:    00000000
RegionSize:        00004000
State:             00010000  MEM_FREE
Protect:           00000001  PAGE_NOACCESS
0:000> .dvalloc /b 0x23C580 /r 0x00003a80
Allocation failed, Win32 error 487
    "Attempt to access invalid address."
0:000> .dvalloc /b 0x23C580 /r 0x00003a00
Allocation failed, Win32 error 487
    "Attempt to access invalid address."


  Anyone got any good ideas?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
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/


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