This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin on Win98: initdb failed


thanks to all who replied to my question. It seems that so far there is
no solution:

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:

cygserver: /netrel/src/cygwin-1.5.11-1/winsup/cygserver/,
line 385: shmaddr: 82FFD000, shmflg: 0
cygserver: /netrel/src/cygwin-1.5.11-1/winsup/cygserver/,
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
issue persists.

Perhaps the cygserver maintainers can use the information above to
further investigate the problem. I would be happy to provide more input
if needed.


>  Hi,
>  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.
>  Mike
>>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
>>>the message
>>>        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
Innstr. 33
D-94032 Passau
Tel.: 0851/509-1838
Fax:  0851/509-1802
PGP public key see

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]