gpsd-users
[Top][All Lists]
Advanced

[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 <nicktaylor@dataskill.uk> 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://192.168.2.53:2948
gpsd:PROG: device 0 (fd=7, path tcp://192.168.2.53:2948) already active.
gpsd:CLIENT: => client(0) len 278: {"class":"DEVICES","devices":[{"class":"DEVIC
E","path":"tcp://192.168.2.53:2948","driver":"NMEA0183","activated":"2022-11-02T
09:08:55.306Z","flags":1}]}
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"
timing":false,"split24":false,"pps":false}

[...]

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

gpsd:INFO: CORE: tcp://192.168.2.53:2948 is offline ( 2.743439962 sec since 
data)
gpsd:INFO: CORE: closing tcp://192.168.2.53:2948, 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.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  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]