Reading from <STDIN> results in "Interrupted system call" error when SIGCHLD handler is active

Bug #1100359 reported by Dmitry
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
perl (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hi all,

I've stumbled upon quite a strange behaviour on a server which has recently been upgraded from Debian squeeze to Ubuntu 12.04. I've narrowed it down to a simple test case which is attached.

To reproduce the problem run "./f.pl | ./2.pl". Within a second (sometimes it takes a bit longer) it gives me the following:

error: Interrupted system call at ./2.pl line 8, <STDIN> line 11.

I've also tried it on 12.10 and got exactly the same behaviour.

Best regards,
--
Dmitry

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: perl 5.14.2-6ubuntu2.2
ProcVersionSignature: Ubuntu 3.2.0-35.55-generic 3.2.34
Uname: Linux 3.2.0-35-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
Date: Wed Jan 16 16:20:32 2013
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
SourcePackage: perl
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Dmitry (dmitry-panov) wrote :
Revision history for this message
Dmitry (dmitry-panov) wrote :

Apologies, you only need to run ./f.pl, not ./f.pl | ./2.pl as I suggested earlier.

Revision history for this message
Dmitry (dmitry-panov) wrote :

Hi guys,

I've done some more experiments and it looks like this bug is not ubuntu or even perl specific. It looks more likely a glibc bug. I was able to reproduce it on Debian Wheezy both with standard perl and ActivePerl 5.16. However the same ActivePerl 5.16 works fine on Debian Squeeze.

So it looks like glibc 2.11 is fine, but 2.13+ is not.

Revision history for this message
Dmitry (dmitry-panov) wrote :

Hi again,

With help from Dave Mitchell I've found out that this bug has been already fixed by the following commit: http://perl5.git.perl.org/perl.git/commitdiff/be48bbe8d671b6841c3ec7cb734b98071afe3cd9

I have applied the patch and rebuilt the source package from Ubuntu 12.04 and I can confirm that it solves the problem.

The same bug has been reported and fixed in Fedora more than a year ago: https://bugzilla.redhat.com/show_bug.cgi?id=767931

I hope it will be added in Ubuntu and Debian soon.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in perl (Ubuntu):
status: New → Confirmed
Revision history for this message
Michael Alzheimer (michael-alzheimer) wrote :

Hi all,

the same here. with DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"
perl package: 5.14.2-6ubuntu2.3
amd64.

Rebuilding perl with the above patch:
http://perl5.git.perl.org/perl.git/commitdiff/be48bbe8d671b6841c3ec7cb734b98071afe3cd9
worked.

I think it should be fixed in any service release for 12.04 lts.

the failed perl code was:

my $out=`pdf2swf $file 2>&1`;

After the external program pdf2swf wrote some stuff to STDOUT - and should be read by calling perl programm STDIN to $out variable it broke after some output lines with "SIGPIPE broken pipe".

After the recompile with the patch it runs fine now - as before (don't know which version of perl stopped working, did a release-upgrade)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.