public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: what does this cygserver error mean?
@ 2011-04-18 19:27 bob 295
  2011-04-18 19:46 ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: bob 295 @ 2011-04-18 19:27 UTC (permalink / raw)
  To: cygwin

(I'm in digest mode on this list so I can't thread my response easily.)

The cygserver is setup to run as a Windows service.  As far as I can tell the 
cygserver is running when the error occurs.   What isn't clear from your 
response is what causes the named pipe to cygserver to get created?  What 
tears it down?    

In my test the sequence of each Send/Receive/Reply message pass involves these 
steps:  
1) the sender creates the shared memory and then attaches to for the purpose 
of writing a message.    
2) The receiver gets passed the shmid (via a named pipe) and attaches for the 
purpose of reading the message.   
3) The receiver will respond by writing into same shared memory area upon 
which it will detach.

I have a script which is repeatedly sending a 1k message (up to 10 times).  
The error isn't consistently happening but when it does it appears to happen 
on the first message pass.

Thanks again in advance for all your help.

bob


on Apr 15 14:53, bob 295 wrote:
> I'm getting this error associated with shared memory and cygserver (sender 
is 
> the name of my process setting and loading the shared memory):
> 
> ======== begin error snip ========
> 3 [main] sender 3684 transport_layer_pipes::connect: lost connection to 
> cygserver,  error = 2
> ======== end error snip =========
> 
> Could someone point me to a place where this error is described?   Thanks.

error = 2 is the Win32 error ERROR_FILE_NOT_FOUND returned by the
CreateFile or WaitNamedPipe function when trying to connect to cygserver
via a named pipe.

Either Cygserver isn't running or it reached the maximum number of 
parallel client connections.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: what does this cygserver error mean?
  2011-04-18 19:27 what does this cygserver error mean? bob 295
@ 2011-04-18 19:46 ` Corinna Vinschen
  0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2011-04-18 19:46 UTC (permalink / raw)
  To: cygwin

On Apr 18 13:34, bob 295 wrote:
> (I'm in digest mode on this list so I can't thread my response easily.)
> 
> The cygserver is setup to run as a Windows service.  As far as I can tell the 
> cygserver is running when the error occurs.   What isn't clear from your 
> response is what causes the named pipe to cygserver to get created?  What 
> tears it down?    

Every single request to cygserver is basically a closed operation.
A function call like shmget opens the pipe, writes a request block,
reads the reply from cygserver and closes the pipe.

> 
> In my test the sequence of each Send/Receive/Reply message pass involves these 
> steps:  
> 1) the sender creates the shared memory and then attaches to for the purpose 
> of writing a message.    
> 2) The receiver gets passed the shmid (via a named pipe) and attaches for the 
> purpose of reading the message.   
> 3) The receiver will respond by writing into same shared memory area upon 
> which it will detach.

Wouldn't it be simpler to use POSIX shared memory for that?  shm_open
allows to specify a named shared memory which all applications of a
project can share without having to use IPC to transmit the name (aka
"shmid") of the shared region.  On Cygwin it also drops the requirement
to use cygserver.

> I have a script which is repeatedly sending a 1k message (up to 10 times).  
> The error isn't consistently happening but when it does it appears to happen 
> on the first message pass.

If you could create a very simple, self-contained testscase in plain C,
I'd take a look.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: what does this cygserver error mean?
  2011-04-16  3:41 bob 295
@ 2011-04-18 12:23 ` Corinna Vinschen
  0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2011-04-18 12:23 UTC (permalink / raw)
  To: cygwin

On Apr 15 14:53, bob 295 wrote:
> I'm getting this error associated with shared memory and cygserver (sender is 
> the name of my process setting and loading the shared memory):
> 
> ======== begin error snip ========
> 3 [main] sender 3684 transport_layer_pipes::connect: lost connection to 
> cygserver,  error = 2
> ======== end error snip =========
> 
> Could someone point me to a place where this error is described?   Thanks.

error = 2 is the Win32 error ERROR_FILE_NOT_FOUND returned by the
CreateFile or WaitNamedPipe function when trying to connect to cygserver
via a named pipe.

Either Cygserver isn't running or it reached the maximum number of 
parallel client connections.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* what does this cygserver error mean?
@ 2011-04-16  3:41 bob 295
  2011-04-18 12:23 ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: bob 295 @ 2011-04-16  3:41 UTC (permalink / raw)
  To: cygwin

I'm getting this error associated with shared memory and cygserver (sender is 
the name of my process setting and loading the shared memory):

======== begin error snip ========
3 [main] sender 3684 transport_layer_pipes::connect: lost connection to 
cygserver,  error = 2
======== end error snip =========

Could someone point me to a place where this error is described?   Thanks.

bob

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2011-04-18 19:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-18 19:27 what does this cygserver error mean? bob 295
2011-04-18 19:46 ` Corinna Vinschen
  -- strict thread matches above, loose matches on Subject: below --
2011-04-16  3:41 bob 295
2011-04-18 12:23 ` Corinna Vinschen

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).