Bug#1001542: perl: Hurd: sysread() fails with a "Bad file descriptor" error

Peter Pentchev roam at ringlet.net
Sat Dec 11 22:15:50 GMT 2021


Package: perl
Version: 5.32.1-6
Severity: normal

Hi,

First of all, thanks for keeping Perl running on all the Debian
architectures!

I ran into a problem with a test tool for one of my Debian packages -
it would refuse to read a bunch of random bytes from /dev/urandom when
running on the Hurd. It turns out that the problem is not specific to
/dev/urandom - at least on the exodar.debian.net porterbox right now,
the following command fails for /etc/passwd, /tmp/roam.txt, /bin/ls, and
/home/roam/foo.c, so it does not seem to depend on file ownership or
directory hierarchy. Of course, not being very familiar with the Hurd,
I may very well be missing something important here.

[roam at exodar ~]$ perl -e 'use v5.10; use strict; use warnings; sysopen my $fh, "/bin/ls", 0 or die "sysopen: $!\n"; say "fd ".fileno $fh; my $data; sysread $fh, $data, 32 or die "sysread: $!\n"; say length $data;'
fd 3
sysread: Bad file descriptor
[roam at exodar ~]$

I tried comparing the rpctrace output for this command and for a similar
Python program, but - again, not being very familiar with the Hurd -
there is nothing that immediately caught my eye.

Thanks again for all you people do for Perl and Debian in general, and
keep up the great work!

G'luck,
Peter

-- System Information:
Debian Release: bookworm/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'buildd-unstable'), (500, 'unstable')
Architecture: hurd-i386 (i686-AT386)

Kernel: GNU-Mach 1.8+git20210809-486/Hurd-0.9
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages perl depends on:
ii  dpkg               1.21.1
ii  libperl5.32        5.32.1-6
ii  perl-base          5.32.1-6
ii  perl-modules-5.32  5.32.1-6

Versions of packages perl recommends:
ii  netbase  6.3

Versions of packages perl suggests:
pn  libtap-harness-archive-perl                             <none>
pn  libterm-readline-gnu-perl | libterm-readline-perl-perl  <none>
ii  make                                                    4.1-9.1
pn  perl-doc                                                <none>

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/perl-maintainers/attachments/20211212/265fee2c/attachment.sig>


More information about the Perl-maintainers mailing list