Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <41502669.60308@rz.uni-passau.de> Date: Tue, 21 Sep 2004 15:02:33 +0200 From: Christian Rank User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910 MIME-Version: 1.0 To: "Mike G." , rurban AT x-ray DOT at Cc: pgsql-cygwin AT postgresql DOT org, cygwin AT cygwin DOT com Subject: Re: Cygwin on Win98: initdb failed References: <414E7BEA DOT 3020704 AT rz DOT uni-passau DOT de> <20040921042320 DOT GA22752 AT localhost DOT localdomain> <20040921043959 DOT GA22835 AT localhost DOT localdomain> In-Reply-To: <20040921043959.GA22835@localhost.localdomain> X-Enigmail-Version: 0.86.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at uni-passau.de Hi, thanks to all who replied to my question. It seems that so far there is no solution: http://cygwin.com/ml/cygwin/2004-08/msg00277.html 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 */ #ifdef SHM_SHARE_MMU /* use intimate shared memory on Solaris */ memAddress = shmat(shmid, 0, SHM_SHARE_MMU); #else memAddress = shmat(shmid, 0, 0); #endif 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/sysv_shm.cc, line 385: shmaddr: 82FFD000, shmflg: 0 cygserver: /netrel/src/cygwin-1.5.11-1/winsup/cygserver/sysv_shm.cc, 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. Regards, Christian > 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: >> >>>Hello, >>> >>>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 GERMANY Tel.: 0851/509-1838 Fax: 0851/509-1802 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 Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/