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

Bug #1100359 reported by Dmitry on 2013-01-16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
perl (Ubuntu)

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 "./ | ./". Within a second (sometimes it takes a bit longer) it gives me the following:

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

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

Best regards,

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)

Dmitry (dmitry-panov) wrote :
Dmitry (dmitry-panov) wrote :

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

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.

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:

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:

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

Launchpad Janitor (janitor) wrote :

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

Changed in perl (Ubuntu):
status: New → Confirmed

Hi all,

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

Rebuilding perl with the above patch:

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  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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