#1140603 gpsd SHM driver broken on armhf

Package:
gpsd
Source:
gpsd
Description:
Global Positioning System - daemon
Submitter:
Joerg Dorchain
Date:
2026-08-13 18:37:02 UTC
Severity:
normal
Tags:
#1140603#5
Date:
2026-06-23 10:39:16 UTC
From:
To:
Hello,

while gpsd itself starts fine, it fails to provide time via the SHM
interface to ntpsec on armhf architecture.
Version 3.25-5+deb13u1 works fine.

Apart from ntpsec not picking up time from the configure shm segment as with
the working version (checking with ntpq -p), ipcs -m reports a shm segment size
of 80 bytes for version 3.27.5-0.1, while it is 96 for 3.25-5+deb13u1, and
also what ntpsec creates when started first.

Best regards,

Joerg

#1140603#10
Date:
2026-07-01 07:26:59 UTC
From:
To:
tags 1140603 + patch fixed-upstream
thanks

Upstream has fixed the bug in the current git head.

Repackaging the current version would be greatly appreciated.

Best regards

Joerg

#1140603#17
Date:
2026-08-09 08:58:33 UTC
From:
To:
Hi,

If by repackaging, you mean uploading a packaged based on git head -
that is not an option. I'd rather wait for the next version to be
released and upload that.

Alternatively, the other way is to apply a minimal targeted fix on
3.27.5 - a patch addressing that problem only. But from what I saw in
git, I am not confident that I can properly extract that without
breaking something else.

If you can point me to the minimal patch that fixes the problem, I will
do it.

With best regards,
b.

#1140603#22
Date:
2026-08-10 07:53:51 UTC
From:
To:
Hi,

On Sun, 09 Aug 2026 11:58:33 +0300 Boian Bonev <bbonev@ipacct.com> wrote:
[...]

That patch is the following commit
https://gitlab.com/gpsd/gpsd/-/commit/8f7a59f768a87d45f546643ec7ea0546be4e0dbf

It affects only 1 file fixing exactly this bug.
The complete story is at
https://gitlab.com/gpsd/gpsd/-/work_items/403

Best regards,

Joerg

#1140603#27
Date:
2026-08-12 11:51:43 UTC
From:
To:
https://gitlab.com/gpsd/gpsd/-/commit/8f7a59f768a87d45f546643ec7ea0546be4e0dbf.patch
gives a directly usable patch:


From 8f7a59f768a87d45f546643ec7ea0546be4e0dbf Mon Sep 17 00:00:00 2001
From: "Gary E. Miller" <gem@rellim.com>
Date: Tue, 30 Jun 2026 20:32:13 -0700
Subject: [PATCH] inclide/ntpshm.h: Partially revert 42309b8f.

Armian uses 64 bit time_t on 32 bit kernel, but does not
set _TIME_BITS.
---
 include/ntpshm.h | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/include/ntpshm.h b/include/ntpshm.h
index c8d5128ad..1c118525d 100644
--- a/include/ntpshm.h
+++ b/include/ntpshm.h
@@ -1,5 +1,5 @@
 /*
- * This file is Copyright 2015 by the GPSD project
+ * This file is Copyright by the GPSD project
  * SPDX-License-Identifier: BSD-2-clause
  */

@@ -39,23 +39,11 @@ struct shmTime
                  *       clear valid
                  */
     volatile int count;
-#if defined(_TIME_BITS) && 64 == _TIME_BITS
-    /* libc default time_t is 32-bits, but we are using 64-bits.
-     * glibc 2.34 and later.
-     * Lower 31 bits, no sign bit, are here. */
-    unsigned clockTimeStampSec;
-#else
+    // time_t may be 32 or 64-bit, depending
     time_t clockTimeStampSec;
-#endif
     int clockTimeStampUSec;
-#if defined(_TIME_BITS) && 64 == _TIME_BITS
-    /* libc default time_t is 32-bits, but we are using 64-bits.
-     * glibc 2.34 and later.
-     * Lower 31 bits, no sign bit, are here. */
-    unsigned receiveTimeStampSec;
-#else
+    // time_t may be 32 or 64-bit, depending
     time_t receiveTimeStampSec;
-#endif
     int receiveTimeStampUSec;
     int leap;                   // not leapsecond offset, a notification code
     int precision;              // log(2) of source jitter

#1140603#32
Date:
2026-08-13 18:34:49 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
gpsd, 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 1140603@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Boian Bonev <bbonev@ipacct.com> (supplier of updated gpsd 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@ftp-master.debian.org)
Format: 1.8
Date: Thu, 13 Aug 2026 18:01:36 +0000
Source: gpsd
Architecture: source
Version: 3.27.5-3
Distribution: unstable
Urgency: medium
Maintainer: Boian Bonev <bbonev@ipacct.com>
Changed-By: Boian Bonev <bbonev@ipacct.com>
Closes: 1140603
Changes:
 gpsd (3.27.5-3) unstable; urgency=medium
 .
   * Add an upstream patch to partially revert the ntpshm.h time_t
     changes, fixing the SHM interface on 32-bit systems with 64-bit
     time_t like armhf (Closes: #1140603)
Checksums-Sha1:
 b75c61847147323777f6f695d64ea602248a8a9d 3107 gpsd_3.27.5-3.dsc
 c6343f206dbd730fa6ade7489b3dc6745ceb3521 51364 gpsd_3.27.5-3.debian.tar.xz
 07248c3a713f7651d10fa43dbff2f14b3d58b86e 20865 gpsd_3.27.5-3_amd64.buildinfo
Checksums-Sha256:
 b1abb2d8ea5dfe2c6fdf7f1ad3fd43345be63a0782c981d28ae19320dae55a33 3107 gpsd_3.27.5-3.dsc
 a488a066eb013434ee512782800daf38d1997c79df0f775d9f3f9e847da9b01a 51364 gpsd_3.27.5-3.debian.tar.xz
 44ae8b4d9c068a9b6f328827722c562883d5c0a3dccf5824fcf32071fa3c5a71 20865 gpsd_3.27.5-3_amd64.buildinfo
Files:
 784894a4c98e6ac0cb68c8ad4b9f0a77 3107 misc optional gpsd_3.27.5-3.dsc
 d5367ed84837e9c19528a321c5601cfe 51364 misc optional gpsd_3.27.5-3.debian.tar.xz
 ad10f5ae9c7bdee3352193bc6f72ea83 20865 misc optional gpsd_3.27.5-3_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEEumC8IPN+WURNbSUAE2VyCRPS8i0FAmp+CJwSHGJib25ldkBp
cGFjY3QuY29tAAoJEBNlcgkT0vIt3m8P/R4ymD0Fr79jCnPMriZosivpi70+li3U
02MaIreJONUcG3HhJfAfa34dV+RD7tB7SGZl49Py3JkbWAK+HsZ3CQCIbiubBOTk
gIiFNHjjJ5kkloOlbYH2Wu1YYvxzaxAJTm+kOk2fq4tGTpRDJnI0M+TZ83VK9/VQ
BJngfPzoFFIVkwDcvefe4jGwjysm04wV10zNmfG+gv5vvyutoiBcszRHE6UvpCLe
QkpSjxvX77qVUHP6iQQoPphgyZwK/Px0oEGoLZ7Qo8DygnHpQxnYdG5PQg8mJhqF
h9UqLX64gRyH0C6QhuSdsY0Bcy8VuwKo4DNLN39DWEHOFZu2jpOdrnJGzM5fojMX
M40lPwwx9MLmcqmR+8dvzvGR0CvTvZTR9xJOSXCTqi5SI/4O32C9vkc49Z5EJPWH
q1aRAGGTwaalN9YeLWZNFMFo7voC3dHNy6AzBG7/hkKDLJani+ldbDNaoWFpdMAu
nx/64XfvheA6TwNvvc31aSXXXFFI1JfTmdr6Rk+DShzwtRO2kJg6NbFKxyME+zym
y4BxwNOBII3t58PDEwfeOOkIw9NwQAtLeLBvskFFtdV2w9v3/DX5RkfyNJNCaDnJ
xQJXqbjS4TcBLcDKXys9Gbd2H5y8qpZYrK7WmYZjPjWPWxEtACrfN1Zh7UsfcB3l
2rg1Sk1Rela+
=gTEW
-----END PGP SIGNATURE-----