public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: [HACKERS] backend freezeing on win32 fixed (I hope ;-) )
@ 1999-08-16 14:55 McCunney, Dennis
  1999-08-31 23:49 ` McCunney, Dennis
  0 siblings, 1 reply; 12+ messages in thread
From: McCunney, Dennis @ 1999-08-16 14:55 UTC (permalink / raw)
  To: 'cygwin@sourceware.cygnus.com'

> -----Original Message-----
> From: Chris Faylor [ mailto:cygwin@sourceware.cygnus.com ]
> Sent: Monday, August 16, 1999 4:40 PM
> To: McCunney, Dennis
> Cc: 'cygwin@sourceware.cygnus.com'
> Subject: Re: [HACKERS] backend freezeing on win32 fixed (I hope ;-) )
> > 
> >>We don't have correct emulation of IPC semapahores since they are not
> >>implemented at all.  I assume that if you're relying on persistent
> >>semaphores, then some add-on package is being used.
> >
> >How about an additional section in the API FAQ with a list of stuff
> >that _isn't_ implemented, together with a note for each on whether it
> >isn't implemented because you haven't needed to, and if anyone does,
> >please send a patch, or it isn't implemented because you don't think it
> >_can_ be done in the Win32 environment, and if anyone figures out a
> >way, please send a patch?
> 
> This is a good idea.  If you send me a patch for the API FAQ 
> and I'll be glad to add this.

Thanks.  I figured it would cut down a few questions of the "Does Cygwin
implement this?" variety.  I'd be tempted to make it the first thing
a new Cygwin programmer sees. 
 
> If you aren't too sure what to add, you can get started with 
> the semaphores which were mentioned in this thread.  Also, if you peruse
the 
> mailing list archives you should be able to find additional items.

I have a local copy of the FAQ, so I'll start with it.  The mail archives 
will take more doing.  Is there a chance of getting them in a downloadable
form to review locally?  I don't have direct internet access from this work
account (Internet to the desktop is in the planning stages, but Y2K test and
remediation is the current hot button), and doing it via 56K dial-up from
home is a PITA for various reasons.

I would also recommend packaging both the User Guide and the API FAQ with
the FULL.EXE release next time, instead of requiring the users to view
it on line.  I think it would help a lot in cutting down confusion.

I can probably make a start on the list of unimplemented stuff, but you'll 
have to tell me why it wasn't implemented.
 
> Looking forward to your contribution...

I'll do what I can, but I don't recommend holding your breath while you 
wait.  :-)

> -chris
______
Dennis

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: [HACKERS] backend freezeing on win32 fixed (I hope ;-) )
@ 1999-08-17  4:53 Horak Daniel
  1999-08-31 23:49 ` Horak Daniel
  0 siblings, 1 reply; 12+ messages in thread
From: Horak Daniel @ 1999-08-17  4:53 UTC (permalink / raw)
  To: 'cygwin@sourceware.cygnus.com', Tom Lane
  Cc: 'Joost Kraaijeveld'

> On Mon, Aug 16, 1999 at 10:07:00AM -0400, Tom Lane wrote:
> >Is it possible that the CygWin environment doesn't have a correct
> >emulation of IPC semaphores, such that a sema allocated by 
> one process
> >(the postmaster) is not available to other procs (the backends)?
> >That would explain preallocation not working --- but if 
> that's it then
> >we have major problems in other places, since the code assumes that a
> >sema once allocated will remain available to later backends.
> 
> We don't have correct emulation of IPC semapahores since they are not
> implemented at all.  I assume that if you're relying on persistent
> semaphores, then some add-on package is being used.

We are using the cygipc library from Ludovic Lange
( http://www.multione.capgemini.fr/tools/pack_ipc/ ) which is the only
implementation of SysV IPC for Cygwin I know.

			Dan

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: [HACKERS] backend freezeing on win32 fixed (I hope ;-) )
@ 1999-08-16 11:08 McCunney, Dennis
  1999-08-16 13:38 ` Chris Faylor
  1999-08-31 23:49 ` McCunney, Dennis
  0 siblings, 2 replies; 12+ messages in thread
From: McCunney, Dennis @ 1999-08-16 11:08 UTC (permalink / raw)
  To: 'cygwin@sourceware.cygnus.com'

> -----Original Message-----
> From: Chris Faylor [ mailto:cgf@cygnus.com ]
> Sent: Monday, August 16, 1999 1:10 PM
> To: Tom Lane
> Cc: Horak Daniel; 'pgsql-hackers@postgreSQL.org';
> 'cygwin@sourceware.cygnus.com'; 'Joost Kraaijeveld'
> Subject: Re: [HACKERS] backend freezeing on win32 fixed (I hope ;-) )
> 
> We don't have correct emulation of IPC semapahores since they are not
> implemented at all.  I assume that if you're relying on persistent
> semaphores, then some add-on package is being used.
> 
> cgf

How about an additional section in the API FAQ with a list of stuff
that _isn't_ implemented, together with a note for each on whether
it isn't implemented because you haven't needed to, and if anyone does,
please send a patch, or it isn't implemented because you don't think it 
_can_ be done in the Win32 environment, and if anyone figures out a way, 
please send a patch?

That info is there, but it might be convenient to have it all in one
place.

______
Dennis

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 12+ messages in thread
* backend freezeing on win32 fixed (I hope ;-) )
@ 1999-08-16  2:36 Horak Daniel
  1999-08-16  7:08 ` [HACKERS] " Tom Lane
  0 siblings, 1 reply; 12+ messages in thread
From: Horak Daniel @ 1999-08-16  2:36 UTC (permalink / raw)
  To: 'pgsql-hackers@postgreSQL.org'
  Cc: 'cygwin@sourceware.cygnus.com', 'Joost Kraaijeveld'

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~1999-08-31 23:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-16 14:55 [HACKERS] backend freezeing on win32 fixed (I hope ;-) ) McCunney, Dennis
1999-08-31 23:49 ` McCunney, Dennis
  -- strict thread matches above, loose matches on Subject: below --
1999-08-17  4:53 Horak Daniel
1999-08-31 23:49 ` Horak Daniel
1999-08-16 11:08 McCunney, Dennis
1999-08-16 13:38 ` Chris Faylor
1999-08-31 23:49   ` Chris Faylor
1999-08-31 23:49 ` McCunney, Dennis
1999-08-16  2:36 Horak Daniel
1999-08-16  7:08 ` [HACKERS] " Tom Lane
1999-08-16 10:08   ` Chris Faylor
1999-08-31 23:49     ` Chris Faylor
1999-08-31 23:49   ` Tom Lane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).