Your message dated Thu, 21 May 2026 16:34:26 +0000
with message-id <[email protected]>
and subject line Bug#1089536: fixed in plptools 1.0.26-1
has caused the Debian Bug report #1089536,
regarding plptools: plpfuse fails to start and generates core dump on i686 32 
bits architecture
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.)


-- 
1089536: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1089536
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: plptools
Version: 1.0.13-2
Severity: important

Dear Maintainer,

The following report ONLY applies to the i686 32 bits port of the plpfuse tool 
from the plptools package.
The issue is grave (severity 7) on i686 32 bits system.
The issue is NOT present at all on amd64 64 bits system.

1. Quick issue description

When plpfuse is started to transfer data from and to a Psion S5mx, through a 
serial port, plpfuse crashes with a core dump.
The directory from the Psion is not mounted. It is impossible to transfer data 
in both direction.
On i686 32 bits system, the package is unusable.

2. Detailed issue description

In debug mode, plpfuse is started with the following command :
$ plpfuse -d -d -d /media/lionel/psion

The result of this command is as follows :
FUSE library version: 2.9.9
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
unique: 2, opcode: INIT (26), nodeid: 0, insize: 104, pid: 0
INIT: 7.38
flags=0x73fffffb
max_readahead=0x00020000
   INIT: 7.19
   flags=0x00000011
   max_readahead=0x00020000
   max_write=0x00020000
   max_background=0
   congestion_threshold=0
   unique: 2, success, outsize: 40
unique: 4, opcode: LOOKUP (1), nodeid: 1, insize: 45, pid: 4003
LOOKUP /BDMV
getattr /BDMV
Segmentation fault (core dumped)

Extraction of the backtrace with gdb in the corresponding core dump shows the 
following result :
Core was generated by `plpfuse -d -d -d /media/lionel/psion'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __gettimeofday (tv=0x0, tz=0xbf811070) at ../include/time.h:389
389     ../include/time.h: Aucun fichier ou dossier de ce type.
(gdb) bt
#0  __gettimeofday (tv=0x0, tz=0xbf811070) at ../include/time.h:389
#1  0xb7eb14d3 in PsiTime::PsiTime (this=0xbf811054, time=0) at 
./lib/psitime.cc:40
#2  0xb7eb20db in PlpDirent::PlpDirent (this=0xbf811040) at 
./lib/plpdirent.cc:44
#3  0x00452924 in rfsv_getattr (name=0x1026941 "BDMV", attr=0xbf81110c, 
size=0xbf811110, time=0xbf811114)
    at ./plpfuse/main.cc:291
#4  0x00454a00 in plp_getattr (path=0x1026941 "BDMV", st=0xbf8111f4) at 
./plpfuse/fuse.c:255
#5  0xb7e31786 in ?? () from /lib/i386-linux-gnu/libfuse.so.2
#6  0xb7e318f1 in ?? () from /lib/i386-linux-gnu/libfuse.so.2
#7  0xb7e3e6cc in ?? () from /lib/i386-linux-gnu/libfuse.so.2
#8  0xb7e3ad71 in fuse_session_loop () from /lib/i386-linux-gnu/libfuse.so.2
#9  0xb7e30ef2 in fuse_loop () from /lib/i386-linux-gnu/libfuse.so.2
#10 0x00452e7f in fuse (argc=5, argv=0xbf811614) at ./plpfuse/main.cc:405
#11 0x00451ac5 in main (argc=5, argv=0xbf811614) at ./plpfuse/main.cc:471

Detailed backtrace requires the installation of the plptools-dbgsym package.

3. Issue investigation and analysis

The backtrace shows a crash in gettimeofday(), after a call from 
PsiTime::PsiTime of the plptools library used by plpfuse.
gettimeofday() is called with a NULL first parameter, which is the cause of the 
crash.

I found out the following information in the man page of gettimeofdays :

3.a. The synopsis of gettimeofday is as follows :
int gettimeofday(struct timeval *restrict tv,
                 struct timezone *_Nullable restrict tz);
According to this synopsis, only the second parameter in "_Nullable".

3.b. DESCRIPTION
If  either  tv  or tz is NULL, the corresponding structure is not set or 
returned.  (However, compilation warnings
will result if tv is NULL.)
According to this description, both parameters can be NULL, but with 
compilation warnings for the first parameter.

3.c. STANDARDS
  SVr4, 4.3BSD.  POSIX.1-2001 describes gettimeofday() but not settimeofday().  
POSIX.1-2008 marks gettimeofday() as
  obsolete, recommending the use of clock_gettime(2) instead.
According to this warning, using gettimeofday() is no longer recommanded by 
POSIX.

4. Issue fix and patch

The code calling gettimeofday(), and maybe also the gettimeofday() man page, 
need some rework.

I did fix the issue of plpfuse on i686 32 bits systems, without actually 
replacing gettimeofday().
The proposed patch is as follows :

diff -u plptools-1.0.13.orig/lib/psitime.cc plptools-1.0.13/lib/psitime.cc
--- plptools-1.0.13.orig/lib/psitime.cc 2014-10-15 03:57:36.000000000 +0200
+++ plptools-1.0.13/lib/psitime.cc      2024-10-09 20:50:04.655072539 +0200
@@ -37,7 +37,7 @@
 
 PsiTime::PsiTime(time_t time) {
     ptzValid = false;
-    gettimeofday(NULL, &utz);
+    gettimeofday(&utv, &utz);
     setUnixTime(time);
 }
 
@@ -52,7 +52,7 @@
        tryPsiZone();
     }
     /* get our own timezone */
-    gettimeofday(NULL, &utz);
+    gettimeofday(&utv, &utz);
     psi2unix();
 }
 
@@ -62,7 +62,7 @@
     ptzValid = false;
     tryPsiZone();
     /* get our own timezone */
-    gettimeofday(NULL, &utz);
+    gettimeofday(&utv, &utz);    
     psi2unix();
 }

This patch avoids calling gettimeofday() with a NULL first parameter.
The patch reuses the utv variable already present in the code.
Validation of the proposed patch by upstream is recommanded, because usage of 
gettimeofday() seems deprecated by POSIX.

5. Additional information related to plptools packages in Debian

5.a. The issue is present in plptools 1.0.13-2, from Debian 12 Bookworm, 
current stable version.

5.b. The issue is also present in plptool 1.0.13-3, currently in testing/sid.

5.c. The proposed patch also fixes the issue in plptools 1.0.13-3 from testing. 
This has been tested in Bookwork.

5.d. The plptools 1.0.13-3 package fixes other issues in the code. Some issues 
fixed are related to build failing in 32 bits.
Build failing are related to 32 bits toolchain changes between Bookwork and 
Trixie.
These toolchain changes allow to detect issues in the code, but the issue with 
gettimeofday() is not detected.
I did not examine all details of the 32 bits toolchain changes between Bookwork 
and Trixie.

5.e. The proposed patch has also been applied and tested on amd64 64 bits 
system.
As far as I know, it does not break plpfuse on amd64 64 bits system.
Again, the issue described is NOT present on amd64 64 bits system.
The issue is specific to i686 32 bits build, and maybe to other 32 bits 
architectures, but I did not test them.

5.f. The issue described is not present in Debian 11 Bullseye, including in 
i686 32 bits architecture.
The issue has been introduced by Debian 12 Bookworm.
Debian 11 Bullseye uses plptools 1.0.13-2, the same package version that Debian 
12 Bookworm.
This means that a change in the libc, or in the 32 bits toolchain, did make 
this issue appear in Debian 12 Bookworm.
I suspect a change in the implementation of gettimeofday() in the 32 bits libc, 
but I did not investigate this part.
Additional investigation is recommanded, with comparisons between Debian 11 
Bullseye, Debian 12 Bookworm and testing/sid.

6. Testing

It is possible to observe the core dump without a Psion computer.
To fully test the provided patch, it is mandatory to use a Psion computer 
connected to a serial port.
I use a Psion S5mx, with serial port connections to amd64 64 bits systems and 
to i686 32 bits systems.

On my Debian 12 Bookworm systems, transfers from and to the Psion S5mx work 
correctly with the provided patch,
both on i686 32 bits systems and on amd64 64 bits systems.

Thanks !

-- System Information:
Debian Release: 12.8
  APT prefers stable-updates
  APT policy: (900, 'stable-updates'), (900, 'stable-security'), (900, 
'stable'), (300, 'stable-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-28-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr:en_US
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages plptools depends on:
ii  debconf [debconf-2.0]      1.5.82
ii  fuse3 [fuse]               3.14.0-4
ii  libc6                      2.36-9+deb12u9
ii  libfuse2                   2.9.9-6+b1
ii  libgcc-s1                  12.2.0-14
ii  libreadline8               8.2-1.3
ii  libstdc++6                 12.2.0-14
ii  lsb-base                   11.6
ii  sysvinit-utils [lsb-base]  3.06-4

plptools recommends no packages.
plptools suggests no packages.

-- debconf information:
  plptools/customize:
  plptools/frontends/remoteaddr:
  plptools/plpprintd/start: false
  plptools/ncpd/start: true
  plptools/ncpd/listenat: 127.0.0.1
  plptools/ncpd/serial: /dev/ttyS0
  plptools/plpfuse/start: false
  plptools/plpprintd/printqueue: psion

--- End Message ---
--- Begin Message ---
Source: plptools
Source-Version: 1.0.26-1
Done: Syed Shahrukh Hussain <[email protected]>

We believe that the bug you reported is fixed in the latest version of
plptools, 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.
Syed Shahrukh Hussain <[email protected]> (supplier of updated 
plptools 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: Thu, 26 Mar 2026 14:00:06 +0500
Source: plptools
Built-For-Profiles: noudeb
Architecture: source
Version: 1.0.26-1
Distribution: unstable
Urgency: medium
Maintainer: Syed Shahrukh Hussain <[email protected]>
Changed-By: Syed Shahrukh Hussain <[email protected]>
Closes: 1064669 1089536 1107206 1124464
Changes:
 plptools (1.0.26-1) unstable; urgency=medium
 .
   * New upstream version 1.0.26 (Closes: #1107206, #1089536).
   * Adopt package (Closes: #1064669).
   * Bump Standards-Version to 4.7.4.
   * Add self to d/copyright.
   * Update d/watch to version 5.
   * Compat level bump to 13 in d/control.
   * Add gnulib build dependency in d/control.
   * Remove fuse 2 dependency in d/control.
   * Update d/rules for gnulib based build.
   * Remove unused patches.
   * Update and unfuzz ambiguous_time_t.patch.
   * Fix init in fuse3.patch (Closes: #1124464).
   * Add patch to remove bootstrap.conf dependencies.
   * Add patch to update function calls for gnulib 2025.
Checksums-Sha1:
 0f0c4c3145fc5f4e92e5bbd6bad900adfed659f2 1968 plptools_1.0.26-1.dsc
 5356153dcc5970b84e4eebabd87cb5ec2bc50941 210245 plptools_1.0.26.orig.tar.gz
 691308ab9af26717a30e02774526bb03c78196f1 31592 plptools_1.0.26-1.debian.tar.xz
 db0c6ccb4bb1d24ae7b335543537031ee470e55e 7458 
plptools_1.0.26-1_source.buildinfo
Checksums-Sha256:
 6d52485798445592e166e4b4fd7d0a027a01a81d3d1a57854477cb9ae2e37325 1968 
plptools_1.0.26-1.dsc
 1b91c819bb08e380bc6062ac74f7837e693dad77f2859c7ef7b6a36ae8823ffc 210245 
plptools_1.0.26.orig.tar.gz
 250cbf9cf69b8bd5b5a6a86b78bbb0b9e8508d92ac90f518e3aa14dd8cf78fe1 31592 
plptools_1.0.26-1.debian.tar.xz
 9d60596e7159a684bad38df3f934c013e37cbaaf8525c48775a7364fccd20f83 7458 
plptools_1.0.26-1_source.buildinfo
Files:
 596f68ecbfcd97bd9a626c0acfc09f2a 1968 otherosfs optional plptools_1.0.26-1.dsc
 5f4cef23a10bf1ef41cb2216c3f57ba0 210245 otherosfs optional 
plptools_1.0.26.orig.tar.gz
 04a27616be1a78cd272d39c90911b212 31592 otherosfs optional 
plptools_1.0.26-1.debian.tar.xz
 2a1b66a8c30fd38152628829dad03eb5 7458 otherosfs optional 
plptools_1.0.26-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEd8lhnEnWos3N8v+qQoMEoXSNzHoFAmoPLo4ACgkQQoMEoXSN
zHp8bw/8Djwx3Rtr4KlRk7hJtlC/act8R0OjYh0iq19l2+RBc64GEyim++B+dC3T
P+KKXS5ELoktmlCvxnUMWBIEI5j+BQqcBKpJCwVAlD5vfiUfUBfVxshjnsRQ6pFV
tuM/5RhXv08/a0+QRwiVVYY9D7JvGOqpJ+iyw/x2IIoDjFhlImEjgLf5cJtYlKnT
567OdmYm0TtV2hG2O/X16HSK5RJNk6UTsRZc4DQlDdten2vpZrVl0mjNWrmkfR/p
eFRpAwW9tsTBC4Etdxq32TXXOr0h7b9+WHqplSpn1FRdsgipb3QSXHptQAi2xK+J
GDziybxXbXzba4pU/sAiMuzN37QppdsRja5DiZAME4T0YUDVmj/69ym5qWj+nCpa
pG1/0Gu0rh9BX0NoR6PMO4llUBKt2jBc6urpUUuV125LZ+nIkKvluCV2cKFfmijj
z9mD4wHquCNERMEA2KWLPAWH6Cv5f3Wi6Kv6D66mm7bvsJMRJ29Kan5IJKQGQBeK
vHNtWc9RmB4u2SsmbmYoSskSXz72XjOkXbzKuAo5tEaYs8wWlvl3OCTaufNaLupJ
cKDigM1svXFicRn2Hq9jhu5ZgWU9se00tqGKl/9MfCjVTBjP75PFePN01B+8ecdI
PIeFxGj5rWjUFnOTVD3gBghXc328pUvM2X7LOaqhhqlLijhKMMc=
=/R1v
-----END PGP SIGNATURE-----

Attachment: pgpTfTar5SXp3.pgp
Description: PGP signature


--- End Message ---

Reply via email to