Re: Broken pipe on Solaris

Stephen Dahmen (sdahmen@mhtc.net)
Tue, 4 Mar 1997 09:27:19 -0600 (CST)


Craig,

I experienced this problem, and it seemed to happen when there was a redirect sequence returned. The first connect was fine, but then when it tried ot handle the redirect, SIGPIPE was raised.  The problem was intermittent.... I could not find the causative factor.  I just wrote a sig handler for SIGPIPE and noted the offensive URL and went on to process the other URLS I had.  Could also have had that handler try it a few more times to get it to 'go'.

I found this out by turning on the debug flag for the library (exact form escapes me now and I dont have access to the script at this moment).  You can witness the whole client/server exchange and find out pretty much where the sigpipe is happening.

Hope this helps!!

Stephen

At 1:17 AM 3/4/97, Craig Wood wrote:
>I am having terrible trouble with Broken Pipes using libwww-perl on Solaris.
>
>It does not seem to be just a connection refused problem.
>
>If anyone knows why this may be happening to me, or how I can diagnose the 
>problem deeper than just the knowing the URL's that cause the problem,
>please help.
>
>Their may be an answer in the below text, but unfortunately I don't
>understand German (If that's what it is).
>
>Thank You in advance.
>
>Craig Wood
>
>Gisle Aas <aas@bergen.sn.no> tastet:
>> If the server just close the connection when we connect we might get a
>> SIGPIPE signal on Solaris.  Does anybody know why it should be like
>> that?  What other systems will throw a SIGPIPE on a program that just
>> tries to connect?
>
>Jeg har f}tt sigpipe med http implementasjonen min ved en anledning:
>n}r jeg genererte altforstore requester p.g.a. en bug.  Da stengte
>en del servere forbindelsen etter en stund.  Du skal i f|lge Stevens
>f} SIGPIPE n}r remote end har stengt leseenden og du fors|ker } skrive
>p} socketen.  Jeg testet p} solaris, irix og linux (tror jeg), alle
>leverte sigpipe.  Det varierte dog hvordan sigpipe ble fanget med de
>perl kompileringene jeg hadde til r}dighet.  P} solaris var det en bug
>p} et eller annet niv} som hindret meg } } f} tak i sigpipe signalet,
>det ble bare skrevet en beskjed p} tty'en om at sigpipe var mottatt.
>Men p} den annen side, programmet aborterte ikke n}r det skjedde.
>
>> Does libwww-perl need a $SIG{PIPE} handler?
>
>Tja, jeg kommenterte ut min etter jeg fant buggen, og mot tih s} f}r jeg
>dette:
>
>$ w3mir -p 0 -r http://www.edb.tih.no/
>w3mir: http://www.edb.tih.no:80/robots.txt
>w3mir: index.html Connection refused
>
>Kanskje det er en bug som gj|r at du f}r sigpipe? ;-)  (hum, hvorfor f}r
>jeg ikke connection refused p} robots?)
>
>Nicolai

~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
Stephen Dahmen            |            CLARITY COMMUNICATIONS:
sdahmen@mhtc.net          |   Advanced Interface Solutions for the Web
__________________________|          http://www.mhtc.net/~sdahmen
                          |_____________________________________________