On Wed, 27 Jun 2007, Corinna Vinschen wrote:
> On Jun 27 09:22, Brian Ford wrote:
> > On Wed, 27 Jun 2007, Corinna Vinschen wrote:
> > > On Jun 22 12:16, Brian Ford wrote:
> > > > On Wed, 6 Jun 2007, Brian Ford wrote:
> > > > > 6 [main] ? (1584) C:\cygwin\bin\make.exe: *** fatal error -
> > > > > couldn't
> > > > > allocate heap, Win32 error 487, base 0x680000, top 0x6B0000,
> > > > > reserve_size
> > > > > 192512, allocsize 196608, page_const 4096
> > > > > 585603 [main] make 1736 fork: child -1 - died waiting for longjmp
> > > > > before
> > > > > initialization, retry 0, exit code 0x100, errno 11
> > > >[...]
> > > > I'm pretty sure I've identified the change, but I don't see any
> > > > obvious cause. Corinna, do you have any suggestions about where
> > > > to target or how to specifically dig deeper? Thanks.
> > > >
> > > > http://cygwin.com/ml/cygwin-cvs/2007-q1/msg00139.html
> > >
> > > I can't reproduce this problem on XP,
> > >
> > > Or, did you try if setting the heap_slop_in_mb registry value to some
> > > different value (default 0 up to XP, 4 since 2K3) helps?
> >
> > I'll give it a try, but I guess I'd like to find out what the conflict is.
> > Any tips on how to catch this in the debugger or if inserting some sort of
> > vitual query would be informative?
>
> Not really, except for the obvious. Try to find out what already uses
> the address area which is used as heap in the parent
I attained the following output from the attached patch:
7 [main] ? (4876) heap_init: baseAddr: 0x680000
171 [main] ? (4876) heap_init: allocBase: 0x670000
347 [main] ? (4876) heap_init: allocProt: 0x20
425 [main] ? (4876) heap_init: regionSize:0xA7000
502 [main] ? (4876) heap_init: state: 0x1000
614 [main] ? (4876) heap_init: protect: 0x20
693 [main] ? (4876) heap_init: type: 0x40000
778 [main] ? (4876) C:\cygwin\bin\make.exe: *** fatal error - couldn't
allocate heap, Win32 error 487, base 0x680000, top 0x6B0000, reserve_size
192512, allocsize 196608, page_const 4096
I know this isn't much to go on, but just in case...
>, and perhaps why.
I really wish I had more than a few minutes a week to spend on this :-(.
Perhaps then I'll be able to figure it out.
> You could also try to eliminate any change from
> http://cygwin.com/ml/cygwin-cvs/2007-q1/msg00139.html which is not
> related to your problem, so that only the exact change causing it is
> highlighted. That might give us an idea, hopefully.
You don't have any suggestions for how to best separate the patch into
pieces do you?
--
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...
Index: heap.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/heap.cc,v
retrieving revision 1.54
diff -u -p -r1.54 heap.cc
--- heap.cc 31 Oct 2006 18:41:16 -0000 1.54
+++ heap.cc 17 Jul 2007 19:47:36 -0000
@@ -94,10 +94,30 @@ heap_init ()
break;
}
if (!p && in_forkee && !fork_info->handle_failure (GetLastError ()))
+{
+char *end, *addr;
+
+for (addr = (char *)cygheap->user_heap.base, end = addr + reserve_size; addr <
end; )
+{
+MEMORY_BASIC_INFORMATION info;
+ if ( VirtualQuery(addr, &info, sizeof(info)))
+ {
+ system_printf("baseAddr: 0x%x\n", info.BaseAddress);
+ system_printf("allocBase: 0x%x\n", info.AllocationBase);
+ system_printf("allocProt: 0x%x\n", info.AllocationProtect);
+ system_printf("regionSize:0x%x\n", info.RegionSize);
+ system_printf("state: 0x%x\n", info.State);
+ system_printf("protect: 0x%x\n", info.Protect);
+ system_printf("type: 0x%x\n", info.Type);
+ addr = (char *)info.BaseAddress + info.RegionSize;
+ }
+ else break;
+}
api_fatal ("couldn't allocate heap, %E, base %p, top %p, "
"reserve_size %d, allocsize %d, page_const %d",
cygheap->user_heap.base, cygheap->user_heap.top,
reserve_size, allocsize, page_const);
+}
if (p != cygheap->user_heap.base)
api_fatal ("heap allocated at wrong address %p (mapped) != %p
(expected)", p, cygheap->user_heap.base);
if (allocsize && !VirtualAlloc (cygheap->user_heap.base, allocsize,
MEM_COMMIT, PAGE_READWRITE))
--
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/