public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 1.1.3: mmap() returns unusable memory segments: segm fault
@ 2001-11-05 12:08 Lothar Linhard
  2001-11-05 13:01 ` Corinna Vinschen
  0 siblings, 1 reply; 10+ messages in thread
From: Lothar Linhard @ 2001-11-05 12:08 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 915 bytes --]

Hi,

I run Cygwin 133 on NT4.0SP6 (output of cygcheck -s
is attached).  mmap() doesn't work even for a very
simple case.  Try:

#include <stdio.h>
#include <sys/mman.h>

int main() {
    char* core;

    core = mmap(NULL,0x10000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0);
    if (core == MAP_FAILED) goto err;
    printf("mmap %p\n", core);
    *core = 'A';        /* ok */

    core = mmap(NULL,0x20000,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0);
    if (core == MAP_FAILED) goto err;
    printf("mmap %p\n", core);
    *core = 'A';        /* Segmentation fault */

    return 0;

  err:
    perror("mmap");
    return 1;
}
------------------------- end of test program -----------------
Same, if I use MA_SHARED. Any Help?
When I run this, I get:

mmap 0x1a230000
mmap 0x1a240000
      0 [main] a 126 open_stackdumpfile: Dumping stack trace to a.exe.stackdump Segmentation fault (core dumped)

Lothar.

[-- Attachment #2: cygcheck.out --]
[-- Type: text/x-Algol68, Size: 8610 bytes --]


Cygnus Win95/NT Configuration Diagnostics
Current System Time: Mon Nov  5 20:57:45 2001

WinNT Ver 4.0 build 1381 Service Pack 6

Path:	.
	/cygdrive/h/bin
	/usr/local/bin
	/usr/bin
	/bin
	/cygdrive/c/WINNT/system32
	/cygdrive/c/WINNT
	/cygdrive/c/Program Files/Bitkeeper
	/cygdrive/c/tcltk83/bin
	/cygdrive/c/tools
	/cygdrive/c/tcltk82/bin
	/cygdrive/c/tcltk81/bin
	/cygdrive/c/tcltk80/bin
	/cygdrive/c/PROGRA~1/BITKEE~1
	/cygdrive/c/MSDEV/bin
	/cygdrive/c/Program Files/DevStudio/SharedIDE/bin

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

PWD = `/cygdrive/h/gv2/zdb'
MAKEFLAGS = `--no-print-directory'
USER = `lld'
MAKE_MODE = `unix'
HOME = `/cygdrive/h'

NUMBER_OF_PROCESSORS = `1'
PROMPT = `$P$G'
LOGONSERVER = `\\ERDE'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
COMSPEC = `C:\WINNT\system32\cmd.exe'
!C: = `C:\cygwin\bin'
SYSTEMDRIVE = `C:'
HOSTNAME = `ERDE'
INCLUDE = `c:\msdev\include;c:\msdev\atl\include;c:\msdev\mfc\include;%include%'
PROCESSOR_REVISION = `0803'
MSDEVDIR = `C:\Program Files\DevStudio\SharedIDE'
PATHEXT = `.COM;.EXE;.BAT;.CMD'
COMPUTERNAME = `ERDE'
WINDIR = `C:\WINNT'
USERPROFILE = `C:\WINNT\Profiles\lld'
PS1 = `\h\$ '
HOMESHARE = `\\star\lld'
UID = `52'
MACHTYPE = `i686-pc-cygwin'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 8 Stepping 3, GenuineIntel'
LM_LICENSE_FILE = `1700@Jupiter'
OS = `Windows_NT'
OLDPWD = `/cygdrive/h'
PROCESSOR_ARCHITECTURE = `x86'
TEMP = `/cygdrive/c/TEMP'
SIMUCAD_LICENSE_FILE = `C:\Program Files\Simucad\Silos2001Demo\silos.lic'
EDITOR = `vi'
PROCESSOR_LEVEL = `6'
SYSTEMROOT = `C:\WINNT'
HOMEDRIVE = `\\'
LIB = `c:\msdev\lib;c:\msdev\mfc\lib;%lib%'
SHLVL = `1'
SILOS_HOME = `C:\Program Files\Simucad\Silos2001Demo'
HOMEPATH = `star\lld'
USERDOMAIN = `ERDE'
USERNAME = `lld'
SHELL = `/bin/bash'
HOSTTYPE = `i686'
OSTYPE = `cygwin'
TERM = `cygwin'
CFLAGS = `-g'
PURIFYOPTIONS = `-free-queue-length=1000 -chain-length=12'
ceBoxLicence = `BK99B2J7DI8IF7 2FIEL1655GG2AL 2J2IG9CHF1J88G L941NNILJFFELB'
LC_COLLATE = `C'
_ = `/usr/bin/cygcheck'
TZ = `WEST-1WEDT-2,M3.5.0/2,M10.5.0/3'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/ce
  (default) = `\\star\ce'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/extra
  (default) = `\\star\extra'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/home
  (default) = `C:\home'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/obj
  (default) = `D:\obj'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/tmp
  (default) = `C:\tmp'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `C:\cygwin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `C:/cygwin/bin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `C:/cygwin/lib'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

a:  fd           N/A    N/A                    
c:  hd  NTFS    4008Mb  40% CP CS UN PA FC     System
d:  hd  NTFS   15610Mb  11% CP CS UN PA FC     
e:  cd           N/A    N/A                    
h:  net NTFS    5321Mb  88% CP CS    PA        lld
s:  net NTFS    3124Mb  61% CP CS    PA        ce
x:  net NTFS   33926Mb  48% CP CS    PA        extra

C:\cygwin\bin  /usr/bin  system  binmode
C:\cygwin\lib  /usr/lib  system  binmode
\\star\extra  /extra   user    binmode
C:\cygwin  /        system  binmode
\\star\ce  /ce      user    binmode
C:\home  /home    user    binmode
C:\tmp  /tmp     user    binmode
D:\obj  /obj     user    binmode
c:    /cygdrive/c  user    binmode,noumount
d:    /cygdrive/d  user    binmode,noumount
h:    /cygdrive/h  user    binmode,noumount
s:    /cygdrive/s  user    binmode,noumount
x:    /cygdrive/x  user    binmode,noumount

Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: C:\cygwin\bin\sh.exe

   56k 2000/12/03 C:\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz21.0.dll" v0.0 ts=2000/11/21 0:53
   34k 2001/09/30 C:\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0
                  "cygform6.dll" v0.0 ts=2001/9/30 4:43
   18k 2000/10/23 C:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2000/10/23 4:26
   17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/7 5:34
   21k 2001/06/28 C:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory5.dll" v0.0 ts=2001/6/28 4:27
   21k 2001/06/20 C:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2001/6/20 19:09
   81k 2001/10/20 C:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2001/10/20 2:25
   35k 2001/10/20 C:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2001/10/20 2:25
   45k 2001/07/04 C:\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig1.dll" v0.0 ts=2001/7/4 5:25
  119k 2001/06/06 C:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
                  "cygjpeg6b.dll" v0.0 ts=2001/6/6 6:27
   19k 2001/09/30 C:\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu6.dll" v0.0 ts=2001/9/30 4:43
  175k 2001/09/30 C:\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++6.dll" v0.0 ts=2001/9/30 4:45
  201k 2001/09/30 C:\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses6.dll" v0.0 ts=2001/9/30 4:42
   12k 2001/09/30 C:\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel6.dll" v0.0 ts=2001/9/30 4:43
  163k 2001/05/06 C:\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng2.dll" v0.0 ts=2001/5/6 6:05
  108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/7 5:34
  135k 2001/06/28 C:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline5.dll" v0.0 ts=2001/6/28 4:27
  390k 2001/10/20 C:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2001/10/20 2:24
    5k 2001/10/20 C:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 2001/10/20 C:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2001/10/20 2:24
  245k 2001/06/12 C:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiff3.dll" v0.0 ts=2001/6/12 19:25
  623k 2001/10/20 C:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2001/10/20 2:25
   41k 2001/07/04 C:\cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-noX4.dll" v0.0 ts=2001/7/4 3:21
   45k 2001/07/04 C:\cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-X4.dll" v0.0 ts=2000/11/20 3:45
   49k 2001/02/03 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2001/2/3 21:35
  701k 2001/09/13 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2001/9/13 5:54
    Cygwin DLL version info:
        dll major: 1003
        dll minor: 3
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 46
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Wed Sep 12 23:54:31 EDT 2001
        shared id: cygwin1S3

Use -h to see help about each section

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 1.1.3: mmap() returns unusable memory segments: segm fault
  2001-11-05 12:08 1.1.3: mmap() returns unusable memory segments: segm fault Lothar Linhard
@ 2001-11-05 13:01 ` Corinna Vinschen
  2001-11-05 13:31   ` Christopher Faylor
  2001-11-06  2:16   ` Lothar Linhard
  0 siblings, 2 replies; 10+ messages in thread
From: Corinna Vinschen @ 2001-11-05 13:01 UTC (permalink / raw)
  To: cygwin

On Mon, Nov 05, 2001 at 09:08:01PM +0100, Lothar Linhard wrote:
> Hi,
> 
> I run Cygwin 133 on NT4.0SP6 (output of cygcheck -s
> is attached).  mmap() doesn't work even for a very
> simple case.  Try:

mmap works in many cases, you've just hit a leak.
Unfortunately, this isn't fixed in 1.3.4 now but I've just
checked in the fix in the developers CVS tree.

Thanks for the report and especially for the testcase.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 1.1.3: mmap() returns unusable memory segments: segm fault
  2001-11-05 13:01 ` Corinna Vinschen
@ 2001-11-05 13:31   ` Christopher Faylor
  2001-11-06  2:16   ` Lothar Linhard
  1 sibling, 0 replies; 10+ messages in thread
From: Christopher Faylor @ 2001-11-05 13:31 UTC (permalink / raw)
  To: cygwin

On Mon, Nov 05, 2001 at 10:01:34PM +0100, Corinna Vinschen wrote:
>On Mon, Nov 05, 2001 at 09:08:01PM +0100, Lothar Linhard wrote:
>> Hi,
>> 
>> I run Cygwin 133 on NT4.0SP6 (output of cygcheck -s
>> is attached).  mmap() doesn't work even for a very
>> simple case.  Try:
>
>mmap works in many cases, you've just hit a leak.
>Unfortunately, this isn't fixed in 1.3.4 now but I've just
>checked in the fix in the developers CVS tree.

I just refreshed 1.3.4 with only this change.  So there is now a cygwin-1.3.4-2
on sources.redhat.com.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 1.1.3: mmap() returns unusable memory segments: segm fault
  2001-11-05 13:01 ` Corinna Vinschen
  2001-11-05 13:31   ` Christopher Faylor
@ 2001-11-06  2:16   ` Lothar Linhard
  2001-11-06  2:46     ` Corinna Vinschen
  1 sibling, 1 reply; 10+ messages in thread
From: Lothar Linhard @ 2001-11-06  2:16 UTC (permalink / raw)
  To: Corinna Vinschen

Wow! What a quick respond.  Thank you.
I'll checkout the CVS tree (anoncvs@anoncvs.cygnus.com)
and see if I can compile cygwin.dll and run more mmap
tests.

Is there a list of limitations of Cygwin's mmap?

Lothar.

On Mon, 5 Nov 2001, Corinna Vinschen wrote:

> Date: Mon, 5 Nov 2001 22:01:34 +0100
> From: Corinna Vinschen <cygwin@cygwin.com>
> To: cygwin@cygwin.com
> Subject: Re: 1.1.3: mmap() returns unusable memory segments: segm fault
>
> On Mon, Nov 05, 2001 at 09:08:01PM +0100, Lothar Linhard wrote:
> > Hi,
> >
> > I run Cygwin 133 on NT4.0SP6 (output of cygcheck -s
> > is attached).  mmap() doesn't work even for a very
> > simple case.  Try:
>
> mmap works in many cases, you've just hit a leak.
> Unfortunately, this isn't fixed in 1.3.4 now but I've just
> checked in the fix in the developers CVS tree.
>
> Thanks for the report and especially for the testcase.
>
> Corinna
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Developer                                mailto:cygwin@cygwin.com
> Red Hat, Inc.
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 1.1.3: mmap() returns unusable memory segments: segm fault
  2001-11-06  2:16   ` Lothar Linhard
@ 2001-11-06  2:46     ` Corinna Vinschen
  2001-11-06  4:20       ` Lothar Linhard
  0 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2001-11-06  2:46 UTC (permalink / raw)
  To: cygwin

On Tue, Nov 06, 2001 at 11:16:07AM +0100, Lothar Linhard wrote:
> 
> Wow! What a quick respond.  Thank you.
> I'll checkout the CVS tree (anoncvs@anoncvs.cygnus.com)
> and see if I can compile cygwin.dll and run more mmap
> tests.

Chris has put the patch into 1.3.4-2 which should be on most mirrors
in the meantime.

However, there are already 5 mmap test applications in the testsuite
so you can see what is already tested.  I will probably add your test
as the sixth.

> Is there a list of limitations of Cygwin's mmap?

No.  There are limitations given due to OS restrictions.  E.g. the
addresses for mmaps which are always < 0x80000000 on NT/2K/XP and
always >= 0x80000000 and < 0xc0000000 on 9x/ME which makes the usage
of MAP_FIXED somewhat complicated.  Or the missing VirtualProtect()
on 9x/ME which doesn't allow to force an invalidation of pages after
munmap().  I would suggest to look on http://msdn.microsoft.com into
the description of MapViewOfFileEx() and CreateFileMapping().  Our
mmap() impementation tries to tweak the Win32 calls so that mmap()
behaves as POSIX conformant as possible but it's not easy to find
all border conditions.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 1.1.3: mmap() returns unusable memory segments: segm fault
  2001-11-06  2:46     ` Corinna Vinschen
@ 2001-11-06  4:20       ` Lothar Linhard
  2001-11-06  5:05         ` Corinna Vinschen
  0 siblings, 1 reply; 10+ messages in thread
From: Lothar Linhard @ 2001-11-06  4:20 UTC (permalink / raw)
  To: Corinna Vinschen

[-- Attachment #1: Type: text/plain, Size: 3505 bytes --]

Hi Corinna,

thanks, I've installed 1.3.4-2 and can verify that the problem
is fixed.  I'm still enthusiastic about your response time.

However, here is another problem I have detected:

  UNIX allows to do one unmap on memory space mapped by
  several continous mmaps.  Cygwin's munmap doesnt.  I can
  walk around this limitation, so this is (as far as I'm concerned)
  a low priority request.

Here is my test case:

#include <stdio.h>
#include <sys/types.h>
#include <sys/mman.h>

int main() {
    char* core1;
    char* core2;

    core1 = mmap(NULL,0x10000,PROT_READ|PROT_WRITE,MAP_SHARED|MAP_ANON,-1,0);
    if (core1 == MAP_FAILED) goto mmap_err;
    printf("mmap %p\n", core1);

    core2 = mmap(NULL,0x20000,PROT_READ|PROT_WRITE,MAP_SHARED|MAP_ANON,-1,0);
    if (core2 == MAP_FAILED) goto mmap_err;
    printf("mmap %p\n", core2);

    if (core1 + 0x10000 == core2) {
        printf("merge %p...%p...%p\n", core1, core2, core1+0x30000);
        /* consider core1 as continuous memory of 0x30000 bytes */
        if (munmap(core1, 0x30000) == -1) goto munmap_err;      /* FAIL */
    } else {
        if (munmap(core1, 0x10000) == -1) goto munmap_err;      /* OK */
        if (munmap(core2, 0x20000) == -1) goto munmap_err;
    }
    return 0;

  mmap_err:
    perror("mmap");
    return 1;

  munmap_err:
    perror("munmap");
    return 1;
}

---------------------- end of test case --------------------
On my NT 4.0 SP6 running cygwin 1.3.4-2 (see details attached),
I get:

ERDE$ gcc mtest2.c
ERDE$ ./a.exe
mmap 0x1a230000
mmap 0x1a240000
merge 0x1a230000...0x1a240000...0x1a260000
munmap: Invalid argument


Greetings,
Lothar.



On Tue, 6 Nov 2001, Corinna Vinschen wrote:

> Date: Tue, 6 Nov 2001 11:46:42 +0100
> From: Corinna Vinschen <cygwin@cygwin.com>
> To: cygwin <cygwin@cygwin.com>
> Subject: Re: 1.1.3: mmap() returns unusable memory segments: segm fault
>
> On Tue, Nov 06, 2001 at 11:16:07AM +0100, Lothar Linhard wrote:
> >
> > Wow! What a quick respond.  Thank you.
> > I'll checkout the CVS tree (anoncvs@anoncvs.cygnus.com)
> > and see if I can compile cygwin.dll and run more mmap
> > tests.
>
> Chris has put the patch into 1.3.4-2 which should be on most mirrors
> in the meantime.
>
> However, there are already 5 mmap test applications in the testsuite
> so you can see what is already tested.  I will probably add your test
> as the sixth.
>
> > Is there a list of limitations of Cygwin's mmap?
>
> No.  There are limitations given due to OS restrictions.  E.g. the
> addresses for mmaps which are always < 0x80000000 on NT/2K/XP and
> always >= 0x80000000 and < 0xc0000000 on 9x/ME which makes the usage
> of MAP_FIXED somewhat complicated.  Or the missing VirtualProtect()
> on 9x/ME which doesn't allow to force an invalidation of pages after
> munmap().  I would suggest to look on http://msdn.microsoft.com into
> the description of MapViewOfFileEx() and CreateFileMapping().  Our
> mmap() impementation tries to tweak the Win32 calls so that mmap()
> behaves as POSIX conformant as possible but it's not easy to find
> all border conditions.
>
> Corinna
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Developer                                mailto:cygwin@cygwin.com
> Red Hat, Inc.
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>


[-- Attachment #2: cycheck.out --]
[-- Type: text/x-Algol68, Size: 8914 bytes --]


Cygnus Win95/NT Configuration Diagnostics
Current System Time: Tue Nov  6 13:18:43 2001

WinNT Ver 4.0 build 1381 Service Pack 6

Path:	.
	/h/bin
	/usr/local/bin
	/usr/bin
	/bin
	/c/WINNT/system32
	/c/WINNT
	/c/Program Files/Bitkeeper
	/c/tcltk83/bin
	/c/tools
	/c/tcltk82/bin
	/c/tcltk81/bin
	/c/tcltk80/bin
	/c/PROGRA~1/BITKEE~1
	/c/MSDEV/bin
	/c/Program Files/DevStudio/SharedIDE/bin

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

PWD = `/h/gv2/zdb'
MAKEFLAGS = `--no-print-directory'
USER = `lld'
MAKE_MODE = `unix'
HOME = `/h'

NUMBER_OF_PROCESSORS = `1'
PROMPT = `$P$G'
LOGONSERVER = `\\ERDE'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
COMSPEC = `C:\WINNT\system32\cmd.exe'
!C: = `C:\cygwin\bin'
SYSTEMDRIVE = `C:'
HOSTNAME = `ERDE'
INCLUDE = `c:\msdev\include;c:\msdev\atl\include;c:\msdev\mfc\include;%include%'
PROCESSOR_REVISION = `0803'
MSDEVDIR = `C:\Program Files\DevStudio\SharedIDE'
PATHEXT = `.COM;.EXE;.BAT;.CMD'
COMPUTERNAME = `ERDE'
WINDIR = `C:\WINNT'
USERPROFILE = `C:\WINNT\Profiles\lld'
PS1 = `\h\$ '
HOMESHARE = `\\star\lld'
UID = `52'
MACHTYPE = `i686-pc-cygwin'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 8 Stepping 3, GenuineIntel'
LM_LICENSE_FILE = `1700@Jupiter'
OS = `Windows_NT'
OLDPWD = `/h'
PROCESSOR_ARCHITECTURE = `x86'
TEMP = `/c/TEMP'
SIMUCAD_LICENSE_FILE = `C:\Program Files\Simucad\Silos2001Demo\silos.lic'
EDITOR = `vi'
PROCESSOR_LEVEL = `6'
SYSTEMROOT = `C:\WINNT'
HOMEDRIVE = `H:'
LIB = `c:\msdev\lib;c:\msdev\mfc\lib;%lib%'
SHLVL = `1'
SILOS_HOME = `C:\Program Files\Simucad\Silos2001Demo'
HOMEPATH = `\'
USERDOMAIN = `ERDE'
USERNAME = `lld'
SHELL = `/bin/bash'
HOSTTYPE = `i686'
OSTYPE = `cygwin'
TERM = `cygwin'
CFLAGS = `-g'
PURIFYOPTIONS = `-free-queue-length=1000 -chain-length=12'
ceBoxLicence = `BK99B2J7DI8IF7 2FIEL1655GG2AL 2J2IG9CHF1J88G L941NNILJFFELB'
LC_COLLATE = `C'
_ = `/usr/bin/cygcheck'
TZ = `WEST-1WEDT-2,M3.5.0/2,M10.5.0/3'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/c
  (default) = `C:'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/ce
  (default) = `\\star\ce'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/d
  (default) = `D:'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/extra
  (default) = `\\star\extra'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/h
  (default) = `H:'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/home
  (default) = `C:\home'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/obj
  (default) = `D:\obj'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/s
  (default) = `S:'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/tmp
  (default) = `C:\tmp'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/x
  (default) = `X:'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `C:\cygwin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `C:/cygwin/bin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `C:/cygwin/lib'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

a:  fd           N/A    N/A                    
c:  hd  NTFS    4008Mb  40% CP CS UN PA FC     System
d:  hd  NTFS   15610Mb  11% CP CS UN PA FC     
e:  cd           N/A    N/A                    
h:  net NTFS    5321Mb  88% CP CS    PA        lld
s:  net NTFS    3124Mb  61% CP CS    PA        ce
x:  net NTFS   33926Mb  48% CP CS    PA        extra

C:\cygwin\bin  /usr/bin  system  binmode
C:\cygwin\lib  /usr/lib  system  binmode
\\star\extra  /extra   user    binmode
C:\cygwin  /        system  binmode
\\star\ce  /ce      user    binmode
C:\home  /home    user    binmode
C:\tmp  /tmp     user    binmode
D:\obj  /obj     user    binmode
C:    /c       user    binmode
D:    /d       user    binmode
H:    /h       user    binmode
S:    /s       user    binmode
X:    /x       user    binmode

Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: C:\cygwin\bin\sh.exe

   56k 2000/12/03 C:\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz21.0.dll" v0.0 ts=2000/11/21 0:53
   34k 2001/09/30 C:\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0
                  "cygform6.dll" v0.0 ts=2001/9/30 4:43
   18k 2000/10/23 C:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2000/10/23 4:26
   17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/7 5:34
   21k 2001/06/28 C:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory5.dll" v0.0 ts=2001/6/28 4:27
   21k 2001/06/20 C:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2001/6/20 19:09
   81k 2001/10/20 C:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2001/10/20 2:25
   35k 2001/10/20 C:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2001/10/20 2:25
   45k 2001/07/04 C:\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig1.dll" v0.0 ts=2001/7/4 5:25
  119k 2001/06/06 C:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
                  "cygjpeg6b.dll" v0.0 ts=2001/6/6 6:27
   19k 2001/09/30 C:\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu6.dll" v0.0 ts=2001/9/30 4:43
  175k 2001/09/30 C:\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++6.dll" v0.0 ts=2001/9/30 4:45
  201k 2001/09/30 C:\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses6.dll" v0.0 ts=2001/9/30 4:42
   12k 2001/09/30 C:\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel6.dll" v0.0 ts=2001/9/30 4:43
  163k 2001/05/06 C:\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng2.dll" v0.0 ts=2001/5/6 6:05
  108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/7 5:34
  135k 2001/06/28 C:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline5.dll" v0.0 ts=2001/6/28 4:27
  390k 2001/10/20 C:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2001/10/20 2:24
    5k 2001/10/20 C:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 2001/10/20 C:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2001/10/20 2:24
  245k 2001/06/12 C:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiff3.dll" v0.0 ts=2001/6/12 19:25
  623k 2001/10/20 C:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2001/10/20 2:25
   41k 2001/07/04 C:\cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-noX4.dll" v0.0 ts=2001/7/4 3:21
   45k 2001/07/04 C:\cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-X4.dll" v0.0 ts=2000/11/20 3:45
   49k 2001/02/03 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2001/2/3 21:35
  714k 2001/11/05 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2001/11/5 22:15
    Cygwin DLL version info:
        dll major: 1003
        dll minor: 4
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 47
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Mon Nov 5 16:15:15 EST 2001
        shared id: cygwin1S3

Use -h to see help about each section

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 1.1.3: mmap() returns unusable memory segments: segm fault
  2001-11-06  4:20       ` Lothar Linhard
@ 2001-11-06  5:05         ` Corinna Vinschen
  2001-12-20 10:57           ` Lothar Linhard
  0 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2001-11-06  5:05 UTC (permalink / raw)
  To: cygwin

On Tue, Nov 06, 2001 at 01:20:30PM +0100, Lothar Linhard wrote:
> Hi Corinna,
> 
> thanks, I've installed 1.3.4-2 and can verify that the problem
> is fixed.  I'm still enthusiastic about your response time.
> 
> However, here is another problem I have detected:
> 
>   UNIX allows to do one unmap on memory space mapped by
>   several continous mmaps.  Cygwin's munmap doesnt.  I can

It does as long as either the mapped object is a real file or
in case of anonymous mapping the mapped mem space consists of
fractions of 64K.  In your example, the mem space is just too big
to allow that behaviour in the current implementation.  It's
probably possible to get your testcase working as well.  The mem
objects are maintained in a linked list.   The whole stuff
is in mmap.cc in the cygwin sources.  Feel free to send a patch.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 1.1.3: mmap() returns unusable memory segments: segm fault
  2001-11-06  5:05         ` Corinna Vinschen
@ 2001-12-20 10:57           ` Lothar Linhard
  2001-12-20 13:02             ` Corinna Vinschen
  2001-12-21 12:59             ` Lothar Linhard
  0 siblings, 2 replies; 10+ messages in thread
From: Lothar Linhard @ 2001-12-20 10:57 UTC (permalink / raw)
  To: Corinna Vinschen

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1376 bytes --]

Hi Corinna,

With cygwin's mmap.cc I guess, I cannot map more than 197 MB ?!
Is that correct?

In my application I always call mmap(NULL,size,PROT_RW,...)
here is what I get:
mmap segment[0]: 0x202d0000...0x202dffff = 64 kB
mmap segment[1]: 0x202e0000...0x202effff = 64 kB
mmap segment[2]: 0x202f0000...0x2030ffff = 128 kB
mmap segment[3]: 0x20310000...0x2034ffff = 256 kB
mmap segment[4]: 0x20350000...0x203cffff = 512 kB
mmap segment[5]: 0x209d0000...0x20acffff = 1024 kB
mmap segment[6]: 0x20ad0000...0x20ccffff = 2048 kB
mmap segment[7]: 0x20cd0000...0x210cffff = 4096 kB
mmap segment[8]: 0x210d0000...0x218cffff = 8192 kB
mmap segment[9]: 0x218d0000...0x228cffff = 16384 kB
mmap segment[10]: 0x228d0000...0x248cffff = 32768 kB
mmap segment[11]: 0x248d0000...0x288cffff = 65536 kB
mmap segment[12]: 0x288d0000...0x2c8cffff = 65536 kB

Then, when I try to map another 16384 kB or more, I get
"Permission denied".

I tried cygwin.dll 1.3.4-2 and 1.3.6-6.
Just in case you don't konw or if you want to comment it.

Lothar.
========================================================================
Lothar Linhard                           |  Tel.:  +49-761-47094-12
Concept Engineering, Bötzinger Str. 29,  |  Fax.:  +49-761-47094-29
79111 Freiburg, Germany.                 |  Email: lothar@concept.de
========================================================================

[-- Attachment #2: output of  cygcheck.exe -svr --]
[-- Type: TEXT/PLAIN, Size: 14781 bytes --]


Cygnus Win95/NT Configuration Diagnostics
Current System Time: Thu Dec 20 19:27:09 2001

Windows NT Ver 4.0 Build 1381 Service Pack 6

Path:	.
	H:\bin
	C:\cygwin\usr\local\bin
	C:\cygwin\bin
	C:\cygwin\bin
	C:\WINNT\system32
	C:\WINNT
	C:\Program Files\Bitkeeper
	C:\tcltk83\bin
	C:\tools
	C:\tcltk82\bin
	C:\tcltk81\bin
	C:\tcltk80\bin
	C:\PROGRA~1\BITKEE~1
	C:\MSDEV\bin
	C:\Program Files\DevStudio\SharedIDE\bin

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

HOME = `H:\'
MAKEFLAGS = `--no-print-directory'
MAKE_MODE = `unix'
PWD = `/h'
USER = `lld'

CFLAGS = `-g'
COMPUTERNAME = `ERDE'
COMSPEC = `C:\WINNT\system32\cmd.exe'
EDITOR = `vi'
HOMEDRIVE = `H:'
HOMEPATH = `\'
HOMESHARE = `\\star\lld'
INCLUDE = `c:\msdev\include;c:\msdev\atl\include;c:\msdev\mfc\include;%include%'
LC_COLLATE = `C'
LIB = `c:\msdev\lib;c:\msdev\mfc\lib;%lib%'
LM_LICENSE_FILE = `1700@Jupiter'
LOGONSERVER = `\\ERDE'
MSDEVDIR = `C:\Program Files\DevStudio\SharedIDE'
NUMBER_OF_PROCESSORS = `1'
OLDPWD = `/usr/bin'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
OS = `Windows_NT'
PATHEXT = `.COM;.EXE;.BAT;.CMD'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 8 Stepping 3, GenuineIntel'
PROCESSOR_LEVEL = `6'
PROCESSOR_REVISION = `0803'
PROMPT = `$P$G'
PS1 = `\h\$ '
PURIFYOPTIONS = `-free-queue-length=1000 -chain-length=12'
SHLVL = `1'
SILOS_HOME = `C:\Program Files\Simucad\Silos2001Demo'
SIMUCAD_LICENSE_FILE = `C:\Program Files\Simucad\Silos2001Demo\silos.lic'
SYSTEMDRIVE = `C:'
SYSTEMROOT = `C:\WINNT'
TEMP = `C:\TEMP'
TERM = `cygwin'
UID = `52'
USERDOMAIN = `ERDE'
USERNAME = `lld'
USERPROFILE = `C:\WINNT\Profiles\lld'
WINDIR = `C:\WINNT'
_ = `/usr/bin/cygcheck.exe'
ceBoxLicence = `BK99B2J7DI8IF7 2FIEL1655GG2AL 2J2IG9CHF1J88G L941NNILJFFELB'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/c
  (default) = `C:'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/ce
  (default) = `\\star\ce'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/d
  (default) = `D:'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/extra
  (default) = `\\star\extra'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/h
  (default) = `H:'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/home
  (default) = `C:\home'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/obj
  (default) = `D:\obj'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/s
  (default) = `S:'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/tmp
  (default) = `C:\tmp'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/x
  (default) = `X:'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `C:\cygwin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `C:/cygwin/bin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `C:/cygwin/lib'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

a:  fd           N/A    N/A                    
c:  hd  NTFS    4008Mb  41% CP CS UN PA FC     System
d:  hd  NTFS   15610Mb  13% CP CS UN PA FC     
e:  cd           N/A    N/A                    
h:  net NTFS    5321Mb  89% CP CS    PA        lld
s:  net NTFS    3124Mb  61% CP CS    PA        ce
x:  net NTFS   33926Mb  54% CP CS    PA        extra

C:             /c         user    binmode
\\star\ce      /ce        user    binmode
D:             /d         user    binmode
\\star\extra   /extra     user    binmode
H:             /h         user    binmode
C:\home        /home      user    binmode
D:\obj         /obj       user    binmode
S:             /s         user    binmode
C:\tmp         /tmp       user    binmode
X:             /x         user    binmode
.              /cygdrive  user    binmode,noumount
C:\cygwin      /          system  binmode
C:/cygwin/bin  /usr/bin   system  binmode
C:/cygwin/lib  /usr/lib   system  binmode

Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: C:\cygwin\bin\sh.exe

   56k 2000/12/03 C:\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz21.0.dll" v0.0 ts=2000/11/21 0:53
  821k 2001/11/19 C:\cygwin\bin\cygcrypto.dll - os=4.0 img=1.0 sys=4.0
                  "cygcrypto.dll" v0.0 ts=2001/11/20 0:42
  102k 2001/12/06 C:\cygwin\bin\cygcurl-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygcurl-2.dll" v0.0 ts=2001/12/6 19:45
   34k 2001/09/30 C:\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0
                  "cygform6.dll" v0.0 ts=2001/9/30 4:43
   18k 2000/10/23 C:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2000/10/23 4:26
   17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/7 5:34
   21k 2001/06/28 C:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory5.dll" v0.0 ts=2001/6/28 4:27
   22k 2001/12/13 C:\cygwin\bin\cygintl-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl-1.dll" v0.0 ts=2001/12/13 10:28
   21k 2001/06/20 C:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2001/6/20 19:09
   81k 2001/10/20 C:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2001/10/20 2:25
   35k 2001/10/20 C:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2001/10/20 2:25
   45k 2001/07/04 C:\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig1.dll" v0.0 ts=2001/7/4 5:25
  119k 2001/06/06 C:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
                  "cygjpeg6b.dll" v0.0 ts=2001/6/6 6:27
   19k 2001/09/30 C:\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu6.dll" v0.0 ts=2001/9/30 4:43
  175k 2001/09/30 C:\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++6.dll" v0.0 ts=2001/9/30 4:45
  201k 2001/09/30 C:\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses6.dll" v0.0 ts=2001/9/30 4:42
   12k 2001/09/30 C:\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel6.dll" v0.0 ts=2001/9/30 4:43
   40k 2001/11/21 C:\cygwin\bin\cygpcre.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcre.dll" v0.0 ts=2001/11/21 23:15
   39k 2001/11/21 C:\cygwin\bin\cygpcreposix.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcreposix.dll" v0.0 ts=2001/11/21 23:15
  163k 2001/05/06 C:\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng2.dll" v0.0 ts=2001/5/6 6:05
  108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/7 5:34
  135k 2001/06/28 C:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline5.dll" v0.0 ts=2001/6/28 4:27
   66k 2001/11/20 C:\cygwin\bin\cygregex.dll - os=4.0 img=1.0 sys=4.0
                  "cygregex.dll" v0.0 ts=2001/11/20 15:44
  231k 2001/11/19 C:\cygwin\bin\cygssl.dll - os=4.0 img=1.0 sys=4.0
                  "cygssl.dll" v0.0 ts=2001/11/20 0:42
  390k 2001/10/20 C:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2001/10/20 2:24
    5k 2001/10/20 C:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 2001/10/20 C:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2001/10/20 2:24
  245k 2001/06/12 C:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiff3.dll" v0.0 ts=2001/6/12 19:25
  623k 2001/10/20 C:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2001/10/20 2:25
   41k 2001/07/04 C:\cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-noX4.dll" v0.0 ts=2001/7/4 3:21
   45k 2001/07/04 C:\cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-X4.dll" v0.0 ts=2000/11/20 3:45
   49k 2001/02/03 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2001/2/3 21:35
  720k 2001/12/08 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2001/12/8 23:02
    Cygwin DLL version info:
        DLL version: 1.3.6
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 47
        Shared data: 3
        DLL identifier: cygwin1
        Mount registry: 2
        Cygnus registry name: Cygnus Solutions
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Cygwin mount registry name: mounts v2
        Cygdrive flags: cygdrive flags
        Cygdrive prefix: cygdrive prefix
        Cygdrive default prefix: 
        Build date: Sat Dec 8 17:02:30 EST 2001
        CVS tag: cygwin-1-3-6-6
        Shared id: cygwin1S3


Cygwin Package Information
Last downloaded files to: 
Last downloaded files from: ftp://ftp.uni-erlangen.de/pub/pc/gnuwin32/cygwin/mirrors/cygnus

Package             Version             
ash                 20011018-1          
autoconf            2.52a-1             
autoconf-devel      2.52-4              
autoconf-stable     2.13-4              
automake            1.5b-1              
automake-devel      1.5-5               
automake-stable     1.4p5-5             
bash                2.05a-2             
bc                  1.06-1              
binutils            20011002-1          
bison               1.28-1              
byacc               1.9-1               
bzip2               1.0.1-6             
clear               1.0                 
compface            1.4-5               
cpio                2.4.2               
cron                3.0.1-5             
crypt               1.0-1               
ctags               5.0.1-1             
curl                7.9.2-1             
cvs                 1.11.0-1            
cygrunsrv           0.94-2              
cygutils            0.9.7-1             
cygwin              1.3.6-6             
dejagnu             20010117-1          
diff                0.0                 
expect              20010117-1          
figlet              2.2-1               
file                3.37-1              
fileutils           4.1-1               
findutils           4.1                 
flex                2.5.4-1             
fortune             1.8-1               
gawk                3.0.4-1             
gcc                 2.95.3-5            
gdb                 20010428-3          
gdbm                1.8.0-3             
gettext             0.10.40-1           
ghostscript         6.51-1              
gperf               0.0                 
grep                2.4.2-1             
groff               1.17.2-1            
gzip                1.3.2-1             
indent              2.2.6-2             
inetutils           1.3.2-16            
irc                 20010101-1          
jbigkit             1.2-4               
jpeg                6b-4                
less                358-3               
libintl             0.10.38-3           
libintl1            0.10.40-1           
libncurses5         5.2-1               
libncurses6         5.2-2               
libpng              1.0.11-1            
login               1.4-2               
lynx                2.8.4-1             
m4                  0.0                 
make                3.79.1-5            
man                 1.5g-2              
mingw               20010917-1          
mingw-runtime       1.2-1               
mktemp              1.4-1               
mt                  2.0.1-1             
mutt                1.2.5i-6            
nano                1.0.6-1             
ncftp               3.0.2-2             
ncurses             5.2-7               
newlib-man          20001118-1          
opengl              1.1.0-5             
openssh             3.0.2p1-3           
openssl             0.9.6b-2            
patch               2.5-2               
pcre                3.7-1               
perl                5.6.1-2             
popt                1.6.2-1             
postgresql          7.1.3-1             
python              2.1.1-2             
readline            4.2-3               
regex               4.4-2               
rsync               2.4.6-3             
rxvt                2.7.2-6             
sed                 3.02-1              
sh-utils            2.0-2               
sharutils           4.2.1-2             
shellutils          0.0                 
shutdown            1.2-2               
squid               2.4-STABLE20010508  
ssmtp               2.38.7-3            
tar                 1.13.19-1           
tcltk               20001125-1          
tcsh                6.10.00-3           
termcap             20010825-1          
terminfo            5.2-1               
tetex-beta          20001218-1          
texinfo             4.0-5               
textutils           2.0.16-1            
tiff                3.5.6beta-2         
time                1.7-1               
unzip               5.41-1              
vim                 6.0.93-1            
w32api              1.2-1               
wget                1.7-1               
which               1.5-1               
xpm                 4.0.0-2             
xpm-nox             4.1.0-1             
zip                 2.3-1               
zlib                1.1.3-6             

Use -h to see help about each section

[-- Attachment #3: Type: text/plain, Size: 214 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 1.1.3: mmap() returns unusable memory segments: segm fault
  2001-12-20 10:57           ` Lothar Linhard
@ 2001-12-20 13:02             ` Corinna Vinschen
  2001-12-21 12:59             ` Lothar Linhard
  1 sibling, 0 replies; 10+ messages in thread
From: Corinna Vinschen @ 2001-12-20 13:02 UTC (permalink / raw)
  To: cygwin

On Thu, Dec 20, 2001 at 07:40:58PM +0100, Lothar Linhard wrote:
> Hi Corinna,
> 
> With cygwin's mmap.cc I guess, I cannot map more than 197 MB ?!
> Is that correct?
> 
> In my application I always call mmap(NULL,size,PROT_RW,...)
> here is what I get:
> [...]
> mmap segment[12]: 0x288d0000...0x2c8cffff = 65536 kB
> 
> Then, when I try to map another 16384 kB or more, I get
> "Permission denied".
> 
> I tried cygwin.dll 1.3.4-2 and 1.3.6-6.
> Just in case you don't konw or if you want to comment it.

Quoted from MSDN: "Windows NT/2000/XP: If the file-mapping object is
backed by the paging file (hFile is INVALID_HANDLE_VALUE), the paging
file must be large enough to hold the entire mapping. If it is not,
MapViewOfFile fails."

In other words, you can't mmap() more anonymous memory as your
pagefile has room for.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: 1.1.3: mmap() returns unusable memory segments: segm fault
  2001-12-20 10:57           ` Lothar Linhard
  2001-12-20 13:02             ` Corinna Vinschen
@ 2001-12-21 12:59             ` Lothar Linhard
  1 sibling, 0 replies; 10+ messages in thread
From: Lothar Linhard @ 2001-12-21 12:59 UTC (permalink / raw)
  To: Corinna Vinschen; +Cc: Heinz Brüderlin

Hi Corinna,

please ignore my prev message.  After adding another
500MB swap space on my NT4.0, it worked (don't know
why my old swap settings min=150MB max=500MB weren't
enough for my application that mmaps ~390MB total).

I detected another problem with mmap from real files
(above, I used MAP_ANON) - now I get crashes where
it worked before.  I'll recontact you when I can
be more specific.

For now: Merry Christmas and all the best for
the new Year.

Lothar.

On Thu, 20 Dec 2001, Lothar Linhard wrote:

> Hi Corinna,
>
> With cygwin's mmap.cc I guess, I cannot map more than 197 MB ?!
> Is that correct?
>
> In my application I always call mmap(NULL,size,PROT_RW,...)
> here is what I get:
> mmap segment[0]: 0x202d0000...0x202dffff = 64 kB
> mmap segment[1]: 0x202e0000...0x202effff = 64 kB
> mmap segment[2]: 0x202f0000...0x2030ffff = 128 kB
> mmap segment[3]: 0x20310000...0x2034ffff = 256 kB
> mmap segment[4]: 0x20350000...0x203cffff = 512 kB
> mmap segment[5]: 0x209d0000...0x20acffff = 1024 kB
> mmap segment[6]: 0x20ad0000...0x20ccffff = 2048 kB
> mmap segment[7]: 0x20cd0000...0x210cffff = 4096 kB
> mmap segment[8]: 0x210d0000...0x218cffff = 8192 kB
> mmap segment[9]: 0x218d0000...0x228cffff = 16384 kB
> mmap segment[10]: 0x228d0000...0x248cffff = 32768 kB
> mmap segment[11]: 0x248d0000...0x288cffff = 65536 kB
> mmap segment[12]: 0x288d0000...0x2c8cffff = 65536 kB
>
> Then, when I try to map another 16384 kB or more, I get
> "Permission denied".
>
> I tried cygwin.dll 1.3.4-2 and 1.3.6-6.
> Just in case you don't konw or if you want to comment it.
>
> Lothar.
> ========================================================================
> Lothar Linhard                           |  Tel.:  +49-761-47094-12
> Concept Engineering, Bötzinger Str. 29,  |  Fax.:  +49-761-47094-29
> 79111 Freiburg, Germany.                 |  Email: lothar@concept.de
> ========================================================================
>


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2001-12-21 20:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-05 12:08 1.1.3: mmap() returns unusable memory segments: segm fault Lothar Linhard
2001-11-05 13:01 ` Corinna Vinschen
2001-11-05 13:31   ` Christopher Faylor
2001-11-06  2:16   ` Lothar Linhard
2001-11-06  2:46     ` Corinna Vinschen
2001-11-06  4:20       ` Lothar Linhard
2001-11-06  5:05         ` Corinna Vinschen
2001-12-20 10:57           ` Lothar Linhard
2001-12-20 13:02             ` Corinna Vinschen
2001-12-21 12:59             ` Lothar Linhard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).