Yo Chris!

On Tue, 5 May 2026 22:39:45 +0100
Chris Blackburn <[email protected]> wrote:

> I've been working a lot with GPSD on a project recently and I've
> noticed some strange behaviour.

Cool.  Welcome!

> One of these devices appears to rolled their own implementation of the
> client rather than use an off the shelf library. As a result they had
> a bug where they did not read from the TCP socket properly and after
> about 60 seconds or so they had filled up their TCP receive buffer
> and were sending back "TCP Zero Window" messages back to GPSD. This
> is obviously broken and we will be getting them to fix their
> implementation.

Ouch.  GPSD clients are usually pretty easy to write.  But many ways
to go wrong.  The GPSD examples should be studied.

> *however*, The strange behaviour we noticed was that, when this
> happened, it killed GPSD for every client simultaneously. Nobody got
> JSON data until this offending client eventually times out and reset
> its connection. At which point, all of the other clients would get a
> burst of data. Then the offending device reconnected and the saga
> repeated itself. So, one faulty client caused all clients to get
> (effectively) no location data.

Un good.  That is a new one.

> This was all observed with GPSD 3.22 on Debian 12. I then created a
> test program which replicated the behaviour of the offending device
> and ran that on a test box running 3.27.5 and it was still the same.

Good that you are on 3.27.6.  You mght try git head, but I expect
you will get the same results.

> Is this intended behaviour?

Intended crashing?  No.

> Or is there something to investigate here
> where clients are isolated from one another so one misbehaving client
> can't affect everyone?

I can't imagine why this is happening, but worth a serious look.

The best way to proceed is to send here the output of "gpsdebginfO",
and a -D5 log from gpsd when the error happens.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        [email protected]  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpkygzIc6o72.pgp
Description: OpenPGP digital signature

Reply via email to