Skip Menu |

This queue is for tickets about the IPC-Run CPAN distribution.

Report information
The Basics
Id: 38193
Status: resolved
Priority: 0/
Queue: IPC-Run

People
Owner: TODDR [...] cpan.org
Requestors: vadym.chepkov [...] verizonbusiness.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.89
Fixed in: (no value)



Subject: t/pty bug
Date: Tue, 05 Aug 2008 13:21:02 +0000
To: bug-IPC-Run [...] rt.cpan.org
From: "Chepkov, Vadym" <vadym.chepkov [...] verizonbusiness.com>
Download pty.out
application/octet-stream 8.8k

Message body not shown because it is not plain text.

Hello, I stumbled on a bug in IPC-Run-0.80 I hope you would help me to solve. I try to build it on AIX 5.3. perl 5.8.2 Attached is output of make test TEST_FILES=t/pty.t TEST_VERBOSE=1 IPCRUNDEBUG=4 I tried to install it regardless, but it fails in exactly the same place the test does. Thank you very much. Sincerely, Vadym Chepkov
Same issue here on Linux with perl 5.10: t/pty.t bails out after test 13. Here is the last part of output of 'make test TEST_FILES=t/pty.t TEST_VERBOSE=1 IPCRUNDEBUG=4': ok 12 ok 13 IPC::Run 0000 01234-67---1 [#2(29244)]: ** finishing IPC::Run 0000 01234-67---1 [#2(29244)]: checking for more input fd 11 (kid's stdin) IPC::Run 0000 01234-67---1 [#2(29244)]: writing to fd 11 (kid's stdin) IPC::Run 0000 01234-67---1 [#2(29244)]: write( 11, 'quit IPC::Run 0000 01234-67---1 [#2(29244)]: ' ) = 5 IPC::Run 0000 01234-67---1 [#2(29244)]: closing fd 11 (kid's stdin) IPC::Run 0000 01234-67---- [#2(29244)]: close( 11 ) = 0 IPC::Run 0000 01234-67---- [#2(29244)]: fds for select: ----r------- IPC::Run 0000 01234-67---- [#2(29244)]: timeout=0.01 IPC::Run 0000 01234-67---- [#2(29244)]: selected ----r------- IPC::Run 0000 01234-67---- [#2(29244)]: filtering data from fd 4 (kid's stdout) IPC::Run 0000 01234-67---- [#2(29244)]: reading from fd 4 (kid's stdout) IPC::Run 0000 01234-67---- [#2(29244)]: read( 4 ) = 12 chars 'QUIT IPC::Run 0000 01234-67---- [#2(29244)]: quit IPC::Run 0000 01234-67---- [#2(29244)]: ' IPC::Run 0000 01234-67---- [#2(29244)]: fds for select: ----r------- IPC::Run 0000 01234-67---- [#2(29244)]: timeout=forever IPC::Run 0000 01234-67---- [#2(29244)]: selected ----r------- IPC::Run 0000 01234-67---- [#2(29244)]: filtering data from fd 4 (kid's stdout) IPC::Run 0000 01234-67---- [#2(29244)]: reading from fd 4 (kid's stdout) ack Erreur d'entrée/sortie: read( 4 ) at /home/guillomovitch/tmp/Pya17f_Hxq/perl-IPC-Run/BUILD/IPC-Run-0.82/blib/lib/IPC/Run/IO.pm line 552 # Looks like you planned 32 tests but only ran 13. # Looks like your test died just after 13. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 19/32 subtests
Subject: Out of Office AutoReply: [rt.cpan.org #38193] t/pty bug
Date: Sun, 28 Dec 2008 19:13:00 +0000
To: Guillaume Rousse via RT <bug-IPC-Run [...] rt.cpan.org>
From: "Chepkov, Vadym" <vadym.chepkov [...] verizonbusiness.com>
I will be out on vacation from 12/20 returning 1/5. If this is an emergency, please contact Bob Smolarek.
I suspect this is a locale dependency. On cpan testers I see that German and French locale both fail on the pty test and On my own box I just tried with setting the environment variable LANG to "C" and the test suddenly passed. So if you can try LANG=C.
Subject: RE: [rt.cpan.org #38193] t/pty bug
Date: Mon, 02 Feb 2009 15:18:01 +0000
To: bug-IPC-Run [...] rt.cpan.org
From: "Chepkov, Vadym" <vadym.chepkov [...] verizon.com>
It was specifically set to C Show quoted text
-----Original Message----- From: Andreas Koenig via RT [mailto:bug-IPC-Run@rt.cpan.org] Sent: Sunday, February 01, 2009 4:28 PM To: Chepkov, Vadym Subject: [rt.cpan.org #38193] t/pty bug <URL: https://rt.cpan.org/Ticket/Display.html?id=38193 > I suspect this is a locale dependency. On cpan testers I see that German and French locale both fail on the pty test and On my own box I just tried with setting the environment variable LANG to "C" and the test suddenly passed. So if you can try LANG=C.
On Mon Feb 02 10:19:09 2009, vadym.chepkov@verizon.com wrote: Show quoted text
> It was specifically set to C >
What about LC_ALL? This one has precedence over the LANG variable. Regards, Slaven Show quoted text
> > -----Original Message----- > From: Andreas Koenig via RT [mailto:bug-IPC-Run@rt.cpan.org] > Sent: Sunday, February 01, 2009 4:28 PM > To: Chepkov, Vadym > Subject: [rt.cpan.org #38193] t/pty bug > > <URL: https://rt.cpan.org/Ticket/Display.html?id=38193 > > > I suspect this is a locale dependency. On cpan testers I see that German > and French locale both fail on the pty test and On my own box I just > tried with setting the environment variable LANG to "C" and the test > suddenly passed. > > So if you can try LANG=C.
From: "Jean-Baptiste Mazon" <jmazon [...] gmail.com>
Le Lun. Mai. 11 12:04:44 2009, SREZIC a écrit : Show quoted text
> What about LC_ALL? This one has precedence over the LANG variable.
LC_ALL=C does let the test suite go through. Unfortunately, I can't set LC_ALL for all programs that would be liable to use IPC::Run. Obviously, the core of the issue is the english-centric error checking in IPC::Run and IPC:Run::IO die $@ unless $@ =~ /^Input\/output error: read/ || ($@ =~ /input or output/ && $^O =~ /aix/) || ( Win32_MODE && $@ =~ /Bad file descriptor/ ); and (($c < 200) and ($@||'')=~ m/^Resource temporarily/) and redo; The attached patch fixes the problem for the Linux systems I tested on. There seems to be special cases for aix and Win32; I have neither tested nor attempted to fix those---supposing they're actually impacted in the first place. On IPC-Run-0.84 I tested on, you'd have to have locales set to english at all times you use it. With my patch, you only need it to be the same at BEGIN time and when you use it. Perfection would be not caring about them. But from what I browsed, the module's exception mechanism is a bit too string-oriented for that to be easy. JB
diff -ur lib/IPC/Run.pm blib/lib/IPC/Run.pm --- lib/IPC/Run.pm 2009-07-15 16:52:34.000161000 +0200 +++ blib/lib/IPC/Run.pm 2009-07-15 16:53:05.001288000 +0200 @@ -1073,6 +1073,16 @@ ############################################################################### ## +## Error constants, not too locale-dependant +use vars qw( $_EIO $_EAGAIN ); +use Errno qw( EIO EAGAIN ); +BEGIN { + local $!; + $! = EIO; $_EIO = qr/^$!/; + $! = EAGAIN; $_EAGAIN = qr/^$!/; +} + +## ## State machine states, set in $self->{STATE} ## ## These must be in ascending order numerically @@ -2399,7 +2409,7 @@ ## read() throws the bad file descriptor message if the ## kid dies on Win32. die $@ unless - $@ =~ /^Input\/output error: read/ || + $@ =~ $_EIO || ($@ =~ /input or output/ && $^O =~ /aix/) || ( Win32_MODE && $@ =~ /Bad file descriptor/ ); } diff -ur lib/IPC/Run/IO.pm blib/lib/IPC/Run/IO.pm --- lib/IPC/Run/IO.pm 2009-07-15 16:52:33.000772000 +0200 +++ blib/lib/IPC/Run/IO.pm 2009-07-15 16:53:05.001223000 +0200 @@ -558,7 +558,7 @@ $r = eval { IPC::Run::get_more_input(); }; $c++; ##$@ and warn "redo ", substr($@, 0, 20) , " "; - (($c < 200) and ($@||'')=~ m/^Resource temporarily/) and redo; + (($c < 200) and ($@||'')=~ $IPC::Run::_EAGAIN) and redo; } ( $IPC::Run::filter_op, $IPC::Run::filter_num ) = ( $saved_op, $saved_num ); $self->{HARNESS} = undef;
RT#25058, RT#64695, RT#62693 are duplicates of this bug -- Olivier Mengué - http://search.cpan.org/~dolmen/ http://github.com/dolmen/
Subject: Out of Office AutoReply: [rt.cpan.org #38193] t/pty bug
Date: Fri, 25 Mar 2011 18:33:56 +0000
To: Olivier 'dolmen' Mengué via RT <bug-IPC-Run [...] rt.cpan.org>
From: "Chepkov, Vadym" <vadym.chepkov [...] verizon.com>
I am no longer working for Verizon. Please contact soa_support@lists.verizonbusiness.com or registry_support@lists.verizonbusiness.com for application support. Vadym Chepkov vchepkov@gmail.com
Multiple tickets refer to this ticket. No solution yet.
Show quoted text
> No solution yet.
Explain how you arrived at this conclusion. The patch named IPC-Run-0.84-locale.patch that was attached to this ticket in 2009 works. I just applied it manually to 0.89 and the tests pass all successfully.
On Wed Jun 29 13:27:07 2011, DAXIM wrote: Show quoted text
> > No solution yet.
> Explain how you arrived at this conclusion. > > The patch named IPC-Run-0.84-locale.patch that was attached to this > ticket in 2009 works. I just applied it manually to 0.89 and the tests > pass all successfully.
As I understand it, Windows would not function with this patch. I would prefer not to break windows in IPC::Run since I know it's heavily used there. Honestly I haven't looked closely at the change in over a year. I'll try to take a look at this later tonight.
RT-Send-CC: jmazon [...] gmail.com, vadym.chepkov [...] verizon.com
Released on 0.90_03