From mboxrd@z Thu Jan 1 00:00:00 1970 From: Horak Daniel To: "'Sam@OConnor.net'" Cc: "'cygwin@sourceware.cygnus.com'" Subject: RE: Postgres on NT freezing Date: Thu, 24 Jun 1999 06:15:00 -0000 Message-id: <2E7F82FAC1FCD2118E1500A024B3BF907DED10@exchange.mmp.plzen-city.cz> X-SW-Source: 1999-06/msg00563.html > I have been using PostgreSQL 6.4.2 on Debain GNU/Linux > for a few months. I am using the Windows ODBC drivers > and a C++/MFC client program. > I fixed a few bugs in the ODBC drivers and now > everything works perfectly. > > Now the downside. > Unfortunately our current client insists on using NT not Linux. > > I have installed PostgreSQL 6.5 on cygwin 20.1 on NT 4.0 > (See "Install log" below for exact versions of the various > components.) > I am having freeze up problems. I recompiled with both > -g and -O2 turned off in the vain that hope it might help. > "postmaster -i -d 3" and "postmaster -i -o -F" both > exhibit intermittent freeze ups when a new backend starts. > > In LOG1 below I started the postmaster, connected from > psql on my linux box, then quit straight away. Works fine. > > LOG2 below shows one successful connection followed by > one the freezes at InitPostgres. There were dozens of > good connections before the one shown here. > > I restarted "postmaster -i" (no debug messages) and > was able to run 8 clients simultaneously producing > about 8 connections per second. This was stable. > I tried it again a few times and it mostly worked > but froze sometimes. > > Running "postmaster -i -o -F" (no fsync) brought back > the instability. > > I noticed that after a freeze I would be less likely to > freeze again if I restarted the ipc-daemon. At one point > the ipc daemon was using 25% cpu after I had killed all > the crashed backends. > > My client opens and closes the connection to the back > end allot. I tried altering it to keep the connections > open (not feasible for our release version) and this > made things more stable due to there being fewer > connections. So the query handling seems ok, the > freeze only happens when a new backend starts. > > Can anyone suggest anything that I might do to fix this? > I realize PG on NT is a young port. I may be able to spend > a little time on this myself if someone can point me in > the right direction. The freezing of a newly created backend is a known problem. But I don't know exactly what is the problem. You can attach gdb to the freezed process and look where it is. gdb 4.18 from Mumit Khan is able to attach to a running process (needs Windows process id from "ps -l"). It can be a locking problem in semaphores SysV IPC (cygipc library) or spinlocks (from PostgreSQL)... I don't have enough time to solve this, sorry. Any help is welcomed. Dan -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Horak Daniel To: "'Sam@OConnor.net'" Cc: "'cygwin@sourceware.cygnus.com'" Subject: RE: Postgres on NT freezing Date: Wed, 30 Jun 1999 22:10:00 -0000 Message-ID: <2E7F82FAC1FCD2118E1500A024B3BF907DED10@exchange.mmp.plzen-city.cz> X-SW-Source: 1999-06n/msg00563.html Message-ID: <19990630221000.9SmB2BUC-Tdbj3UEfQ0fxNt6hMRLwcFSNZxJgu5F4vI@z> > I have been using PostgreSQL 6.4.2 on Debain GNU/Linux > for a few months. I am using the Windows ODBC drivers > and a C++/MFC client program. > I fixed a few bugs in the ODBC drivers and now > everything works perfectly. > > Now the downside. > Unfortunately our current client insists on using NT not Linux. > > I have installed PostgreSQL 6.5 on cygwin 20.1 on NT 4.0 > (See "Install log" below for exact versions of the various > components.) > I am having freeze up problems. I recompiled with both > -g and -O2 turned off in the vain that hope it might help. > "postmaster -i -d 3" and "postmaster -i -o -F" both > exhibit intermittent freeze ups when a new backend starts. > > In LOG1 below I started the postmaster, connected from > psql on my linux box, then quit straight away. Works fine. > > LOG2 below shows one successful connection followed by > one the freezes at InitPostgres. There were dozens of > good connections before the one shown here. > > I restarted "postmaster -i" (no debug messages) and > was able to run 8 clients simultaneously producing > about 8 connections per second. This was stable. > I tried it again a few times and it mostly worked > but froze sometimes. > > Running "postmaster -i -o -F" (no fsync) brought back > the instability. > > I noticed that after a freeze I would be less likely to > freeze again if I restarted the ipc-daemon. At one point > the ipc daemon was using 25% cpu after I had killed all > the crashed backends. > > My client opens and closes the connection to the back > end allot. I tried altering it to keep the connections > open (not feasible for our release version) and this > made things more stable due to there being fewer > connections. So the query handling seems ok, the > freeze only happens when a new backend starts. > > Can anyone suggest anything that I might do to fix this? > I realize PG on NT is a young port. I may be able to spend > a little time on this myself if someone can point me in > the right direction. The freezing of a newly created backend is a known problem. But I don't know exactly what is the problem. You can attach gdb to the freezed process and look where it is. gdb 4.18 from Mumit Khan is able to attach to a running process (needs Windows process id from "ps -l"). It can be a locking problem in semaphores SysV IPC (cygipc library) or spinlocks (from PostgreSQL)... I don't have enough time to solve this, sorry. Any help is welcomed. Dan -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com