Thread: Initdb and IpcMemoryCreate Errors

Initdb and IpcMemoryCreate Errors

From
Dave Page
Date:
Hi,

System details:
Pentium III 850MHz w/128Mb RAM, 12Gb free disk.
Windows 2000 SP1
Cygipc v1.9

I have 2 problems with PostgreSQL 7.1-2 (precompiled) and Cygwin 1.1.8 (I
know the docs say don't use this version, however I can't find 1.1.7
anywhere) - I have upgraded to the 20010423 snapshot of cygwin1.dll. The
first problem (which I can work around) is with initdb which gives the
following output:

PC20 /data $ initdb
This database system will be initialized with username "administrator".
This user will own all the data files and must also own the server process.

Fixing permissions on existing directory /data
Creating directory /data/base
Creating directory /data/global
Creating directory /data/pg_xlog
Creating template1 database in /data/base/1
DEBUG:  database system was shut down at 2001-04-25 13:35:03
DEBUG:  CheckPoint record at (0, 8)
DEBUG:  Redo record at (0, 8); Undo record at (0, 8); Shutdown TRUE
DEBUG:  NextTransactionId: 514; NextOid: 16384
DEBUG:  database system is in production state
Creating global relations in /data/global
DEBUG:  database system was shut down at 2001-04-25 13:35:10
DEBUG:  CheckPoint record at (0, 112)
DEBUG:  Redo record at (0, 112); Undo record at (0, 0); Shutdown TRUE
DEBUG:  NextTransactionId: 514; NextOid: 17199
DEBUG:  database system is in production state
Initializing pg_shadow.
Enabling unlimited row width for system tables.
Creating system views.
Loading pg_description.
/usr/bin/initdb: cannot create /tmp/initdb.1468: permission denied
/usr/bin/initdb: cannot create /tmp/initdb.1468: permission denied
cat: /tmp/initdb.1468: Permission denied
Setting lastsysoid.
Vacuuming database.

initdb failed.
Removing temp file /tmp/initdb.1468.


I have found that modifying initdb to use "initdb.$$" instead of
"/tmp/initdb.$$" resolves this problem. I have checked permissions on /tmp
and that there are no existing files in there which may cause grief and all
appears OK.

The second problem occurs when I attempt to start the postmaster - I get the
following error:

PC20 /data $ postmaster -i &
[1] 1484
PC20 /data $ IpcMemoryCreate: shmget(key=5432001, size=1245184, 03600)
failed: Not enough memory

[1]+  Exit 1                  postmaster -i


I have tried with cygipc running both as an NT service and from the command
line.

Any help would be greatfully received (future pgAdmin development depends on
it!! :-))

Regards, Dave.

Re: Initdb and IpcMemoryCreate Errors

From
Jason Tishler
Date:
Dave,

On Wed, Apr 25, 2001 at 01:56:58PM +0100, Dave Page wrote:
> I have 2 problems with PostgreSQL 7.1-2 (precompiled) and Cygwin 1.1.8 (I
> know the docs say don't use this version, however I can't find 1.1.7
> anywhere) - I have upgraded to the 20010423 snapshot of cygwin1.dll. The
> first problem (which I can work around) is with initdb which gives the
> following output:
>
> PC20 /data $ initdb
> This database system will be initialized with username "administrator".
> This user will own all the data files and must also own the server process.
>
> [snip]
> /usr/bin/initdb: cannot create /tmp/initdb.1468: permission denied
> /usr/bin/initdb: cannot create /tmp/initdb.1468: permission denied

Can you create files in /tmp?  What happens when you try the following:

    $ >/tmp/foo

> cat: /tmp/initdb.1468: Permission denied
> Setting lastsysoid.
> Vacuuming database.
>
> initdb failed.
> Removing temp file /tmp/initdb.1468.
>
> I have found that modifying initdb to use "initdb.$$" instead of
> "/tmp/initdb.$$" resolves this problem. I have checked permissions on /tmp
> and that there are no existing files in there which may cause grief and all
> appears OK.

I would not recommend the above approach.  Instead, I strongly recommend
finding the root cause to your problem.  Especially, when it most likely
also relates to your second problem...

> The second problem occurs when I attempt to start the postmaster - I get the
> following error:
>
> PC20 /data $ postmaster -i &
> [1] 1484
> PC20 /data $ IpcMemoryCreate: shmget(key=5432001, size=1245184, 03600)
> failed: Not enough memory

Guess where cygipc stores its files?  In /tmp:

    $ ls /tmp/cygipc? /tmp/MultiFile*
    /tmp/MultiFileMsg  /tmp/MultiFileShm  /tmp/cygipc1
    /tmp/MultiFileSem  /tmp/cygipc0       /tmp/cygipc2

BTW, you may want to try Cygwin 1.3.1 (i.e., the latest release) or a
different snapshot.  I personally tested Cygwin 1.3.1 and 20010413 and
both pass all regression tests.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Initdb and IpcMemoryCreate Errors

From
Fred Yankowski
Date:
> On Wed, Apr 25, 2001 at 01:56:58PM +0100, Dave Page wrote:
> > PC20 /data $ postmaster -i &
> > [1] 1484
> > PC20 /data $ IpcMemoryCreate: shmget(key=5432001, size=1245184, 03600)
> > failed: Not enough memory

I've seen that one at least once, in a situation where I should have
had plenty of memory and filespace.  I think removing everything in
/tmp and restarting ipc-daemon got around the problem.

--
Fred Yankowski           fred@OntoSys.com      tel: +1.630.879.1312
Principal Consultant     www.OntoSys.com       fax: +1.630.879.1370
OntoSys, Inc             38W242 Deerpath Rd, Batavia, IL 60510, USA

RE: Initdb and IpcMemoryCreate Errors

From
Dave Page
Date:

> -----Original Message-----
> From: Jason Tishler [mailto:Jason.Tishler@dothill.com]
> Sent: 27 April 2001 19:54
> To: Dave Page
> Cc: 'pgsql-cygwin@postgresql.org'
> Subject: Re: [CYGWIN] Initdb and IpcMemoryCreate Errors
>
>
Jason,
>
> Can you create files in /tmp?  What happens when you try the
> following:
>
>     $ >/tmp/foo

Yes, I can touch files, pipe to files, anything you'd expect to be able to
do except run initdb!

> > I have found that modifying initdb to use "initdb.$$" instead of
> > "/tmp/initdb.$$" resolves this problem. I have checked
> permissions on /tmp
> > and that there are no existing files in there which may
> cause grief and all
> > appears OK.
>
> I would not recommend the above approach.  Instead, I
> strongly recommend
> finding the root cause to your problem.  Especially, when it
> most likely
> also relates to your second problem...

Oh, I quite agree it's not an acceptable solution. However, as workaround it
does get over the problem of the temp file not being created correctly, and
possibly provide further insight into what may be going wrong.

> > The second problem occurs when I attempt to start the
> postmaster - I get the
> > following error:
> >
> > PC20 /data $ postmaster -i &
> > [1] 1484
> > PC20 /data $ IpcMemoryCreate: shmget(key=5432001,
> size=1245184, 03600)
> > failed: Not enough memory
>
> Guess where cygipc stores its files?  In /tmp:
>
>     $ ls /tmp/cygipc? /tmp/MultiFile*
>     /tmp/MultiFileMsg  /tmp/MultiFileShm  /tmp/cygipc1
>     /tmp/MultiFileSem  /tmp/cygipc0       /tmp/cygipc2

Yeah, no problem there - that had me stumped as well. Why can ipc-daemon
write to /tmp when initdb can't when run as the same user from the same
bash? Bizarre...

> BTW, you may want to try Cygwin 1.3.1 (i.e., the latest release) or a
> different snapshot.  I personally tested Cygwin 1.3.1 and 20010413 and
> both pass all regression tests.

I will download the latest version and try it. This is very perplexing,
particuarly as I've been running PostgreSQL 7.0 on Cygwin B20 for ages
without trouble!

I'll let you know how I get on...

Many thanks, Dave.

RE: Initdb and IpcMemoryCreate Errors

From
Dave Page
Date:

> -----Original Message-----
> From: Fred Yankowski [mailto:fred@ontosys.com]
> Sent: 27 April 2001 20:22
> To: Dave Page; 'pgsql-cygwin@postgresql.org'
> Subject: Re: [CYGWIN] Initdb and IpcMemoryCreate Errors
>
>
> > On Wed, Apr 25, 2001 at 01:56:58PM +0100, Dave Page wrote:
> > > PC20 /data $ postmaster -i &
> > > [1] 1484
> > > PC20 /data $ IpcMemoryCreate: shmget(key=5432001,
> size=1245184, 03600)
> > > failed: Not enough memory
>
> I've seen that one at least once, in a situation where I should have
> had plenty of memory and filespace.  I think removing everything in
> /tmp and restarting ipc-daemon got around the problem.
>

OK, tried that and now I get:

PC20 $ postmaster -i &
[1] 1232
PC20 $ IpcMemoryCreate: shmat(id=0) failed: error 0

[1]+  Exit 1                  postmaster -i

I'm off to try the latest cygwin dll now I think!

Regards, Dave.

RE: Initdb and IpcMemoryCreate Errors

From
Dave Page
Date:

> -----Original Message-----
> From: Dave Page [mailto:dpage@vale-housing.co.uk]
> Sent: 27 April 2001 20:54
> To: 'Jason Tishler'
> Cc: 'pgsql-cygwin@postgresql.org'
> Subject: RE: [CYGWIN] Initdb and IpcMemoryCreate Errors
>
>
>
>
> > -----Original Message-----
> > From: Jason Tishler [mailto:Jason.Tishler@dothill.com]
> > Sent: 27 April 2001 19:54
> > To: Dave Page
> > Cc: 'pgsql-cygwin@postgresql.org'
> > Subject: Re: [CYGWIN] Initdb and IpcMemoryCreate Errors
> >
> > BTW, you may want to try Cygwin 1.3.1 (i.e., the latest
> release) or a
> > different snapshot.  I personally tested Cygwin 1.3.1 and
> 20010413 and
> > both pass all regression tests.

Hi Jason,

I've cleared /tmp and restarted ipc-daemon as suggested by Fred Yanowski.
That changed my error message to:

PC20 $ postmaster -i &
[1] 1232
PC20 $ IpcMemoryCreate: shmat(id=0) failed: error 0

[1]+  Exit 1                  postmaster -i

An upgrade to Cygwin 1.3.1 makes no difference. It has struck me that the
one thing I have probably done differently is using /data for my PGDATA
directory. I can't see how this could make any difference but it may be
worth mentioning.

Regards, Dave.

Re: Initdb and IpcMemoryCreate Errors

From
Jason Tishler
Date:
Dave,

On Fri, Apr 27, 2001 at 09:34:10PM +0100, Dave Page wrote:
> PC20 $ IpcMemoryCreate: shmat(id=0) failed: error 0

I'm not sure what to make of the above.  You may want to try the
cygwin@sources.redhat.com list to tap other cygipc expertise.

> An upgrade to Cygwin 1.3.1 makes no difference. It has struck me that the
> one thing I have probably done differently is using /data for my PGDATA
> directory. I can't see how this could make any difference but it may be
> worth mentioning.

Please post the output of cygcheck -s -v -r to the list.

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

RE: Initdb and IpcMemoryCreate Errors

From
Dave Page
Date:

> -----Original Message-----
> From: Jason Tishler [mailto:Jason.Tishler@dothill.com]
> Sent: 28 April 2001 13:49
> To: Dave Page
> Cc: 'pgsql-cygwin@postgresql.org'
> Subject: Re: [CYGWIN] Initdb and IpcMemoryCreate Errors
>
>
> Dave,
>
> On Fri, Apr 27, 2001 at 09:34:10PM +0100, Dave Page wrote:
> > PC20 $ IpcMemoryCreate: shmat(id=0) failed: error 0
>
> I'm not sure what to make of the above.  You may want to try the
> cygwin@sources.redhat.com list to tap other cygipc expertise.
>
> > An upgrade to Cygwin 1.3.1 makes no difference. It has
> struck me that the
> > one thing I have probably done differently is using /data
> for my PGDATA
> > directory. I can't see how this could make any difference
> but it may be
> > worth mentioning.
>
> Please post the output of cygcheck -s -v -r to the list.

Jason,

I've found that removing the ntsec option the the CYGWIN envvar has cured my
initdb problem. With ntsec, whilst I could read/write to /tmp and other
places, access denied error messages on other directories including some I
had just created myself (with suitable permissions) lead me to believe that
there is something seriously wrong with it. I have also tried installing
from scratch whilst logged in as the PC's local administrator rather than
myself which made no difference.

I'm now left with a single (new) error when starting the postmaster:

PC20 $ postmaster -i &
[1] 1180
PC20 $ C:\cygwin\bin\postgres.exe: *** recreate_mmaps_after_fork_failed
postmaster: Startup proc 724 exited with status 256 - abort

[1]+  Exit 1                  postmaster -i
PC20 $

The output from cygcheck is as follows:

Thanks for your help to date,

Regards, Dave.


PC20 $ cygcheck -s -v -r

Cygnus Win95/NT Configuration Diagnostics
Current System Time: Mon Apr 30 13:35:30 2001

WinNT Ver 5.0 build 2195 Service Pack 1

Path:   /usr/local/bin
        /usr/bin
        /bin
        /cygdrive/c/WINNT/system32
        /cygdrive/c/WINNT
        /cygdrive/c/WINNT/System32/Wbem
        /cygdrive/c/Program Files/Informix/Client-SDK/bin
        /cygdrive/c/Program Files/GNU/WinCvs 1.2
        /usr/bin
        /cygdrive/c/Program Files/Seagate Software/Open OLAP/Support
        /cygdrive/c/WINNT/system32
        /cygdrive/c/WINNT
        /cygdrive/c/WINNT/System32/Wbem
        /cygdrive/c/Program Files/Microsoft Visual Studio/Common/Tools/WinNT
        /cygdrive/c/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin
        /cygdrive/c/Program Files/Microsoft Visual Studio/Common/Tools
        /cygdrive/c/Program Files/Microsoft Visual Studio/VC98/bin

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

PWD = `/home/administrator'
USER = `administrator'
MAKE_MODE = `unix'
HOME = `/home/administrator'

NUMBER_OF_PROCESSORS = `1'
PROMPT = `$P$G'
LOGONSERVER = `\\WOODY'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
COMSPEC = `C:\WINNT\system32\cmd.exe'
!C: = `C:\cygwin\bin'
SYSTEMDRIVE = `C:'
HOSTNAME = `PC20'
INCLUDE = `C:\Program Files\Microsoft Visual
Studio\VC98\atl\include;C:\Program
Files\Microsoft Visual Studio\VC98\mfc\include;C:\Program Files\Microsoft
Visual
 Studio\VC98\include'
PROCESSOR_REVISION = `0806'
MSDEVDIR = `C:\Program Files\Microsoft Visual Studio\Common\MSDev98'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
COMPUTERNAME = `PC20'
PGHOST = `localhost'
WINDIR = `C:\WINNT'
USERPROFILE = `C:\Documents and Settings\dpage'
!S: = `S:\dpage'
PS1 = `\h $ '
PROGRAMFILES = `C:\Program Files'
CI_HOLOS_CLI = `C:\Program Files\Seagate Software\Open Olap\'
MACHTYPE = `i686-pc-cygwin'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 8 Stepping 6, GenuineIntel'
OS = `Windows_NT'
OLDPWD = `/usr/bin'
PROCESSOR_ARCHITECTURE = `x86'
TEMP = `/cygdrive/c/DOCUME~1/dpage/LOCALS~1/Temp'
PROCESSOR_LEVEL = `6'
SYSTEMROOT = `C:\WINNT'
HOMEDRIVE = `S:'
LIB = `C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Program
Files\Mi
crosoft Visual Studio\VC98\lib'
ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
SHLVL = `1'
APPDATA = `C:\Documents and Settings\dpage\Application Data'
COMMONPROGRAMFILES = `C:\Program Files\Common Files'
HOMEPATH = `\dpage'
USERDOMAIN = `COMPUTING'
USERNAME = `dpage'
SHELL = `/bin/sh'
PGLIB = `/lib'
HOSTTYPE = `i686'
OSTYPE = `cygwin'
TERM = `cygwin'
PGDATA = `/data'
_ = `/usr/bin/cygcheck'
TZ = `GMTST0GMTDT-1,M3.5.0/1,M10.5.0/2'

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\Program Options
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\05
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\06
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\07
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\08
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\09
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0A
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0B
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0C
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0D
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0E
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0F
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\10
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\11
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\12
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\13
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\14
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\15
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\16
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\17
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\18
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\19
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1A
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1B
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1C
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1D
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrd
er\S
tart Menu\Programs\Cygnus Solutions
  (default) = (unsupported type)
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
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\00
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\01
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\02
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\03
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\04
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\05
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\06
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\07
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\08
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\09
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0E
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\0F
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\10
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\11
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\12
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\13
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\14
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\15
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\16
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\17
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\18
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\19
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\1A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\1B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\1C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL
setup\b15.0\mounts\1D

a:  fd           N/A    N/A
c:  hd  NTFS   24583Mb  26% CP CS UN PA FC
d:  cd           N/A    N/A
g:  net NTFS   32851Mb  50% CP CS UN PA FC     Data
n:  net NTFS   32851Mb  19% CP CS UN PA FC     Data
p:  net NTFS   32851Mb  19% CP CS UN PA FC     Data
s:  net NTFS   32851Mb  50% CP CS UN PA FC     Data
u:  net NTFS   32851Mb  50% CP CS UN PA FC     Data
w:  net NTFS   32851Mb  50% CP CS UN PA FC     Data

C:\cygwin\bin  /usr/bin  system  binmode
C:\cygwin\lib  /usr/lib  system  binmode
C:\cygwin  /        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/20 23:53
   82k 2001/01/21 C:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
                  "cygform5.dll" v0.0 ts=2001/1/21 20:39
   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 3:26
   17k 2001/01/07 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/7 4:34
   14k 2000/10/23 C:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2000/10/23 20:02
   81k 2000/12/05 C:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2000/11/26 1:43
   35k 2000/12/05 C:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2000/11/26 1:43
   45k 2000/10/22 C:\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig1.dll" v0.0 ts=2000/10/23 0:06
  119k 2000/10/23 C:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
                  "cygjpeg6b.dll" v0.0 ts=2000/10/23 1:58
   53k 2001/01/21 C:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu5.dll" v0.0 ts=2001/1/21 20:39
  414k 2001/01/21 C:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++5.dll" v0.0 ts=2001/1/21 20:40
  299k 2001/01/21 C:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses5.dll" v0.0 ts=2001/1/21 20:38
   34k 2001/01/21 C:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel5.dll" v0.0 ts=2001/1/21 20:38
  163k 2001/02/03 C:\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng2.dll" v0.0 ts=2001/2/3 21:21
  108k 2001/01/07 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/7 4:34
  390k 2000/12/05 C:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2000/11/26 1:39
    5k 2000/12/05 C:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 2000/12/05 C:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2000/11/26 1:39
  243k 2000/10/23 C:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiff3.dll" v0.0 ts=2000/10/23 2:14
  623k 2000/12/05 C:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2000/11/26 1:43
   41k 2000/11/20 C:\cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-noX4.dll" v0.0 ts=2000/11/20 2:41
   45k 2000/11/20 C:\cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-X4.dll" v0.0 ts=2000/11/20 2: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 20:35
  615k 2001/01/31 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2001/1/31 15:08
    Cygwin DLL version info:
        dll major: 1001
        dll minor: 8
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 34
        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 Jan 31 10:08:38 EST 2001
        shared id: cygwin1S3

Use -h to see help about each section
PC20 $

--- End of Output ---

Re: Initdb and IpcMemoryCreate Errors

From
Jason Tishler
Date:
Dave,

On Mon, Apr 30, 2001 at 01:39:57PM +0100, Dave Page wrote:
> I've found that removing the ntsec option the the CYGWIN envvar has cured my
> initdb problem. With ntsec, whilst I could read/write to /tmp and other
> places, access denied error messages on other directories including some I
> had just created myself (with suitable permissions) lead me to believe that
> there is something seriously wrong with it. I have also tried installing
> from scratch whilst logged in as the PC's local administrator rather than
> myself which made no difference.

Ah ntsec...  Since I don't run with it, I always forgot about this
permutation.  I don't believe that there is anything "seriously" wrong
with ntsec -- using it just requires more administration.  From monitoring
the Cygwin mailing list, I have gleaned that people who use ntsec do
a lot of chown and chmod commands after installation.  See the following
for an example:

    http://sources.redhat.com/ml/cygwin/2001-04/msg01668.html

> I'm now left with a single (new) error when starting the postmaster:
>
> PC20 $ postmaster -i &
> [1] 1180
> PC20 $ C:\cygwin\bin\postgres.exe: *** recreate_mmaps_after_fork_failed
> postmaster: Startup proc 724 exited with status 256 - abort

The above is an easy one and a known problem.  You must upgrade your
Cygwin DLL since you are still using 1.1.8.  I can tell this from the
cygcheck output below:

> The output from cygcheck is as follows:
>
> PC20 $ cygcheck -s -v -r
>
> Cygnus Win95/NT Configuration Diagnostics
> Current System Time: Mon Apr 30 13:35:30 2001
>
> WinNT Ver 5.0 build 2195 Service Pack 1
>
> Path:   /usr/local/bin
>
> [snip]
>
>   615k 2001/01/31 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
>                   "cygwin1.dll" v0.0 ts=2001/1/31 15:08
>     Cygwin DLL version info:
>         dll major: 1001

The above implies 1.1.x and

>         dll minor: 8

the above implies y.z.8

Hence, you are running 1.1.8.  You can confirm this with:

    $ uname -r

Upgrade to 1.3.1 (if you are bold) or to a snapshot (e.g., 20010413).

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

RE: Initdb and IpcMemoryCreate Errors

From
Dave Page
Date:

> -----Original Message-----
> From: Jason Tishler [mailto:Jason.Tishler@dothill.com]
> Sent: 30 April 2001 14:07
> To: Dave Page
> Cc: 'pgsql-cygwin@postgresql.org'
> Subject: Re: [CYGWIN] Initdb and IpcMemoryCreate Errors
>
>
> Dave,
>
<snip>
> >
> >   615k 2001/01/31 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
> >                   "cygwin1.dll" v0.0 ts=2001/1/31 15:08
> >     Cygwin DLL version info:
> >         dll major: 1001
>
> The above implies 1.1.x and
>
> >         dll minor: 8
>
> the above implies y.z.8
>
> Hence, you are running 1.1.8.  You can confirm this with:
>
>     $ uname -r
>
> Upgrade to 1.3.1 (if you are bold) or to a snapshot (e.g., 20010413).

Hmm, I thought I had - it must have got lost during all my re-installs.
Anyway, trying again, 1.3.1 gives the same error, however 20010413 works!

Many thanks for your help,

Regards, Dave.

Re: Initdb and IpcMemoryCreate Errors

From
Jason Tishler
Date:
Dave,

On Mon, Apr 30, 2001 at 04:34:39PM +0100, Dave Page wrote:
> > Upgrade to 1.3.1 (if you are bold) or to a snapshot (e.g., 20010413).
>
> Hmm, I thought I had - it must have got lost during all my re-installs.

I thought that you had too.

> Anyway, trying again, 1.3.1 gives the same error,

This is very bad -- are you sure?  I have run 1.3.1 on NT 4.0 SP6 and
2000 SP1 without any problems (i.e., all regression test pass).

> however 20010413 works!

I'm glad that you have a working setup, but I implore you to figure out
why 1.3.1 is not working for you.  Are you sure that the upgrade worked?
For example, if ipc-daemon is still running, then the overwrite of
cygwin1.dll will fail.  Use uname -r to verify.  Please report back your
findings to the list.

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Initdb and IpcMemoryCreate Errors

From
Jason Tishler
Date:
Dave,

On Tue, May 01, 2001 at 08:23:47AM +0100, Dave Page wrote:
> I've found the error (which probably caused my earlier problem to continue
> longer than they needed to). In my clean installation, cygwin1.dll is
> installed  in /bin. I downloaded cygwin-1.3.1.tar.gz and then untarred it
> over my existing installation, not realising that in the archive,
> cygwin1.dll (and some other .exes) is in /usr/bin. So all the time I *had*
> upgraded to 1.3.1, it was just that the older .dll was in a directory
> located before /usr/bin in the path! I've now moved the files from /usr/bin
> to /bin, and all works fine (and uname -r proves I am running 1.3.1 this
> time).

I surmised that there was some kind of installation issue that was causing
you to run a different (i.e., older) DLL than you thought that you were.

However, I must also point out that your installation still seems
not to be correct (or at least standard and hence supportable by the
Cygwin list).  If you use Cygwin's setup.exe, then /bin and /usr/bin
are effectively the same directory due to entries in the mount table.

For example, on my system I have the following:

    $ mount
    D:\Cygwin\bin       /usr/bin            system       binmode
    D:\Cygwin\lib       /usr/lib            system       binmode
    D:\Cygwin           /                   system       binmode
    ...

The first and third entries above make /bin and /usr/bin synonymous.

Did you use Cygwin's setup.exe?  If not, then please do so in the
future.

Thanks,
Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

RE: Initdb and IpcMemoryCreate Errors

From
Dave Page
Date:

> -----Original Message-----
> From: Jason Tishler [mailto:Jason.Tishler@dothill.com]
> Sent: 01 May 2001 12:37
> To: Dave Page
> Cc: 'pgsql-cygwin@postgresql.org'
> Subject: Re: [CYGWIN] Initdb and IpcMemoryCreate Errors
>
>
> Dave,
>
> On Tue, May 01, 2001 at 08:23:47AM +0100, Dave Page wrote:
> > I've found the error (which probably caused my earlier
> problem to continue
> > longer than they needed to). In my clean installation,
> cygwin1.dll is
> > installed  in /bin. I downloaded cygwin-1.3.1.tar.gz and
> then untarred it
> > over my existing installation, not realising that in the archive,
> > cygwin1.dll (and some other .exes) is in /usr/bin. So all
> the time I *had*
> > upgraded to 1.3.1, it was just that the older .dll was in a
> directory
> > located before /usr/bin in the path! I've now moved the
> files from /usr/bin
> > to /bin, and all works fine (and uname -r proves I am
> running 1.3.1 this
> > time).
>
> I surmised that there was some kind of installation issue
> that was causing
> you to run a different (i.e., older) DLL than you thought
> that you were.
>
> However, I must also point out that your installation still seems
> not to be correct (or at least standard and hence supportable by the
> Cygwin list).  If you use Cygwin's setup.exe, then /bin and /usr/bin
> are effectively the same directory due to entries in the mount table.
>
> For example, on my system I have the following:
>
>     $ mount
>     D:\Cygwin\bin       /usr/bin            system       binmode
>     D:\Cygwin\lib       /usr/lib            system       binmode
>     D:\Cygwin           /                   system       binmode
>     ...
>
> The first and third entries above make /bin and /usr/bin synonymous.
>
> Did you use Cygwin's setup.exe?  If not, then please do so in the
> future.
>

Yes I did use setup.exe to install cygwin initially, however I used winzip
to extract cygwin-1.3.1-2.tar.gz over the existing installation. Winzip of
course doesn't know about cygwins mounts.

OK, wrist slapped - I'll steer clear of windows programs in future!

Regards, Dave.

RE: Initdb and IpcMemoryCreate Errors

From
Dave Page
Date:

> -----Original Message-----
> From: Jason Tishler [mailto:Jason.Tishler@dothill.com]
> Sent: 30 April 2001 17:01
> To: Dave Page
> Cc: 'pgsql-cygwin@postgresql.org'
> Subject: Re: [CYGWIN] Initdb and IpcMemoryCreate Errors
>
>
> Dave,
>
> On Mon, Apr 30, 2001 at 04:34:39PM +0100, Dave Page wrote:
> > > Upgrade to 1.3.1 (if you are bold) or to a snapshot
> (e.g., 20010413).
> >
> > Hmm, I thought I had - it must have got lost during all my
> re-installs.
>
> I thought that you had too.
>
> > Anyway, trying again, 1.3.1 gives the same error,
>
> This is very bad -- are you sure?  I have run 1.3.1 on NT 4.0 SP6 and
> 2000 SP1 without any problems (i.e., all regression test pass).
>
> > however 20010413 works!
>
> I'm glad that you have a working setup, but I implore you to
> figure out
> why 1.3.1 is not working for you.  Are you sure that the
> upgrade worked?
> For example, if ipc-daemon is still running, then the overwrite of
> cygwin1.dll will fail.  Use uname -r to verify.  Please
> report back your
> findings to the list.

Jason,

I've found the error (which probably caused my earlier problem to continue
longer than they needed to). In my clean installation, cygwin1.dll is
installed  in /bin. I downloaded cygwin-1.3.1.tar.gz and then untarred it
over my existing installation, not realising that in the archive,
cygwin1.dll (and some other .exes) is in /usr/bin. So all the time I *had*
upgraded to 1.3.1, it was just that the older .dll was in a directory
located before /usr/bin in the path! I've now moved the files from /usr/bin
to /bin, and all works fine (and uname -r proves I am running 1.3.1 this
time).

Thanks again for your help,

Regards, Dave.

Re: Initdb and IpcMemoryCreate Errors

From
Fred Yankowski
Date:
I had the same problem when I used WinZip to expand and install a
Cygwin package from an archive.  Using any non-Cygwin tool to do this
will cause such a problem since those tools don't understand Cygwin
mount points and will happily treat /bin and /usr/bin as two distinct
folders/directories.  Maybe someone could add a
"DO_NOT_EXPAND_WITH_WINZIP.README" file to the distribution to warn
about this problem.

On Tue, May 01, 2001 at 07:36:54AM -0400, Jason Tishler wrote:
> On Tue, May 01, 2001 at 08:23:47AM +0100, Dave Page wrote:
> > I downloaded cygwin-1.3.1.tar.gz and then untarred it
> > over my existing installation, not realising that in the archive,
> > cygwin1.dll (and some other .exes) is in /usr/bin.

> However, I must also point out that your installation still seems
> not to be correct (or at least standard and hence supportable by the
> Cygwin list).  If you use Cygwin's setup.exe, then /bin and /usr/bin
> are effectively the same directory due to entries in the mount table.

--
Fred Yankowski           fred@OntoSys.com      tel: +1.630.879.1312
Principal Consultant     www.OntoSys.com       fax: +1.630.879.1370
OntoSys, Inc             38W242 Deerpath Rd, Batavia, IL 60510, USA