delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/01/05/12:52:58

X-Spam-Check-By: sourceware.org
Date: Fri, 5 Jan 2007 11:52:20 -0600
From: Brian Ford <Brian DOT Ford AT FlightSafety DOT com>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.0 CVS mmap failure
In-Reply-To: <Pine.CYG.4.58.0701051054010.280@PC1163-8460-XP.flightsafety.com>
Message-ID: <Pine.CYG.4.58.0701051144030.2880@PC1163-8460-XP.flightsafety.com>
References: <Pine DOT CYG DOT 4 DOT 58 DOT 0701041715140 DOT 3520 AT PC1163-8460-XP DOT flightsafety DOT com> <20070105095752 DOT GB28768 AT calimero DOT vinschen DOT de> <Pine DOT CYG DOT 4 DOT 58 DOT 0701050959060 DOT 2704 AT PC1163-8460-XP DOT flightsafety DOT com> <Pine DOT CYG DOT 4 DOT 58 DOT 0701051054010 DOT 280 AT PC1163-8460-XP DOT flightsafety DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Fri, 5 Jan 2007, Brian Ford wrote:
> On Fri, 5 Jan 2007, Brian Ford wrote:
> > Ok, after further investigation, this is a /3GB boot.ini flag interaction.
> > Unfortunately, this is a critical flag for our application, so all our
> > machines are configured this way.  That is why I failed to realize its
> > significance before.
> >
> > I understand if this is now too much of an obscure case for you to be
> > interested in.  If so, I'll try to look into it soon on my own.  I suspect
> > it must have been related to your MEM_TOP_DOWN change.
>
> One more tidbit before I have time to find the real problem.  Compiling
> the test case with -Wl,large-address-aware makes the test pass on a /3GB
> system.

Here is an interesting strace comparison:

Non-/3GB:
 4978   26688 [main] mmaptest 2284 MapViewNT: 7FFA0000 =
NtMapViewOfSection (h:6EC, addr:0, len:28237, off:0, protect:80, type:0)
[snip]
    60   27113 [main] mmaptest 2284 MapViewNT: 7FFA7000 =
NtMapViewOfSection (h:6E8, addr:7FFA7000, len:36864, off:0, protect:80, type:0)
  126   27239 [main] mmaptest 2284 mmap64: 0x7FFA0000 = mmap()

/3GB not large address aware:
  183   22192 [main] mmaptest 2856 MapViewNT: 7FFF0000 =
NtMapViewOfSection (h:6F0, addr:0, len:28237, off:0, protect:80, type:0)
[snip]
   68   22648 [main] mmaptest 2856 MapViewNT: 0 = NtMapViewOfSection
(h:6EC, addr:7FFF7000, len:36864, off:0, protect:80, type:0)
   44   22692 [main] mmaptest 2856 seterrno_from_win_error:
../../../../cygwin/winsup/cygwin/mmap.cc:1707 windows error 487
   46   22738 [main] mmaptest 2856 geterrno_from_win_error: windows error
487 == errno 22
   41   22779 [main] mmaptest 2856 __set_errno: void
seterrno_from_win_error(const char*, int, DWORD):310 val 22
   79   22858 [main] mmaptest 2856 __set_errno: void* mmap64(void*,
size_t, int, int, int, _off64_t):1251 val 12
--- Process 2856, exception C0000008 at 7C90EB74
13337   36195 [main] mmaptest 2856 mmap64: 0xFFFFFFFF = mmap()

/3GB large address aware:
  191   22246 [main] mmaptest 3420 MapViewNT: AEFA0000 =
NtMapViewOfSection (h:6EC, addr:0, len:28237, off:0, protect:80, type:0)
[snip]
   66   22676 [main] mmaptest 3420 MapViewNT: AEFA7000 =
NtMapViewOfSection (h:6E8, addr:AEFA7000, len:36864, off:0, protect:80,
type:0)
  126   22802 [main] mmaptest 3420 mmap64: 0xAEFA0000 = mmap()

The second MapViewNT call is filling out the padding to a 64k boundary.
It appears in the problem case that the system doesn't like the 0x7FFF7000
address.  Any idea why?

-- 
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...



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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019