Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <01e701c0e3d7$5aa63650$0200a8c0@lifelesswks> From: "Robert Collins" To: "Andrew de Quincey" , References: Subject: core dev member please: Re: Strange fork() behaviour under cygwin v1.3.1 Date: Thu, 24 May 2001 08:26:03 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-OriginalArrivalTime: 23 May 2001 22:18:47.0147 (UTC) FILETIME=[55FC2BB0:01C0E3D6] Chris or another core dev member will need to comment on this. Personally, I'd sugegst trotting off to the pth folk with a bug report. (It works with pthreads and native win32 threads - so pth is the problem). Rob > OK, I am now using 1.3.2 (which didn't help :( > > I've investigated gnu pth a bit more, and it does do some "interesting" > things with the stack when you spawn a new thread (I suppose it would have > to). Could this be confusing cygwin? > > > I've got cygwin compiled and put tracing statements in it. > > A more complete error output from the program is: > > C:\tmp\tmp\install\bin\test.exe: *** 1. unable to allocate heap 0xA010000, > heap_chunk_size 268435456, pid 1568, Win32 error 487 > 0 [main] test 1516 sync_with_child: child 1568(0xB4) died before > initialization with status code 0x1 > 252 [main] test 1516 sync_with_child: *** child state waiting for > longjmp > FORKFAILED > > > > The problem is coming from the DLL init code in dctr0.cc. > > A rough trace to the error is: > > dll_crt0_1() > memory_init() > heap_init() > > > > The error occurs in heap_init() in heap.cc.. in the following: > > char *p; > for (;;) > { > p = (char *) VirtualAlloc (brkbase, reserve_size, > MEM_RESERVE, PAGE_READWRITE); > if (p) > break; > if ((reserve_size -= page_const) <= allocsize) > break; > } > > The VirtualAlloc just returns an error code, 487, which I believe is > "Attempt to access invalid address. " > > As to *why* this is, I have no ideas.. can anyone help? > > > -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple