-
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
mixing threads and Time::HiRes::ualarm() in perl5.10.0 on FreeBSD 7 segfaults #9595
Comments
From Simon.Gray@Sophos.comTo: perlbug@perl.org This is a bug report for perl from user@freebsd7_simon.eng.sophos, #!/usr/bin/perl =head1 NAME udp_server.pl - Simple sample udp echo server =head1 SERVER SYNOPSIS perl udp_server.pl --log_level 3 =head1 CLIENT SYNOPSIS # In another terminal perl udp_server.pl --client =cut package MyUDPD; #use IO::Socket qw(MSG_DONTWAIT); use Socket; my $port = 5151; ### what type of server is this - we could if (grep {/\bclient\b/i} @ARGV) { } else { ###----------------------------------------------------------------### ### set up some server parameters ### change the packet len? } ### this is the main method to override ### if we were writing a server that did both tcp and udp, # all of the client data is already in 'udp_data' } ###----------------------------------------------------------------### sub handle_client2 { my $recv_flags = 0; print "$0\nEcho server client relay\nType anything and hit enter\n"; my $sock = IO::Socket::INET->new( $sock->send($line, 0); my $data = ''; print "From the server:\n$data\n-------------------------\n"; } ###----------------------------------------------------------------### sub handle_client { $SIG{ALRM} = 'a'; ###----------------------------------------------------------------### sub subthread(){ threads->yield(); ###----------------------------------------------------------------### sub runner2(){ my $rand = int(rand(65535)); my $iaddr = gethostbyname("localhost"); my $SOCKET; socket($SOCKET, PF_INET, SOCK_DGRAM,
eval{ local $SIG{ALRM} = sub { # local $SIG{ALRM} = sub { if( $rand % 2 ){ fcntl($SOCKET, F_SETFL(), O_NONBLOCK()); while(1){ ###----------------------------------------------------------------### sub runner(){ my $recv_flags = MSG_DONTWAIT; my $s = IO::Select->new(); my $sock = IO::Socket::INET->new( $s->add($sock); my @list; $sock->send("port $rand", 0); eval { if( my $nfound = select($rout=$rin, undef, undef, 0) ){ #ualarm(0); #$s->remove($sock); Flags: Site configuration information for perl 5.10.0: Configured by user at Thu Dec 4 17:59:26 GMT 2008. Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Locally applied patches: @INC for perl 5.10.0: Environment for perl 5.10.0: |
From @jkeenanOn Thu Dec 11 05:34:06 2008, Simon.Gray@Sophos.com wrote: Is there anyway this report could be reduced to a smaller test case? If there isn't, then I think this problem will languish unaddressed for Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @dcollinsnClosing this request, because it fails to report an actionable problem. If this is still an issue, please test on a supported version of perl and Time::HiRes, assemble a minimal test case that reproduces the problem, and open a new ticket. Be sure to explain how you are running the code in question, especially since the code you provided seems to create a server of some type. -- |
@dcollinsn - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#61288 (status was 'rejected')
Searchable as RT61288$
The text was updated successfully, but these errors were encountered: