From mboxrd@z Thu Jan 1 00:00:00 1970 From: Horak Daniel To: "'pgsql-hackers@postgreSQL.org'" Cc: "'cygwin@sourceware.cygnus.com'" , "'Joost Kraaijeveld'" Subject: backend freezeing on win32 fixed (I hope ;-) ) Date: Mon, 16 Aug 1999 02:36:00 -0000 Message-id: <2E7F82FAC1FCD2118E1500A024B3BF907DED3B@exchange.mmp.plzen-city.cz> X-SW-Source: 1999-08/msg00264.html Hi, I think I have fixed the freezing of the postgres backend on Windows NT. Now it survives 5 regression test in a cycle with some concurrent connections during running the tests. Where the problem was (manual backtrace): - InitPostgres() (utils/init/postinit.c) - InitProcess() (storage/lmgr/proc.c) - IpcSemaphoreCreate() (storage/ipc/ipc.c) - semget() (now in libcygipc - sem.c) - sem_connect() (sem.c) - WaitForSingleObject() (win32 system call) - freezing.... It have looked like a problem with initializing the same semaphore for second time (they are "preinitialized" for performance reasons in InitProcGlobal() in storage/lmgr/proc.c) The fix (made for v6.5.1) is here: ------------------------------- --- src/backend/storage/lmgr/proc.c.old Sat Aug 14 16:50:19 1999 +++ src/backend/storage/lmgr/proc.c Sat Aug 14 16:50:52 1999 @@ -160,6 +160,7 @@ * Pre-create the semaphores for the first maxBackends processes, * unless we are running as a standalone backend. */ +#ifndef __CYGWIN__ if (key != PrivateIPCKey) { for (i = 0; @@ -180,6 +181,7 @@ ProcGlobal->freeSemMap[i] = (1 << PROC_NSEMS_PER_SET); } } +#endif /* __CYGWIN__ */ } } ------------------------------- Dan PS: I have packed the tree after "make install" for 6.5.1 with the patch above, so it is a "binary distribution". ---------------------------------------------- Daniel Horak network and system administrator e-mail: horak@mmp.plzen-city.cz privat e-mail: dan.horak@email.cz ICQ:36448176 ---------------------------------------------- -- 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: "'pgsql-hackers@postgreSQL.org'" Cc: "'cygwin@sourceware.cygnus.com'" , "'Joost Kraaijeveld'" Subject: backend freezeing on win32 fixed (I hope ;-) ) Date: Tue, 31 Aug 1999 23:49:00 -0000 Message-ID: <2E7F82FAC1FCD2118E1500A024B3BF907DED3B@exchange.mmp.plzen-city.cz> X-SW-Source: 1999-08n/msg00264.html Message-ID: <19990831234900.nX2492SQwKXBD6mWBY9l0kAKoX0dZdhVz_tGUPKqc8o@z> Hi, I think I have fixed the freezing of the postgres backend on Windows NT. Now it survives 5 regression test in a cycle with some concurrent connections during running the tests. Where the problem was (manual backtrace): - InitPostgres() (utils/init/postinit.c) - InitProcess() (storage/lmgr/proc.c) - IpcSemaphoreCreate() (storage/ipc/ipc.c) - semget() (now in libcygipc - sem.c) - sem_connect() (sem.c) - WaitForSingleObject() (win32 system call) - freezing.... It have looked like a problem with initializing the same semaphore for second time (they are "preinitialized" for performance reasons in InitProcGlobal() in storage/lmgr/proc.c) The fix (made for v6.5.1) is here: ------------------------------- --- src/backend/storage/lmgr/proc.c.old Sat Aug 14 16:50:19 1999 +++ src/backend/storage/lmgr/proc.c Sat Aug 14 16:50:52 1999 @@ -160,6 +160,7 @@ * Pre-create the semaphores for the first maxBackends processes, * unless we are running as a standalone backend. */ +#ifndef __CYGWIN__ if (key != PrivateIPCKey) { for (i = 0; @@ -180,6 +181,7 @@ ProcGlobal->freeSemMap[i] = (1 << PROC_NSEMS_PER_SET); } } +#endif /* __CYGWIN__ */ } } ------------------------------- Dan PS: I have packed the tree after "make install" for 6.5.1 with the patch above, so it is a "binary distribution". ---------------------------------------------- Daniel Horak network and system administrator e-mail: horak@mmp.plzen-city.cz privat e-mail: dan.horak@email.cz ICQ:36448176 ---------------------------------------------- -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com