Debian Bug report logs - #531078
socat: execs children with SIGCHLD ignored

version graph

Package: socat; Maintainer for socat is Laszlo Boszormenyi (GCS) <gcs@debian.org>; Source for socat is src:socat (PTS, buildd, popcon).

Reported by: Martin Dorey <mdorey@bluearc.com>

Date: Fri, 29 May 2009 19:51:01 UTC

Severity: normal

Tags: confirmed, patch, upstream

Found in version socat/1.4.3.1-1

Fixed in version socat/1.7.1.2-1

Done: Chris Taylor <ctaylor@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Thomas Seyrat <tomasera@debian.org>:
Bug#531078; Package socat. (Fri, 29 May 2009 19:51:03 GMT) (full text, mbox, link).


Acknowledgement sent to Martin Dorey <mdorey@bluearc.com>:
New Bug report received and forwarded. Copy sent to Thomas Seyrat <tomasera@debian.org>. (Fri, 29 May 2009 19:51:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Martin Dorey <mdorey@bluearc.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: socat: execs children with SIGCHLD ignored
Date: Fri, 29 May 2009 12:48:33 -0700
[Message part 1 (text/plain, inline)]
Package: socat
Version: 1.4.3.1-1
Severity: normal
Tags: patch

I don't currently know that I'm experiencing any symptom of this, other than a
warning generated by what I'm told is an obsolete warning flag to Perl.

martind@whitewater:~$ perl -we 0
martind@whitewater:~$ socat - EXEC:'perl -we 0'
Can't ignore signal CHLD, forcing to default.
martind@whitewater:~$ 

Here's a demonstration with a more recent version of socat, unpatched then
patched:

martind@whitewater:/tmp/socat-1.7.1.0$ /tmp/socat-1.7.1.0/socat - EXEC:'perl -we 0'
Can't ignore signal CHLD, forcing to default.
martind@whitewater:/tmp/socat-1.7.1.0$ patch -p0 < xio-progcall.c.patch 
patching file xio-progcall.c
martind@whitewater:/tmp/socat-1.7.1.0$ make
gcc -O -D_GNU_SOURCE  -Wall -Wno-parentheses -DHAVE_CONFIG_H -I.  -I.   -c -o xio-progcall.o xio-progcall.c
ar r libxio.a <snipped>
ranlib libxio.a
gcc -O -D_GNU_SOURCE  -Wall -Wno-parentheses -DHAVE_CONFIG_H -I.   -o socat socat.o libxio.a -lutil  -lssl
martind@whitewater:/tmp/socat-1.7.1.0$ /tmp/socat-1.7.1.0/socat - EXEC:'perl -we 0'
martind@whitewater:/tmp/socat-1.7.1.0$ 

I fear there might be other symptoms, which is why I'm raising the bug.
My fears are based partly on:

In http://www.pasc.org/interps/unofficial/db/p1003.1/pasc-1003.1-132.html,
a "David Korn" (perhaps *the* Dave Korn) is quoted as having written:

 A conforming application would not set  SIGCHLD to SIG_IGN
 since the standard leaves this behavior unspecified.  An application
 that does set SIGCHLD to SIG_IGN  should set it back to SIG_DFL
 before the call to exec.

In working on terminal emulators, I've seen a number of programs revert SIGCHLD
to SIG_DFL before calling exec(), generally without convincingly specifying
the reason.  Perhaps the unspecified heritability of SIG_IGN is the reason.

I wonder why socat ignores SIGCHLD in the child.  Perhaps it's for the case
where the child will then call system().  Then the SIG_IGN will affect socat
code as well as any child that inherits it.  But system() waits for its child.
Perhaps this SIG_IGN is a relic of earlier efforts to prevent zombies.
More likely, I'm missing something.

-- System Information:
Debian Release: 4.0
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (50, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)

Versions of packages socat depends on:
ii  libc6                  2.3.6.ds1-13etch9 GNU C Library: Shared libraries
ii  libreadline5           5.2-2             GNU readline and history libraries
ii  libssl0.9.8            0.9.8c-4etch5     SSL shared libraries
ii  libwrap0               7.6.dbs-13        Wietse Venema's TCP wrappers libra

socat recommends no packages.

-- no debconf information
[xio-progcall.c.patch (text/x-c, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#531078; Package socat. (Sun, 31 May 2009 14:39:02 GMT) (full text, mbox, link).


Acknowledgement sent to Thomas Seyrat <tomasera@debian.org>:
Extra info received and forwarded to list. (Sun, 31 May 2009 14:39:02 GMT) (full text, mbox, link).


Message #10 received at 531078@bugs.debian.org (full text, mbox, reply):

From: Thomas Seyrat <tomasera@debian.org>
To: Martin Dorey <mdorey@bluearc.com>, 531078@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: Bug#531078: socat: execs children with SIGCHLD ignored
Date: Sun, 31 May 2009 16:36:26 +0200
tags 531078 + upstream confirmed
thanks


  Hi Martin,

  Please find below the answer from socat's upstream author:

> Hi Thomas,
> 
> I think that Martin is quite right. Probably I intended to restore
> sigchld to the default before exec'ing, but took ignore instead. I
> will correct this in the next bug fix release, based on Martins patch.
> 
> Regards
> Gerhard

  Thank you for your bug report and using socat in Debian.

  Best regards,

  Thomas Seyrat




Tags added: upstream, confirmed Request was from Thomas Seyrat <tomasera@debian.org> to control@bugs.debian.org. (Sun, 31 May 2009 14:39:03 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Thomas Seyrat <tomasera@debian.org>:
Bug#531078; Package socat. (Mon, 01 Jun 2009 22:57:05 GMT) (full text, mbox, link).


Acknowledgement sent to "Martin Dorey" <mdorey@bluearc.com>:
Extra info received and forwarded to list. Copy sent to Thomas Seyrat <tomasera@debian.org>. (Mon, 01 Jun 2009 22:57:05 GMT) (full text, mbox, link).


Message #17 received at 531078@bugs.debian.org (full text, mbox, reply):

From: "Martin Dorey" <mdorey@bluearc.com>
To: <531078@bugs.debian.org>
Subject: RE: Bug#531078: socat: execs children with SIGCHLD ignored
Date: Mon, 1 Jun 2009 15:51:47 -0700
Thanks, that's very gracious.

Today we tripped over a real symptom of this problem.  When running via
socat:

martind@mercury1-a:~$ sudo dpkg -i
~/software.jessies.org/work/evergreen/.generated/amd64_Linux/bin/org.jes
sies.evergreen_5.204.2884_amd64.deb 
dpkg: unrecoverable fatal error, aborting:
 wait for dpkg-split failed: No child processes
martind@mercury1-a:~$

I'm told that dpkg forks to call dpkg-split (which succeeded) then
waitpid()s on the child, but gets back a ECHILD.

With the patched socat, dpkg worked fine, so I'm not suggesting or
requesting any further or different action here.  I just thought it
might be useful to others if googling for this symptom were to take them
to the bug report.





Reply sent to Chris Taylor <ctaylor@debian.org>:
You have taken responsibility. (Thu, 11 Feb 2010 05:48:04 GMT) (full text, mbox, link).


Notification sent to Martin Dorey <mdorey@bluearc.com>:
Bug acknowledged by developer. (Thu, 11 Feb 2010 05:48:04 GMT) (full text, mbox, link).


Message #22 received at 531078-close@bugs.debian.org (full text, mbox, reply):

From: Chris Taylor <ctaylor@debian.org>
To: 531078-close@bugs.debian.org
Subject: Bug#531078: fixed in socat 1.7.1.2-1
Date: Thu, 11 Feb 2010 05:47:08 +0000
Source: socat
Source-Version: 1.7.1.2-1

We believe that the bug you reported is fixed in the latest version of
socat, which is due to be installed in the Debian FTP archive:

socat_1.7.1.2-1.debian.tar.gz
  to main/s/socat/socat_1.7.1.2-1.debian.tar.gz
socat_1.7.1.2-1.dsc
  to main/s/socat/socat_1.7.1.2-1.dsc
socat_1.7.1.2-1_i386.deb
  to main/s/socat/socat_1.7.1.2-1_i386.deb
socat_1.7.1.2.orig.tar.gz
  to main/s/socat/socat_1.7.1.2.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 531078@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Chris Taylor <ctaylor@debian.org> (supplier of updated socat package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 10 Feb 2010 20:58:08 +0000
Source: socat
Binary: socat
Architecture: source i386
Version: 1.7.1.2-1
Distribution: unstable
Urgency: low
Maintainer: Chris Taylor <ctaylor@debian.org>
Changed-By: Chris Taylor <ctaylor@debian.org>
Description: 
 socat      - multipurpose relay for bidirectional data transfer
Closes: 531078 553853 568100 569055 569184
Changes: 
 socat (1.7.1.2-1) unstable; urgency=low
 .
   * New maintainer (Closes: #569184).
   * New upstream release (Closes: #568100).
     - Fixes execs children with SIGCHLD ignored (Closes: #531078).
   * Depend on libreadline-dev instead of libreadline5-dev (Closes: #553853).
   * Mention support of sctp in package description (Closes: #569055).
   * Use source format 3.0 (quilt).
   * Bump compat to 7.
   * Bump standards-version to 3.8.4
   * Use quilt for patches and build-depend on quilt.
   * Use new format for debian/copyright.
   * Use dh7 for debian/rules.
   * Add watch file.
   * Add misc dep to depends.
   * Update manpage in 00-Manpage.
     - Port changes from previous versions.
     - Fix lintian errors in manpage.
   * Register documentation with doc-base.
   * Override false-positive lintian warning.
Checksums-Sha1: 
 0695f45c1e1edfabd17d76e66a696469a820ec52 1070 socat_1.7.1.2-1.dsc
 dbd76e9fdac13ae95c46be9bb8a95ef4258bb466 554091 socat_1.7.1.2.orig.tar.gz
 238b1ef2c59cccb199e4bc32e23eda772bf542da 10674 socat_1.7.1.2-1.debian.tar.gz
 822389d073955054b0348c208a902bfcb06c78ec 358452 socat_1.7.1.2-1_i386.deb
Checksums-Sha256: 
 27bfc3edf53d0f8cbed54014d87dfc04b0793209c92710869f7285fa185a9b5a 1070 socat_1.7.1.2-1.dsc
 c49bbe8ad5794941b190294d9974505914704e9c9fe21d875f98e7539cbd84dd 554091 socat_1.7.1.2.orig.tar.gz
 915ebb10ef5624cdfd4a2f841be34e75b70fd5bb102d1d2cbca24ffb77ef6645 10674 socat_1.7.1.2-1.debian.tar.gz
 675e20c9432a2fdfa11998d6422a0d78fd720b6b2af6de7e7ab90143457d0ae7 358452 socat_1.7.1.2-1_i386.deb
Files: 
 8501b81f465784e3c230a3cfed9d9209 1070 net extra socat_1.7.1.2-1.dsc
 2a5b7b0355421a039fb68b7541181b38 554091 net extra socat_1.7.1.2.orig.tar.gz
 bad39003456a7083d0c6323b5f9e4ef7 10674 net extra socat_1.7.1.2-1.debian.tar.gz
 9a32ee5f30b8ab34bde890642391fafa 358452 net extra socat_1.7.1.2-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAktzl7wACgkQLpNUoan9SCG7bACfdKINfoJpc6u/gFRO4Q0YUiBA
8YQAn27IKn0YkP3DAlaBRED/X3nRw2pi
=t4BP
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 26 Jul 2011 07:40:57 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Jan 12 12:03:07 2018; Machine Name: beach

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.