Your message dated Sun, 25 Oct 2026 18:34:34 +0000
with message-id <[email protected]>
and subject line Bug#1146517: fixed in libipc-shareable-perl 1.19-2
has caused the Debian Bug report #1146517,
regarding libipc-shareable-perl: FTBFS on ppc64el and ppc64: shm_segments()
reads the wrong field of struct shmid_ds
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1146517: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1146517
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: libipc-shareable-perl
Version: 1.19-1
Severity: serious
Tags: ftbfs patch upstream
Justification: fails to build from source
Forwarded: https://github.com/stevieb9/ipc-shareable/issues/66
X-Debbugs-Cc: [email protected]
1.19-1 fails to build on ppc64el and ppc64, and builds everywhere else:
https://buildd.debian.org/status/package.php?p=libipc-shareable-perl
https://buildd.debian.org/status/logs.php?pkg=libipc-shareable-perl&arch=ppc64el
t/72-shm_segments.t (Wstat: 6912 Tests: 47 Failed: 27)
t/74-seg_map.t (Wstat: 512 Tests: 12 Failed: 2)
lib/IPC/Shareable.pm unpacks struct shmid_ds at a hard-coded offset for
shm_segsz, assuming the asm-generic field order. PowerPC puts the three
time fields first, so on ppc64el/ppc64 the offset lands on shm_atime;
the oversized value makes the following shmread() fail and the segment
never reaches %segments. IPC/Shareable/SharedMem.pm has the same bug in
stat().
Reported upstream as #66, together with an alternative that drops the
offset tables entirely and reads the fields through IPC::SysV's XS
instead. Upstream has not replied yet, so the attached minimal fix is
what I would suggest for Debian; it is the least likely to conflict with
whichever route upstream takes.
Both solutions were built and tested on ppc64el under sbuild. No
upstream reply yet.
Filed separately from #1142815, which is the unrelated t/47-seg_size.t
memory problem (upstream #65).
Kind regards,
Edmund Lodewijks
--
Edmund Lodewijks <[email protected]>
TZ: UTC+2 / GMT+2
Description: shm_segments: use the PowerPC offset of shm_segsz on PowerPC
PowerPC orders struct shmid_ds with the three time fields before shm_segsz;
the generic layout puts shm_segsz first. The fixed offset therefore reads
shm_atime on ppc64el and ppc64, and the oversized value makes the following
shmread() fail, so the segment never reaches %segments. That fails
t/72-shm_segments.t and t/74-seg_map.t.
.
Minimal alternative to portable-shmid_ds.patch; use one or the other.
Author: Edmund Lodewijks <[email protected]>
Forwarded: https://github.com/stevieb9/ipc-shareable/issues/66
Last-Update: 2026-08-28
---
--- a/lib/IPC/Shareable.pm
+++ b/lib/IPC/Shareable.pm
@@ -723,10 +723,16 @@
my $stat_buf = '';
shmctl($id, IPC_STAT, $stat_buf) or next;
+ # PowerPC orders struct shmid_ds with the three time fields before
+ # shm_segsz; everywhere else shm_segsz comes first, right after
+ # ipc_perm. Both ipc_perm layouts are 48 bytes, so shm_segsz sits at
+ # 72 rather than 48 on 64-bit, and at 76 rather than 36 on 32-bit.
+ my $ppc = $Config{archname} =~ /^(?:powerpc|ppc)/i;
+
my ($segsz) = $^O eq 'linux'
? ( $Config{longsize} == 8
- ? unpack('x[48] Q', $stat_buf) # 64-bit Linux
- : unpack('x[36] L', $stat_buf) ) # 32-bit Linux
+ ? unpack($ppc ? 'x[72] Q' : 'x[48] Q', $stat_buf) # 64-bit Linux
+ : unpack($ppc ? 'x[76] L' : 'x[36] L', $stat_buf) ) # 32-bit Linux
: $^O eq 'freebsd' && $Config{longsize} == 8
? unpack('x[32] Q', $stat_buf) # 64-bit FreeBSD (key_t=long=8, ipc_perm=32)
: $^O eq 'solaris'
Description: SharedMem::stat: use the PowerPC offsets of struct shmid_ds
The per-OS offset table assumes the asm-generic field order, where shm_segsz
follows ipc64_perm and the three time fields come after it. PowerPC puts the
time fields first and shm_segsz after them, so segsz, atime, dtime and ctime
are all read from the wrong place there. cpid, lpid and nattch are unaffected:
both layouts are 48 bytes of ipc64_perm followed by four 8-byte fields, so
those three keep their offsets.
.
Companion to powerpc-shmid_ds-offset.patch, which does the same for
shm_segments(). No test currently catches this one: t/05-shm_stat.t asserts
only segsz >= SHM_BUFSIZ, and the value misread on PowerPC is shm_atime, a
timestamp far larger than SHM_BUFSIZ. The suite therefore passes without this
patch, but stat() still reports nonsense on ppc64el and ppc64.
.
The 64-bit offsets match the kernel headers and qemu's target_structs.h, and
are confirmed by a passing test suite on ppc64el under emulation. The 32-bit
PowerPC arm is derived from the headers only and is untested; Debian's 32-bit
powerpc is a ports architecture with no buildd coverage.
Author: Edmund Lodewijks <[email protected]>
Forwarded: https://github.com/stevieb9/ipc-shareable/issues/66
Last-Update: 2026-09-02
diff --git a/lib/IPC/Shareable/SharedMem.pm b/lib/IPC/Shareable/SharedMem.pm
index 4e6529e..3388ef4 100644
--- a/lib/IPC/Shareable/SharedMem.pm
+++ b/lib/IPC/Shareable/SharedMem.pm
@@ -191,14 +191,28 @@ sub stat {
my %values;
if ($^O eq 'linux') {
+ # PowerPC orders struct shmid_ds with the three time fields before
+ # shm_segsz; every other Linux architecture puts shm_segsz first,
+ # straight after ipc64_perm. Only that part of the struct differs.
+ my $ppc = $Config{archname} =~ /^(?:powerpc|ppc)/i;
+
if ($Config{longsize} == 8) {
# 64-bit Linux: ipc64_perm is 48 bytes.
# ipc64_perm: key(4) uid(4) gid(4) cuid(4) cgid(4) mode(4)
# seq(2) pad2(2) [4-byte align-pad] unused1(8) unused2(8)
# shmid_ds: segsz(8) atime(8) dtime(8) ctime(8) cpid(4) lpid(4) nattch(8)
+ # PowerPC: atime(8) dtime(8) ctime(8) segsz(8) cpid(4) lpid(4) nattch(8)
+ # (PowerPC's ipc64_perm is also 48 bytes: mode(4) seq(4) pad1(4)
+ # where the generic one has mode(4) seq(2) pad2(2) plus padding.)
- @values{qw(uid gid cuid cgid mode segsz atime dtime ctime cpid lpid nattch)}
- = unpack('x[4] L L L L L x[24] Q q q q l l Q', $data);
+ if ($ppc) {
+ @values{qw(uid gid cuid cgid mode atime dtime ctime segsz cpid lpid nattch)}
+ = unpack('x[4] L L L L L x[24] q q q Q l l Q', $data);
+ }
+ else {
+ @values{qw(uid gid cuid cgid mode segsz atime dtime ctime cpid lpid nattch)}
+ = unpack('x[4] L L L L L x[24] Q q q q l l Q', $data);
+ }
}
else {
# 32-bit Linux: ipc64_perm is 36 bytes (unsigned long = 4 bytes).
@@ -207,8 +221,18 @@ sub stat {
# shmid_ds: segsz(4) atime(4) atime_nsec(4) dtime(4) dtime_nsec(4)
# ctime(4) ctime_nsec(4) cpid(4) lpid(4) nattch(4)
- @values{qw(uid gid cuid cgid mode segsz atime dtime ctime cpid lpid nattch)}
- = unpack('x[4] L L L L L x[12] L L x[4] L x[4] L x[4] l l L', $data);
+ # PowerPC 32-bit differs again: ipc64_perm is 48 bytes there, and
+ # each time field is preceded by its _high half, with one more
+ # pad word before segsz.
+
+ if ($ppc) {
+ @values{qw(uid gid cuid cgid mode atime dtime ctime segsz cpid lpid nattch)}
+ = unpack('x[4] L L L L L x[24] x[4] L x[4] L x[4] L x[4] L l l L', $data);
+ }
+ else {
+ @values{qw(uid gid cuid cgid mode segsz atime dtime ctime cpid lpid nattch)}
+ = unpack('x[4] L L L L L x[12] L L x[4] L x[4] L x[4] l l L', $data);
+ }
}
}
elsif ($^O eq 'freebsd' && $Config{longsize} == 8) {
OpenPGP_signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
Source: libipc-shareable-perl
Source-Version: 1.19-2
Done: gregor herrmann <[email protected]>
We believe that the bug you reported is fixed in the latest version of
libipc-shareable-perl, which is due to be installed in the Debian FTP archive.
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 [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
gregor herrmann <[email protected]> (supplier of updated libipc-shareable-perl
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 [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sun, 25 Oct 2026 19:08:43 +0100
Source: libipc-shareable-perl
Architecture: source
Version: 1.19-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Perl Group <[email protected]>
Changed-By: gregor herrmann <[email protected]>
Closes: 1146517
Changes:
libipc-shareable-perl (1.19-2) unstable; urgency=medium
.
* Add patches to fix build failures on ppc*.
Thanks to Edmund Lodewijks for providing the patches.
(Closes: #1146517)
Checksums-Sha1:
456a9265d3102fb7a7144884f1a298770be62dcc 2573 libipc-shareable-perl_1.19-2.dsc
b75e9ec7aa9def83f4bb36660478383cdb5df5ad 6680
libipc-shareable-perl_1.19-2.debian.tar.xz
039ae103e43f2845a12d4472a009b850ffbc18b4 260876
libipc-shareable-perl_1.19-2.git.tar.xz
cead48b1c1557533e0f7dffcf90dede4dabdccbf 17784
libipc-shareable-perl_1.19-2_source.buildinfo
Checksums-Sha256:
7733d887d72dfd5b8e69e2caa0dd7cff80c5cad0649e0f41d6fdbac93ce122df 2573
libipc-shareable-perl_1.19-2.dsc
613755a6f4cd76568fb31fa0ec9f3a04dea7d63cfb6fe3ea6180a9e17b968145 6680
libipc-shareable-perl_1.19-2.debian.tar.xz
8ff2948c6fab39433e9b2df38140bd480712dcf63e4bae81801b2234682d00f8 260876
libipc-shareable-perl_1.19-2.git.tar.xz
5d35edbfd2d039025c9fa255e263f6b4c7c2bb165a392f3c23c8e350b2ed8422 17784
libipc-shareable-perl_1.19-2_source.buildinfo
Files:
eb82e276f65e2d7fccbea049718ebc1f 2573 perl optional
libipc-shareable-perl_1.19-2.dsc
5b6032c0b813c7c6ae0c95c52ca2d4b3 6680 perl optional
libipc-shareable-perl_1.19-2.debian.tar.xz
32a35c256fd031b076fc40ee4bb67ef4 260876 perl None
libipc-shareable-perl_1.19-2.git.tar.xz
fc88f9cf16534c7866376135ce60b00a 17784 perl optional
libipc-shareable-perl_1.19-2_source.buildinfo
Git-Tag-Info: tag=bd8acbdd66804b5c0a7bf8efd34318f7431d7149
fp=d1e1316e93a760a8104d85fabb3a68018649aa06
Git-Tag-Tagger: gregor herrmann <[email protected]>
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEN02M5NuW6cvUwJcqYG0ITkaDwHkFAmreR8YACgkQYG0ITkaD
wHkZJBAA2dgTdoc8dqvQqgW0ij+kMdxE09wR7nigCsWtwzmeqjLtiZJtv9Hmc6h/
cQZrxSRiiBBqQRcsEgTiKiXG1YEsdyUUUp966L0G9B7asWjBxDPC/g4TDA0n2pYi
fxemghz0l4yzzd3OwVndQXZadQFyT/HgczBrIgl/zMGFWdaWgjPkDXBi7uHIwpAM
CXwePVRl39E3Ecy/FRog0HuaJVsB8wNz/0YsKXS/RXjCVvmTDjR8RIK5l5SE1eG6
IeXA/9JUuPoI60jui1ynOivjPI0qtx2K0EfXAZTQNSYX2voCrui+osWbohK/h7y+
WMyppn7cJkEaLVu8wKFoQzh7JVIO+Ayhc/6kCmqcHEZInyTPATX0UpJiOTg95iqI
noivdICU9SvghWxm7ISi9WsxviqmEM8gXOK6rVMf+qcpL8+6ZryeN/ZEb9bbf7P1
MeKGagN8DNOhSERaL8OXRJjgN6dHUW3AK/DRdGaPkLw6d9QQddi7rGKAxF7jp9Ov
3FTRf6hbGygEbnEW0mnnjG7vCu4DfHzhkjkxIjyL8UwSHUK/5/BBI5LLXXgaBcD7
aAVSekn9ssL1fG9rRBQMD9257E7XsIbbFpK1blqfH4/wPMOydYC1W21voqgUd7tZ
U/90ufMY53RGA4jKPCMr+wxGDQ3aWqDFM3DbfIDOR55uTCiwcMg=
=BB2J
-----END PGP SIGNATURE-----
pgpz_2eOfeEpU.pgp
Description: PGP signature
--- End Message ---