Debian Bug report logs - #584538
libdebian-installer: problems on Hurd with poll()

version graph

Package: libdebian-installer4; Maintainer for libdebian-installer4 is Debian Install System Team <debian-boot@lists.debian.org>; Source for libdebian-installer4 is src:libdebian-installer.

Reported by: Jérémie Koenig <jk@jk.fr.eu.org>

Date: Fri, 4 Jun 2010 12:45:01 UTC

Severity: normal

Tags: patch

Found in version libdebian-installer/0.72

Fixed in version libdebian-installer/0.78

Done: <zumbi@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 Install System Team <debian-boot@lists.debian.org>:
Bug#584538; Package libdebian-installer4. (Fri, 04 Jun 2010 12:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jérémie Koenig <jk@jk.fr.eu.org>:
New Bug report received and forwarded. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Fri, 04 Jun 2010 12:45:04 GMT) Full text and rfc822 format available.

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

From: Jérémie Koenig <jk@jk.fr.eu.org>
To: submit@bugs.debian.org
Subject: libdebian-installer: problems on Hurd with poll()
Date: Fri, 4 Jun 2010 14:41:34 +0200
[Message part 1 (text/plain, inline)]
Package: libdebian-installer4
Version: 0.72
Tags: patch
User: jk@jk.fr.eu.org
Usertags: gsoc2010

Hello,

On Hurd, libdebian-installer gets stuck inside the internal_di_exec()
function. This is caused by the way poll() reports end-of-file, which
cannot be portably relied on.

The attach patch uses feof() instead of POLLHUP to detect it.

Though it's somewhat unrelated, it also disables short-circuiting
doxygen on Hurd, which does not apply any more and makes the package
fail to build because of missing files in debian/tmp/usr/share/doc.

-- 
Jérémie Koenig <jk@jk.fr.eu.org>
http://jk.fr.eu.org/
[libd-i.hurd.diff (text/x-patch, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#584538; Package libdebian-installer4. (Sun, 01 Aug 2010 15:06:07 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 Debian Install System Team <debian-boot@lists.debian.org>. (Sun, 01 Aug 2010 15:06:07 GMT) Full text and rfc822 format available.

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

From: Samuel Thibault <sthibault@debian.org>
To: debian-boot@lists.debian.org, bsd@lists.debian.org
Cc: 584538@bugs.debian.org
Subject: Re: Bug#584538: libdebian-installer: problems on Hurd with poll()
Date: Sun, 1 Aug 2010 17:02:47 +0200
Hello,

Jérémie Koenig, le Fri 04 Jun 2010 14:41:34 +0200, a écrit :
> On Hurd, libdebian-installer gets stuck inside the internal_di_exec()
> function. This is caused by the way poll() reports end-of-file, which
> cannot be portably relied on.
> 
> The attach patch uses feof() instead of POLLHUP to detect it.

> Index: packages/libdebian-installer/src/exec.c
> ===================================================================
> --- packages/libdebian-installer/src/exec.c	(revision 63370)
> +++ packages/libdebian-installer/src/exec.c	(working copy)
> @@ -162,14 +162,12 @@
>        {
>          bool exit = false;
>  
> +        /* Implementations of poll() deliver various combinations of POLLIN and
> +           POLLHUP on EOF. fgets() detects it and we check with feof() below.
> +           References: http://www.greenend.org.uk/rjk/2001/06/poll.html */
>          for (i = 0; i < pipes; i++)
>          {
> -/* References: http://www.greenend.org.uk/rjk/2001/06/poll.html */
> -#if defined(__FreeBSD_kernel__)
> -          if ((pollfds[i].revents & POLLIN) && (! (pollfds[i].revents & POLLHUP)))
> -#else
> -          if (pollfds[i].revents & POLLIN)
> -#endif
> +          if (pollfds[i].revents & (POLLIN | POLLHUP))
>            {
>              while (fgets (line, sizeof (line), files[i].file) != NULL)
>              {
> @@ -180,8 +178,8 @@
>                  len--;
>                }
>                files[i].handler (line, len, io_user_data);
> +              exit = true;
>              }
> -            exit = true;
>            }
>          }
>  
> @@ -189,7 +187,7 @@
>            continue;
>  
>          for (i = 0; i < pipes; i++)
> -          if (pollfds[i].revents & POLLHUP)
> +          if (feof(files[i].file))
>              exit = true;
>  
>          if (exit)

This seems simpler to me.  Could BSD people check they do not have bad
effects?

Samuel




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Install System Team <debian-boot@lists.debian.org>:
Bug#584538; Package libdebian-installer4. (Wed, 04 Aug 2010 18:42:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aurelien Jarno <aurelien@aurel32.net>:
Extra info received and forwarded to list. Copy sent to Debian Install System Team <debian-boot@lists.debian.org>. (Wed, 04 Aug 2010 18:42:05 GMT) Full text and rfc822 format available.

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

From: Aurelien Jarno <aurelien@aurel32.net>
To: debian-boot@lists.debian.org, bsd@lists.debian.org, 584538@bugs.debian.org
Subject: Re: Bug#584538: libdebian-installer: problems on Hurd with poll()
Date: Wed, 4 Aug 2010 20:38:53 +0200
On Sun, Aug 01, 2010 at 05:02:47PM +0200, Samuel Thibault wrote:
> Hello,
Hi,

> Jérémie Koenig, le Fri 04 Jun 2010 14:41:34 +0200, a écrit :
> > On Hurd, libdebian-installer gets stuck inside the internal_di_exec()
> > function. This is caused by the way poll() reports end-of-file, which
> > cannot be portably relied on.
> > 
> > The attach patch uses feof() instead of POLLHUP to detect it.
> 
> > Index: packages/libdebian-installer/src/exec.c
> > ===================================================================
> > --- packages/libdebian-installer/src/exec.c	(revision 63370)
> > +++ packages/libdebian-installer/src/exec.c	(working copy)
> > @@ -162,14 +162,12 @@
> >        {
> >          bool exit = false;
> >  
> > +        /* Implementations of poll() deliver various combinations of POLLIN and
> > +           POLLHUP on EOF. fgets() detects it and we check with feof() below.
> > +           References: http://www.greenend.org.uk/rjk/2001/06/poll.html */
> >          for (i = 0; i < pipes; i++)
> >          {
> > -/* References: http://www.greenend.org.uk/rjk/2001/06/poll.html */
> > -#if defined(__FreeBSD_kernel__)
> > -          if ((pollfds[i].revents & POLLIN) && (! (pollfds[i].revents & POLLHUP)))
> > -#else
> > -          if (pollfds[i].revents & POLLIN)
> > -#endif
> > +          if (pollfds[i].revents & (POLLIN | POLLHUP))
> >            {
> >              while (fgets (line, sizeof (line), files[i].file) != NULL)
> >              {
> > @@ -180,8 +178,8 @@
> >                  len--;
> >                }
> >                files[i].handler (line, len, io_user_data);
> > +              exit = true;
> >              }
> > -            exit = true;
> >            }
> >          }
> >  
> > @@ -189,7 +187,7 @@
> >            continue;
> >  
> >          for (i = 0; i < pipes; i++)
> > -          if (pollfds[i].revents & POLLHUP)
> > +          if (feof(files[i].file))
> >              exit = true;
> >  
> >          if (exit)
> 
> This seems simpler to me.  Could BSD people check they do not have bad
> effects?
> 

I have just made a test and this version seems to work perfectly on
GNU/kFreeBSD.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net




Added tag(s) pending. Request was from Samuel Thibault <sthibault@debian.org> to control@bugs.debian.org. (Thu, 20 Jan 2011 00:03:03 GMT) Full text and rfc822 format available.

Reply sent to <zumbi@debian.org>:
You have taken responsibility. (Wed, 23 Mar 2011 08:30:03 GMT) Full text and rfc822 format available.

Notification sent to Jérémie Koenig <jk@jk.fr.eu.org>:
Bug acknowledged by developer. (Wed, 23 Mar 2011 08:30:03 GMT) Full text and rfc822 format available.

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

From: <zumbi@debian.org>
To: 584538-close@bugs.debian.org
Subject: Bug#584538: fixed in libdebian-installer 0.78
Date: Wed, 23 Mar 2011 08:27:39 +0000
Source: libdebian-installer
Source-Version: 0.78

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

libdebian-installer-extra4-udeb_0.78_amd64.udeb
  to main/libd/libdebian-installer/libdebian-installer-extra4-udeb_0.78_amd64.udeb
libdebian-installer-extra4_0.78_amd64.deb
  to main/libd/libdebian-installer/libdebian-installer-extra4_0.78_amd64.deb
libdebian-installer4-dev_0.78_amd64.deb
  to main/libd/libdebian-installer/libdebian-installer4-dev_0.78_amd64.deb
libdebian-installer4-udeb_0.78_amd64.udeb
  to main/libd/libdebian-installer/libdebian-installer4-udeb_0.78_amd64.udeb
libdebian-installer4_0.78_amd64.deb
  to main/libd/libdebian-installer/libdebian-installer4_0.78_amd64.deb
libdebian-installer_0.78.dsc
  to main/libd/libdebian-installer/libdebian-installer_0.78.dsc
libdebian-installer_0.78.tar.gz
  to main/libd/libdebian-installer/libdebian-installer_0.78.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 584538@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
<zumbi@debian.org> (supplier of updated libdebian-installer 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: SHA256

Format: 1.8
Date: Tue, 22 Mar 2011 12:04:06 +0000
Source: libdebian-installer
Binary: libdebian-installer4 libdebian-installer4-dev libdebian-installer4-udeb libdebian-installer-extra4 libdebian-installer-extra4-udeb
Architecture: source amd64
Version: 0.78
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: <zumbi@debian.org>
Description: 
 libdebian-installer-extra4 - Library of some extra debian-installer functions
 libdebian-installer-extra4-udeb - Library of some extra debian-installer functions (udeb)
 libdebian-installer4 - Library of common debian-installer functions
 libdebian-installer4-dev - Library of common debian-installer functions
 libdebian-installer4-udeb - Library of common debian-installer functions (udeb)
Closes: 584538 612168
Changes: 
 libdebian-installer (0.78) unstable; urgency=low
 .
   [ Jeremie Koenig ]
   * internal_di_exec(): use feof() instead of preprocessor conditionals
     to handle the os-dependant status returned by poll() on end-of-file
     (closes: #584538).
 .
   [ Martin Michlmayr ]
   * Add support for Buffalo Linkstation LiveV3 (LS-CHL).  Closes: #612168
   * Add support for Buffalo Linkstation Mini (LS-WSGL).
 .
   [ Konstantinos Margaritis ]
   * Add support for the new armhf port and the Genesi EfikaMX Smartbook/
     Smarttop platforms.
 .
   [ Bastian Blank ]
   * Add minimal support for SHA1 checksums in Release file parser.
   * Adopt copyright file to reality.
 .
   [ Colin Watson ]
   * Add a proper copyright/licence statement to subarch-x86-linux.c.
Checksums-Sha1: 
 82b1261fd39adfec632eaa162afdd1cb8cea2eca 1786 libdebian-installer_0.78.dsc
 fc31854d7587d8cf4859861e33d801bcd941d10e 375307 libdebian-installer_0.78.tar.gz
 4ba8483927a4bc9e1aff361fae3445a4c1475516 32260 libdebian-installer4_0.78_amd64.deb
 c6cc01ea8171b01e4bd5fdef1e462294b60db6bc 169518 libdebian-installer4-dev_0.78_amd64.deb
 ee6b30d91c8ef74ef6bc8e9a845e8516dca584f1 22504 libdebian-installer4-udeb_0.78_amd64.udeb
 f3963751dc886847bd136f59e6bf51d287c1b151 13928 libdebian-installer-extra4_0.78_amd64.deb
 e3a634882739a61e7fe84ca7bb01dd7873ec3313 4062 libdebian-installer-extra4-udeb_0.78_amd64.udeb
Checksums-Sha256: 
 037c637a4fa67e0a6adb15c1081753c531024a28a166fa7a796c2fd0e064a2a1 1786 libdebian-installer_0.78.dsc
 87b65c5ee48de339892aa81b9ce51b6893f76c9a92c50c7026c8eea2f7d2f14a 375307 libdebian-installer_0.78.tar.gz
 301e03dae17dc4ea7b57864f308af3e2f0cd8b9805f61b78fac5b2686b8452f4 32260 libdebian-installer4_0.78_amd64.deb
 a68286ad21a0a9df3b784e11cdacc3604eb56935c025e93935469a7d97664533 169518 libdebian-installer4-dev_0.78_amd64.deb
 9ea77697644574d38bd7cfe17ab488d77688e7132761a3530e9a3f3c6036e4ff 22504 libdebian-installer4-udeb_0.78_amd64.udeb
 d4821fc6ebd4ddf4d8b0f2bb54c4813f668d4cd7d0198609a756a38abdeece84 13928 libdebian-installer-extra4_0.78_amd64.deb
 dd0542f22c9a36f8df94fa4aeabe507e5fdb325f21bc6caa9b842dc9311fb908 4062 libdebian-installer-extra4-udeb_0.78_amd64.udeb
Files: 
 d1237d8020998ed717451f7a8510a368 1786 libs optional libdebian-installer_0.78.dsc
 b8fb63c2ad9a68696a15de6fdc4ff741 375307 libs optional libdebian-installer_0.78.tar.gz
 78f61989cfd26e9d4cdae6bfcdda959a 32260 libs optional libdebian-installer4_0.78_amd64.deb
 86bdea872054b8dc40e9e05ccc50b16a 169518 libdevel optional libdebian-installer4-dev_0.78_amd64.deb
 77fdf3926a0ff5acada2516eb8b0aa9f 22504 debian-installer optional libdebian-installer4-udeb_0.78_amd64.udeb
 9640918503430bc2759a937c30a7f947 13928 libs optional libdebian-installer-extra4_0.78_amd64.deb
 661ba055fa2c3495e3b51c6498966db4 4062 debian-installer optional libdebian-installer-extra4-udeb_0.78_amd64.udeb
Package-Type: udeb

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

iQIcBAEBCAAGBQJNiJBtAAoJEK8ig6p24qx7QWoQAJ4UqSAO3OY0VBPhGzhv3eVL
+4lP/LOrRKH8vF0bSC3aXztvnJ9niwod57VCFd38aHO0dhcKJyUC6d8gCWW/10RP
kaxICpzMTIfAgWIckNt7hVA7CAA8oo31l4X4piPCQHfqnNAqLknA18OKSUl7TITu
AEZKU0SAhtrov/gEi7BhXRRg40hIv142xGaamc+hOEZLrZkeRx0WtMBZeyVmJ2gv
NauCZUacIvSc59wWF7xk7ZEpHRoIVnBeE2SZyjwsxHY5QoqjZCihVT8PHJBeUKvp
V5WSnkpFnhqIXXEutSm3gEYQDj6QbhQ1wZdu5nwjxl/1WY05JQb99lPh6YGyWre+
XBlURlD0felOifYjiwM2HmYmiR99/Ra/lyTbIURU3wM2R2NdliVS/s8NjhjSV8BB
zgsuWSDCX+nI6QFPHyT8PERHDZi5fvfnl8GoQ+Ykd93MEPSkeqHWgtd8UGiERt/N
ekb4dJxyslIAfdY4GIsqyUHJ3pnEcikJwAAW8J42SHLIllLRPmwQnOs03bwo/voL
BIC73D3Ol3j+zs41BpOA3zLhu9Xtnr9AYeFO+dyiboSTCqbRIs5dbn/gDbPFLtsM
cb90LP6tVe/M14y2TuOIam/lxUjotWpgXhiZcOTlfv01QDjicY+pfCj8Q7tuQUte
KFCyskdbVlZ9pktlkPPV
=+zU7
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 29 Jun 2011 07:34:54 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: Fri Apr 18 08:34:51 2014; Machine Name: buxtehude.debian.org

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