-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FW: Call Nr. 6583771 (!!! HELP !!!) #675
Comments
From Richard.Hensgens@nl.origin-it.comL.S., We have encountered a very interesting problem on which you are really our Exiting a child in a forking server (example on page 194 of 'Advanced Perl We have tried almost everything within our power, e.g.: * compiling Perl on a working OS level and copying the binaries to the Nothing works out. After issuing a bug report, SUN responded with the following: In more understandable language they claimed that older versions of Solaris Does this make sense to you ? Can you help ??? P.S.: Below you can find all mail communications with SUN. Met vriendelijke groet/Kind regards, The unix guru's view on sex:
Thanks in advance.
-----Original Message----- Pieter, Before we start downgrading the SUN box, maybe first a bug report to SUN ? Regular examples from the O'Reilly Perl books work differently on Solaris Server.pl: use IO::Socket; $SIG{CHLD} = sub { wait() }; $Sock = new IO::Socket::INET( LocalPort => 9000, Proto => 'tcp', Listen => while ( $NewSock = $Sock->accept() ) if ( $Pid == 0 ) exit( 0 ); close( $Sock ); exit( 0 ); Client.pl: use IO::Socket; $Sock = new IO::Socket::INET( PeerAddr => 'tsesun01', PeerPort => 9000, foreach ( 1..10 ) close( $Sock ); exit( 0 ); Output on Solaris 2.6: nl1sahd1:root> ./Server.pl nl1sahd1:root> jobs Server serves as many requests as it should be. Output on Solaris 2.7: tsesun01:root> ./Server.pl & [1] + Done ./Server.pl & Server only serves one request and ends !!!!! |
From Richard.Hensgens@nl.origin-it.comMessage RFC822: Bug Id: 4146098 CONNECT(2) SYSTEM CALLS CONNECT(2)
Sun Release 4.1 Last change: 21 January 1990 3 ============================================================================SVR4 example sigaction() is needed to set SA_RESTART. is sent to process while waiting. /*
*/ void handler(sig) main(argc, argv)
\n");
} Justification: Suggested fix: Diffs are shown below for sparc and x86 (diffs are identical for
note _cerror maps() ERESTART to EINTR ####### usr/src/lib/libc/sparc/sys ###### % diff -c _so_connect.s.1.2 _so_connect.s *** 18,24 **** #include "SYS.h" ! SYSCALL2_RESTART(_so_connect,connect)
--- 18,24 ---- #include "SYS.h" ! SYSCALL2(_so_connect,connect)
% diff -c _so_accept.s.1.2 _so_accept.s *** 19,25 **** #include "SYS.h" ! SYSCALL2_RESTART(_so_accept,accept)
--- 19,25 ---- #include "SYS.h" ! SYSCALL2(_so_accept,accept)
sctesrv 54: ##################### usr/src/lib/libc/i386/sys % diff -c _so_connect.s.1.5 _so_connect.s *** 18,25 ****
*** 18,25 ****
State triggers:
That is, the behavior is correct. Thus the only problem appears to be the ================================= 1998-06-161998-07-20I thought this fix was being done as part of the escalation process 1998-07-23My guess is that this bug got split into 2.5.1 and 2.6-and-later versions The fix here is to make the system calls underlying calls for The program in the description section tests only the connect() interface. WITHOUT THE FIX, the observed behavior is as follows with output slightly === Thus accept() call is restarted and continues sleeping.
The connect() call is restarted and fails with EINPROGRESS ==== WITH THE FIX, the observed behavior is as follows with output slightly === The accept() call now fails with EINTR even when SA_RESTART is set.
The connect() call now fails with EINTR even when SA_RESTART is set. ====
Duplicate of: Patch id:
|
From [Unknown Contact. See original ticket]This bug still seems to be present in 5.7.0@8221, only on Solaris. -spp We have encountered a very interesting problem on which you are really our Exiting a child in a forking server (example on page 194 of 'Advanced Perl We have tried almost everything within our power, e.g.: * compiling Perl on a working OS level and copying the binaries to Nothing works out. After issuing a bug report, SUN responded with the following: In more understandable language they claimed that older versions of Solaris Server.pl: use IO::Socket; $SIG{CHLD} = sub { wait() }; $Sock = new IO::Socket::INET( LocalPort => 9000, Proto => 'tcp', Listen => while ( $NewSock = $Sock->accept() ) if ( $Pid == 0 ) exit( 0 ); close( $Sock ); exit( 0 ); Client.pl: use IO::Socket; $Sock = new IO::Socket::INET( PeerAddr => 'tsesun01', PeerPort => 9000, foreach ( 1..10 ) close( $Sock ); exit( 0 ); Output on Solaris 2.6: nl1sahd1:root> ./Server.pl nl1sahd1:root> jobs Server serves as many requests as it should be. Output on Solaris 2.7: tsesun01:root> ./Server.pl & [1] + Done ./Server.pl & Server only serves one request and ends !!!!! |
From [Unknown Contact. See original ticket]perhaps on solaris 2.7 a shutdown is being performed on the socket when the "Stephen P. Potter" wrote:
close $Sock && $sockClosed=1;
close $Sock unless $sockClosed; |
From [Unknown Contact. See original ticket]Lightning flashed, thunder crashed and ___cliff rayman___ <cliff@genwax.com> wh
I think the point being made in this report is that the script functions -spp |
From @AlanBurlison"Stephen P. Potter" wrote:
Right - I've read the bugrep, played with the example code and here is The bugfix changed the behaviour so that if a signal was caught when There are two ways to fix the example script. The first is to redo the The quick and easy fix is to ignore SIGCHILD rather than catching it - Hope that helps, Alan Burlison |
From @jhi
Can I still fix IO::Socket? :-)
|
From @AlanBurlisonJarkko Hietaniemi wrote:
Hey, you're the main man... :-) Actually I was surmising from the truss output that the problem was in Alan Burlison |
From @gbarrOn Fri, Dec 22, 2000 at 12:09:40AM +0000, Alan Burlison wrote:
It may be something along the lines that IO::Socket::accept creates If this is the case, changing the return to something like the following may help $peer = accept($new,$sock) Graham. |
From [Unknown Contact. See original ticket]Lightning flashed, thunder crashed and Alan Burlison <Alan.Burlison@uk.sun.com> What I'm getting from all this is that there isn't a perceived bug in perl, -spp |
From [Unknown Contact. See original ticket]Alan Burlison <Alan.Burlison@uk.sun.com> writes:
So we can consider this a bug in IO::Socket. |
From @AlanBurlison
Correct - there is no bug in perl (well, perhaps it should return EINTR The sigaction manpage for Solaris says this: SA_RESTART So in fact the behaviour seen is as documented on Solaris. |
@gbarr - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#1564 (status was 'resolved')
Searchable as RT1564$
The text was updated successfully, but these errors were encountered: