develooper Front page | perl.perl5.porters | Postings from August 2013

[perl #119097] print returning EINTR in 5.14

Thread Previous | Thread Next
From:
Victor Efimov via RT
Date:
August 12, 2013 09:02
Subject:
[perl #119097] print returning EINTR in 5.14
Message ID:
rt-3.6.HEAD-2552-1376298110-1300.119097-15-0@perl.org
attaching fixes to eintr_print.t

On Sun Aug 11 05:18:43 2013, vsespb wrote:
> Also,
> 
> (1)
> 
> http://perldoc.perl.org/perlipc.html#Deferred-Signals-%28Safe-Signals%29
> > the solution is to use the :perlio layer to do IO--at least on those
> handles that you want to be able to break into with signals.
> 
> http://perldoc.perl.org/PerlIO.html
> > The default can be overridden by setting the environment variable
> PERLIO to a space separated list of layers
> 
> it seems that the test initially had
>  binmode $fh, ":perlio";
> 
> but PERLIO=stdio overrides this.
> so phrase "The default can be overridden by setting the environment
> variable PERLIO" does not look correct. Not only default is overriden,
> but any atempt to use the layer.
> 
> (2)
> 
> There is a ticket related to eintr.t
> https://rt.perl.org/rt3/Ticket/Display.html?id=85842
> Long story short (my understanding): 
> 
> 1. Commit http://perl5.git.perl.org/perl.git/commit/b83080de5c4254
> introduce eintr.t problems under freebsd and some solaris versions
> 2. Those OS blacklisted in eintr.t
> 3. It still has problems on older linuxes
> 4. According to this comment
> https://rt.perl.org/rt3/Ticket/Display.html?id=84688#txn-871204
> any (or some) IO in signal handler can be a problem, however it should
> not (according to perlipc)
> 
> So, according to this ticket it might be a good idea to:
> a) copy OS blacklist from eintr.t to eintr_print.t
> b) remove 'print "# ALRM $$\n"' from $SIG{ALRM}
> 
> 
> 
> 
> On Sun Aug 11 02:41:44 2013, vsespb wrote:
> > Seems it hangs (in 100% of cases) when PERLIO=stdio
> > 
> > can be fixed with
> > 
> > skip_all("not supposed to work with stdio")
> >     if (exists $ENV{PERLIO} && $ENV{PERLIO} =~ /stdio/ );
> > 
> > similar code exits in eintr.t:
> > 
> > # XXX for some reason the stdio layer doesn't seem to interrupt
> > # write system call when the alarm triggers.  This makes the tests
> > # hang.
> > 
> > if (exists $ENV{PERLIO} && $ENV{PERLIO} =~ /stdio/  ) {
> >         skip_all('stdio not supported for this script');
> >         exit 0;
> > }
> > 
> > 
> > 
> > On Sun Aug 11 01:19:12 2013, vsespb wrote:
> > > hm, that's sad :( i've tested it for stability like this on Linux
x86-64
> > > and OpenBSD:
> > > 
> > > ( seq 10000 |xargs -P 100 -n 1 ./perl t/io/eintr_print.t  ) && echo
> > ALL_FINE
> > > 
> > > (i.e. 100 concurrent runs) and it was fine.
> > > 
> > > On Sat Aug 10 17:02:36 2013, tonyc wrote:
> > > > On Sat Aug 10 15:51:13 2013, tonyc wrote:
> > > > > This test has blocked one of my darwin smokers, but doesn't
> appear to
> > > > > block every time:
> > > > 
> > > > It also blocked on Linux amd64, Solaris 11, NetBSD 5.1.2.
> > > > 
> > > > Tony
> > > 
> > > 
> > 
> > 
> 
> 




---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=119097

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About