This is the mail archive of the cygwin@sourceware.cygnus.com 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]

RE: Postgres on NT freezing


> 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


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