public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* pipe error on 64bit
@ 2014-06-20 15:00 Marco Atzeri
  2014-06-23  9:20 ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Atzeri @ 2014-06-20 15:00 UTC (permalink / raw)
  To: cygwin

Hi,

trying to debug why recent postgresql code is failing only on
cygwin64 (all other platform and cygwin 32 are fine)

$ uname -vrm
1.7.30(0.272/5/3) 2014-05-23 10:36 x86_64

I noticed this strange output in the strace log

   102    6076 [main] pg_regress 8200 transport_layer_pipes::connect: 
Try to connect to named pipe: \\.\pipe\cygwin-0eb90a57d5759b7b-lpc
   115    6191 [main] pg_regress 8200 transport_layer_pipes::connect: 
Try to connect to named pipe: \\.\pipe\cygwin-0eb90a57d5759b7b-lpc
   600    6791 [main] pg_regress 8200 transport_layer_pipes::write: 
error writing to pipe, error = 233
    27    6818 [main] pg_regress 8200 __set_errno: virtual ssize_t 
transport_layer_pipes::write(void*, size_t):223 setting errno 22
    28    6846 [main] pg_regress 8200 client_request::send: request body 
write failure: only 18446744073709551615 bytes sent of 36, error = 22(233)
                      ^^^ ?

  1436    8282 [main] pg_regress 8200 transport_layer_pipes::connect: 
Try to connect to named pipe: \\.\pipe\cygwin-0eb90a57d5759b7b-lpc
   375    8657 [main] pg_regress 8200 transport_layer_pipes::write: 
error writing to pipe, error = 233
    27    8684 [main] pg_regress 8200 __set_errno: virtual ssize_t 
transport_layer_pipes::write(void*, size_t):223 setting errno 22
    27    8711 [main] pg_regress 8200 client_request::send: request body 
write failure: only 18446744073709551615 bytes sent of 24, error = 22(233)
   204    8915 [main] pg_regress 8200 transport_layer_pipes::connect: 
Try to connect to named pipe: \\.\pipe\cygwin-0eb90a57d5759b7b-lpc
   391    9306 [main] pg_regress 8200 transport_layer_pipes::write: 
error writing to pipe, error = 233
    28    9334 [main] pg_regress 8200 __set_errno: virtual ssize_t 
transport_layer_pipes::write(void*, size_t):223 setting errno 22
    19    9353 [main] pg_regress 8200 client_request::send: request body 
write failure: only 18446744073709551615 bytes sent of 12, error = 22(233)


it looks a possible mismatch in the size of some variable

Suggestion ?
Marco




--
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] 3+ messages in thread

* Re: pipe error on 64bit
  2014-06-20 15:00 pipe error on 64bit Marco Atzeri
@ 2014-06-23  9:20 ` Corinna Vinschen
  2014-06-23  9:33   ` Marco Atzeri
  0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2014-06-23  9:20 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1488 bytes --]

On Jun 20 16:59, Marco Atzeri wrote:
> Hi,
> 
> trying to debug why recent postgresql code is failing only on
> cygwin64 (all other platform and cygwin 32 are fine)
> 
> $ uname -vrm
> 1.7.30(0.272/5/3) 2014-05-23 10:36 x86_64
> 
> I noticed this strange output in the strace log
> 
>   102    6076 [main] pg_regress 8200 transport_layer_pipes::connect: Try to
> connect to named pipe: \\.\pipe\cygwin-0eb90a57d5759b7b-lpc
>   115    6191 [main] pg_regress 8200 transport_layer_pipes::connect: Try to
> connect to named pipe: \\.\pipe\cygwin-0eb90a57d5759b7b-lpc
>   600    6791 [main] pg_regress 8200 transport_layer_pipes::write: error
> writing to pipe, error = 233
>    27    6818 [main] pg_regress 8200 __set_errno: virtual ssize_t
> transport_layer_pipes::write(void*, size_t):223 setting errno 22
>    28    6846 [main] pg_regress 8200 client_request::send: request body
> write failure: only 18446744073709551615 bytes sent of 36, error = 22(233)
>                      ^^^ ?

8 byte signed integer -1, accidentally printed as unsigned value.  I
fixed that in CVS.  Write returned -1 here because the pipe write
returned an error code 233, ERROR_PIPE_NOT_CONNECTED.  It looks like the
client process died for some reason.  This reason is not visible in the
output of cygserver, of course.


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: pipe error on 64bit
  2014-06-23  9:20 ` Corinna Vinschen
@ 2014-06-23  9:33   ` Marco Atzeri
  0 siblings, 0 replies; 3+ messages in thread
From: Marco Atzeri @ 2014-06-23  9:33 UTC (permalink / raw)
  To: cygwin

On 23/06/2014 11:20, Corinna Vinschen wrote:
> On Jun 20 16:59, Marco Atzeri wrote:
>> Hi,
>>


>>    600    6791 [main] pg_regress 8200 transport_layer_pipes::write: error
>> writing to pipe, error = 233
>>     27    6818 [main] pg_regress 8200 __set_errno: virtual ssize_t
>> transport_layer_pipes::write(void*, size_t):223 setting errno 22
>>     28    6846 [main] pg_regress 8200 client_request::send: request body
>> write failure: only 18446744073709551615 bytes sent of 36, error = 22(233)
>>                       ^^^ ?
>
> 8 byte signed integer -1, accidentally printed as unsigned value.  I
> fixed that in CVS.  Write returned -1 here because the pipe write
> returned an error code 233, ERROR_PIPE_NOT_CONNECTED.  It looks like the
> client process died for some reason.  This reason is not visible in the
> output of cygserver, of course.

Hi Corinna,
sorry, I realized after sending, that I was looking at a red herring.
The real error = 233 was clearly already there.

I have identified what is going wrong on the process at the other side
of the pipe : an unexpected output from getaddrinfo for the "127.0.0.1" 
case; but not yet why as an equivalent test case is working like charm.

I suspect a incorrectly initialized pointer given as input
to getaddrinfo in a corner case.

> Corinna
Marco



--
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] 3+ messages in thread

end of thread, other threads:[~2014-06-23  9:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-20 15:00 pipe error on 64bit Marco Atzeri
2014-06-23  9:20 ` Corinna Vinschen
2014-06-23  9:33   ` Marco Atzeri

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