[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New gpsd version with TCP reconnect

From: Gary E. Miller
Subject: Re: New gpsd version with TCP reconnect
Date: Wed, 2 Nov 2022 13:17:50 -0700

Yo Nick!

On Wed, 2 Nov 2022 09:54:13 +0000
Nick Taylor <> wrote:

> >> I have run new test using the blackhole route that you suggested
> >> some time ago:  
> > I found it even easier just to kill the socat sender.  
> I have tried that and as you say gpsd then recovers gracefully


> My fail case is only when I use blackhole and wait around 15 mins for 
> socat to timeout. In this case gpsd doesn't seem to realise that the 
> connection has failed...
Curious.  What could explain the difference of how gpsd sees the
two sceanrios?

Maybe i the "kill socat" case the retry gets an immediate ICMP
NACK due to port closed?

The "blackhole case would have the kernel stuck waiting forever the SYN-ACK.

But that does not explain the failure to detect loss of connection to
socat in the first place.

> I'm attaching 2 new logs of these 2 different cases
> I haven't yet asked my guy for details of gcc & libc as I suspect you 
> should see same fail if you replicate my test with blackhole

They look the sameL

gpsd:PROG: awaken(0) fd 7, path tcp://
gpsd:PROG: device 0 (fd=7, path tcp:// already active.
gpsd:CLIENT: => client(0) len 278: {"class":"DEVICES","devices":[{"class":"DEVIC


Except in the "kill socat" case, the disconnect is detected right away:

gpsd:INFO: CORE: tcp:// is offline ( 2.743439962 sec since 
gpsd:INFO: CORE: closing tcp://, fd 7
gpsd:PROG: CORE: no /etc/gpsd/device-hook present, skipped running DEACTIVATE 
hook. No such file or directory(2)
gpsd:PROG: CORE: pselect: timeout

But not in the blackhole case:

gpsd:PROG: CORE: pselect: timeout
gpsd:PROG: gpsd_multipoll(7) DEVICE_UNCHANGED for 5
gpsd:PROG: checking client(0)
gpsd:CLIENT: <= client(0): ?WATCH={"enable":true,"json":true};

The "is offline" is guarded by a zero read test:

    if (0 == newlen) {           // zero length read, possible EOF

Looks like there will be more info at higher debug levels.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  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: pgpDPJxsJL0N8.pgp
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]