Debian Bug report logs - #641200
fakeroot: fakeroot-tcp vs. EINTR?

version graph

Package: fakeroot; Maintainer for fakeroot is Clint Adams <clint@debian.org>; Source for fakeroot is src:fakeroot.

Reported by: Thomas Schwinge <thomas@schwinge.name>

Date: Sun, 11 Sep 2011 12:36:05 UTC

Severity: normal

Tags: patch

Fixed in version fakeroot/1.18.2-1

Done: Clint Adams <clint@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, debian-hurd@lists.debian.org, Clint Adams <clint@debian.org>:
Bug#641200; Package fakeroot. (Sun, 11 Sep 2011 12:36:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thomas Schwinge <thomas@schwinge.name>:
New Bug report received and forwarded. Copy sent to debian-hurd@lists.debian.org, Clint Adams <clint@debian.org>. (Sun, 11 Sep 2011 12:36:08 GMT) Full text and rfc822 format available.

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

From: Thomas Schwinge <thomas@schwinge.name>
To: submit@bugs.debian.org
Subject: fakeroot: fakeroot-tcp vs. EINTR?
Date: Sun, 11 Sep 2011 14:30:29 +0200
[Message part 1 (text/plain, inline)]
Package: fakeroot
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd
X-Debbugs-CC: debian-hurd@lists.debian.org
thanks

Debian GNU/Hurd folks: why do I have to specify Hurd
User/Usertags/X-Debbugs-CC, all three?  Can't this be made simpler?
(This is from
<http://www.gnu.org/software/hurd/hurd/running/debian/patch_submission.html>.)


Hi!

On Sun, 11 Sep 2011 11:55:21 +0200, I wrote:
> Debian fakeroot 1.15.1-1 (fakeroot-tcp) has problems with EINTR or
> something?
> 
>     [...]
>     ./scripts/mkinstalldirs /media/erich/home/thomas/tmp/glibc/debian/eglibc-2.13/debian/tmp-libc/usr/include
>     libfakeroot: connect: Interrupted system call
>     /usr/bin/install -c -m 644 include/limits.h /media/erich/home/thomas/tmp/glibc/debian/eglibc-2.13/debian/tmp-libc/usr/include/limits.h
>     /usr/bin/install: cannot create regular file `/media/erich/home/thomas/tmp/glibc/debian/eglibc-2.13/debian/tmp-libc/usr/include/limits.h': No such file or directory
>     make[2]: *** [/media/erich/home/thomas/tmp/glibc/debian/eglibc-2.13/debian/tmp-libc/usr/include/limits.h] Error 1
>     [...]

Yes, it has.  Manually tested, ``git am''-able patch is attached.  I
didn't check whether there are further such cases.

I built with ``DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -uc -b -d''.
``-d'' due to libacl1-dev not being available.


Grüße,
 Thomas


[0001-It-is-permissible-for-connect-to-fail-with-EINTR.patch (text/x-diff, inline)]
From bb3cfb6ddf7831d36df22697caae4589f53bcc70 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@schwinge.name>
Date: Sun, 11 Sep 2011 14:24:31 +0200
Subject: [PATCH] It is permissible for connect to fail with EINTR.

---
 communicate.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/communicate.c b/communicate.c
index 2db0a9d..02b258a 100644
--- a/communicate.c
+++ b/communicate.c
@@ -476,8 +476,13 @@ static void open_comm_sd(void)
   if (fcntl(comm_sd, F_SETFD, FD_CLOEXEC) < 0)
     fail("fcntl(F_SETFD, FD_CLOEXEC)");
 
-  if (connect(comm_sd, get_addr(), sizeof (struct sockaddr_in)) < 0)
-    fail("connect");
+  while (1) {
+    if (connect(comm_sd, get_addr(), sizeof (struct sockaddr_in)) < 0) {
+      if (errno != EINTR)
+        fail("connect");
+    } else
+      break;
+  }
 }
 
 void lock_comm_sd(void)
-- 
1.7.5.4

[Message part 3 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, debian-hurd@lists.debian.org:
Bug#641200; Package fakeroot. (Sun, 11 Sep 2011 18:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Clint Adams <clint@debian.org>:
Extra info received and forwarded to list. Copy sent to debian-hurd@lists.debian.org. (Sun, 11 Sep 2011 18:00:03 GMT) Full text and rfc822 format available.

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

From: Clint Adams <clint@debian.org>
To: Thomas Schwinge <thomas@schwinge.name>, 641200@bugs.debian.org
Subject: Re: Bug#641200: fakeroot: fakeroot-tcp vs. EINTR?
Date: Sun, 11 Sep 2011 17:57:32 +0000
On Sun, Sep 11, 2011 at 02:30:29PM +0200, Thomas Schwinge wrote:
> +  while (1) {
> +    if (connect(comm_sd, get_addr(), sizeof (struct sockaddr_in)) < 0) {
> +      if (errno != EINTR)
> +        fail("connect");
> +    } else
> +      break;
> +  }

I'm concerned about the possibility for an infinite loop here if faked dies.




Information forwarded to debian-bugs-dist@lists.debian.org, Clint Adams <clint@debian.org>:
Bug#641200; Package fakeroot. (Sun, 11 Sep 2011 20:54:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thomas Schwinge <thomas@schwinge.name>:
Extra info received and forwarded to list. Copy sent to Clint Adams <clint@debian.org>. (Sun, 11 Sep 2011 20:54:07 GMT) Full text and rfc822 format available.

Message #15 received at 641200@bugs.debian.org (full text, mbox):

From: Thomas Schwinge <thomas@schwinge.name>
To: Clint Adams <clint@debian.org>, 641200@bugs.debian.org
Subject: Re: Bug#641200: fakeroot: fakeroot-tcp vs. EINTR?
Date: Sun, 11 Sep 2011 22:46:30 +0200
[Message part 1 (text/plain, inline)]
Hi!

On Sun, 11 Sep 2011 17:57:32 +0000, Clint Adams <clint@debian.org> wrote:
> On Sun, Sep 11, 2011 at 02:30:29PM +0200, Thomas Schwinge wrote:
> > +  while (1) {
> > +    if (connect(comm_sd, get_addr(), sizeof (struct sockaddr_in)) < 0) {
> > +      if (errno != EINTR)
> > +        fail("connect");
> > +    } else
> > +      break;
> > +  }
> 
> I'm concerned about the possibility for an infinite loop here if faked dies.

How so?  If errno != EINTR it'll fail() (as it did before) -- like in a
bunch of other cases in that file.  The while (1) loop is just for keeing
trying in case of errno == EINTR.


Grüße,
 Thomas
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Clint Adams <clint@debian.org>:
Bug#641200; Package fakeroot. (Mon, 28 Nov 2011 00:51:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Samuel Thibault <sthibault@debian.org>:
Extra info received and forwarded to list. Copy sent to Clint Adams <clint@debian.org>. (Mon, 28 Nov 2011 00:51:06 GMT) Full text and rfc822 format available.

Message #20 received at 641200@bugs.debian.org (full text, mbox):

From: Samuel Thibault <sthibault@debian.org>
To: Clint Adams <clint@debian.org>, 641200@bugs.debian.org
Cc: Thomas Schwinge <thomas@schwinge.name>
Subject: Re: Bug#641200: fakeroot: fakeroot-tcp vs. EINTR?
Date: Mon, 28 Nov 2011 01:50:25 +0100
Clint Adams, le Sun 11 Sep 2011 17:57:32 +0000, a écrit :
> On Sun, Sep 11, 2011 at 02:30:29PM +0200, Thomas Schwinge wrote:
> > +  while (1) {
> > +    if (connect(comm_sd, get_addr(), sizeof (struct sockaddr_in)) < 0) {
> > +      if (errno != EINTR)
> > +        fail("connect");
> > +    } else
> > +      break;
> > +  }
> 
> I'm concerned about the possibility for an infinite loop here if faked dies.

If faked dies, the error will be ECONNREFUSED, not EINTR.

Samuel




Reply sent to Clint Adams <clint@debian.org>:
You have taken responsibility. (Thu, 01 Dec 2011 04:36:06 GMT) Full text and rfc822 format available.

Notification sent to Thomas Schwinge <thomas@schwinge.name>:
Bug acknowledged by developer. (Thu, 01 Dec 2011 04:36:06 GMT) Full text and rfc822 format available.

Message #25 received at 641200-close@bugs.debian.org (full text, mbox):

From: Clint Adams <clint@debian.org>
To: 641200-close@bugs.debian.org
Subject: Bug#641200: fixed in fakeroot 1.18.2-1
Date: Thu, 01 Dec 2011 04:32:33 +0000
Source: fakeroot
Source-Version: 1.18.2-1

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

fakeroot_1.18.2-1.debian.tar.gz
  to main/f/fakeroot/fakeroot_1.18.2-1.debian.tar.gz
fakeroot_1.18.2-1.dsc
  to main/f/fakeroot/fakeroot_1.18.2-1.dsc
fakeroot_1.18.2-1_amd64.deb
  to main/f/fakeroot/fakeroot_1.18.2-1_amd64.deb
fakeroot_1.18.2.orig.tar.bz2
  to main/f/fakeroot/fakeroot_1.18.2.orig.tar.bz2



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 641200@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Clint Adams <clint@debian.org> (supplier of updated fakeroot 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: SHA512

Format: 1.8
Date: Wed, 30 Nov 2011 22:37:00 -0500
Source: fakeroot
Binary: fakeroot
Architecture: source amd64
Version: 1.18.2-1
Distribution: unstable
Urgency: low
Maintainer: Clint Adams <clint@debian.org>
Changed-By: Clint Adams <clint@debian.org>
Description: 
 fakeroot   - tool for simulating superuser privileges
Closes: 636192 641200 641503 646405
Changes: 
 fakeroot (1.18.2-1) unstable; urgency=low
 .
   * German translation from Chris Leick.  closes: #646405.
   * Initial multiarch support from Yann Dirson.  closes: #636192.
   * Improved build robustness from Yann Dirson.  closes: #641503.
   * Improved fakeroot-tcp robustness from Thomas Schwinge.  closes: #641200.
   * Add build-arch and build-indep targets.
Checksums-Sha1: 
 e9e0dff0581fdc0a4606120b64ec3b205d8c802e 1965 fakeroot_1.18.2-1.dsc
 0bfcceb0cc8648cbb57a817b3a87c4d1d68efbe2 303775 fakeroot_1.18.2.orig.tar.bz2
 3cbe89b00c4e07dd03038e1df656e4a44f2e79d5 51457 fakeroot_1.18.2-1.debian.tar.gz
 02e1328e1bd419782dadd838f6cc026bcf274171 107904 fakeroot_1.18.2-1_amd64.deb
Checksums-Sha256: 
 56ea3a09bd39979a37fb97072d06d732a3fdc0f00baecba4e090fb6c5d49f5ca 1965 fakeroot_1.18.2-1.dsc
 9dc942e3ef2ec83c6e6fe59de05da6ab54f39948be64803f37721adab4c6aed8 303775 fakeroot_1.18.2.orig.tar.bz2
 a9d964fc09d7feb4d109e82434481909203d857488c59758d53030d2dabf39ff 51457 fakeroot_1.18.2-1.debian.tar.gz
 9b701ed0174ca24471a4660ed6c343091c5d63e2b9c5099c624636f789bd2071 107904 fakeroot_1.18.2-1_amd64.deb
Files: 
 1846884f78aa5ee52f712c37dc403633 1965 utils optional fakeroot_1.18.2-1.dsc
 79f32331358ad58499704ea5e19fd0ae 303775 utils optional fakeroot_1.18.2.orig.tar.bz2
 88825a6494a45a484c8dfd21518fe9d4 51457 utils optional fakeroot_1.18.2-1.debian.tar.gz
 d4280ad86488de0356d1f50e9387c10b 107904 utils optional fakeroot_1.18.2-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Debian!

iQIcBAEBCgAGBQJO1wBMAAoJEFWSMx4ZnTioKhcQAKagm8/L2k/fg5f2/xhXXo7x
z2YqZzgHqOdx0OWAqdgami5gKW5qdXV+NcMkdu6bvdbQ60n/7qpGQIIEWcqLSlE4
HkgBhJUzCcjdQqp72nNQ69M9QJxvr1Dw05wCzY1OCL2YF1VEZFddMKZ/XezUsluE
Zt9irn3d2Sf0NuSyvOGzKXPGQp4/nU7QT1V0TkWZMrlVWuEeVv7cXyG1BHD9C49X
QNxH3r82kgZinyyr2mcDrhhKyxXYzDF0xkvmI1VRk6NVnUhlQpaq8gHuAXzaK7hm
X88T4dq5AjfwdMtm3Qi0Fc72NBJFFcjA6x5yUdwxqnZJL/Q1SeBjCldwBwoUPjg/
14HQdDgtR3CW7S6SoHNQBMrnbO6O9lqWGeuJl4cIS1FTRkJNLfp9OO9y6h8FT0ws
DnEn3wF3qlYBw/dP4cSjennP55cYZYPfolJBLCAJykdmEJkKxY2l4wO25KBTRLPd
sN8O4S9DWOfMyoaguXQbM4nHtVeveVL6X4VkJi+l727AVAi/bhvrAzzFi+nOPr/1
Z5JuOuvbmsarL1Q/f4O/eD8VkeoTYjTHmoHiGzpRJhZ2juHd5+dyorBRkEy3rdun
YT0dLM3NgZBL00Cwf3fRZwrmztdx163Y2HmRrKDFOKni3Ilnu7F3BDiYF3aL9wde
xnBFlsLx+GU4iVd7/Vc8
=VQka
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 08 Jan 2012 07:31:35 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 07:19:05 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.