This is the mail archive of the
mailing list for the Cygwin project.
Re: Cygwin on Win98: initdb failed
- From: Christian Rank <christian dot rank at rz dot uni-passau dot de>
- To: "Mike G." <mike at thegodshalls dot com>, rurban at x-ray dot at
- Cc: pgsql-cygwin at postgresql dot org, cygwin at cygwin dot com
- Date: Tue, 21 Sep 2004 15:02:33 +0200
- Subject: Re: Cygwin on Win98: initdb failed
- References: <414E7BEA.email@example.com> <20040921042320.GA22752@localhost.localdomain> <20040921043959.GA22835@localhost.localdomain>
thanks to all who replied to my question. It seems that so far there is
I've done some debugging and found out that the shmat... error message
is generated by PostgreSQL in the source module
src/backend/port/sysv_shmem.c during execution of the following code:
/* OK, should be able to attach to the segment */
/* use intimate shared memory on Solaris */
memAddress = shmat(shmid, 0, SHM_SHARE_MMU);
memAddress = shmat(shmid, 0, 0);
if (memAddress == (void *) -1)
elog(FATAL, "shmat(id=%d) failed: %m", shmid);
Here it can be seen that shmat is called with a shmaddr (second
parameter) of 0, which means "the system should itself choose a suitable
address". (Thus there is no need for supplying the SHM_RND flag.)
The corresponding debugging info of cygserver reads:
line 385: shmaddr: 82FFD000, shmflg: 0
line 393: Odd shmaddr: EINVAL
This should be an indication that the problem is the cygserver program
(it generates an invalid address) and not the PostgreSQL software.
I've also tested with the latest cygwin snapshot of 2004-Sep-20, but the
Perhaps the cygserver maintainers can use the information above to
further investigate the problem. I would be happy to provide more input
> Postgres hasn't worked on Win98 since Cygwin switched to cygserver for memory management instead of ipc_daemon. I believe 7.4.3 was the version to require cygserver to run.
>>On Mon, Sep 20, 2004 at 08:42:50AM +0200, Christian Rank wrote:
>>>I'm trying to run the Cygwin version of PostgreSQL on Windows 98 SE.
>>>During initdb, creation of the initial database cluster is aborted with
>>> creating template1 database in /var/pgsql/data/base/1...
>>> shmat(id=1179648) failed: invalid argument
>>>The sequence of commands leading to this is as follows:
>>> mkdir /var/pgsql
>>> export CYGWIN=server
>>> /usr/bin/cygserver-config -n
>>> /usr/sbin/cygserver -E &
>>> mkdir /var/pgsql/data
>>> initdb -D /var/pgsql/data -E LATIN1
>>>Software versions used:
>>> cygwin 1.5.11-1
>>> PostgreSQL 7.4.5-1
>>> Windows 98 Second Edition 4.10.2222 A
>>>The same setup runs on Windows 2000 without problems. According to the
>>>cygserver docs, it should run on Win98, too.
>>>Does anybody know what's going wrong here?
Dr. Christian Rank
Rechenzentrum Universität Passau
PGP public key see http://www.rz.uni-passau.de/mitarbeiter/rank
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html