[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-users] Shared memory interface with gpsd restart results in no dat
From: |
Michael Lum |
Subject: |
[gpsd-users] Shared memory interface with gpsd restart results in no data for client |
Date: |
Thu, 14 Jun 2018 11:47:26 -0700 |
Hi,
I'm using the
source from gpsd 3.17 on CentOS 7, Ublox
NEO 7 GPS receiver, shared memory
interface.
If I send a SIGSEGV to the gpsd or just do a quick stop/start my client
program does not "see" any data
for
a long time.
The shared memory segment is the old one because
the client is still attached.
Code executing in
gpsd:
shmexport.c
'tick' that goes into the bookends is a static
(initialized to zero, correct?).
Incremented immediately and used in the
bookends.
So everytime gpsd starts the tick value in the
bookend will start at '1'.
Code executing in
client:
libgps_shm.c
gps_shm_open() uses
malloc() to allocate memory for privdata_t.
This contains the
pointer to the shared memory segment and a
int
tick
member.
(Shouldn't 'tick' have been zeroed?)
gps_shm_waiting() checks that the bookend1 value is
greater than the 'tick' in the privdata.
But the privdata->tick could be very large
depending on how long the original gpsd instance was running.
In addition I
believe there will be a wrap around problem when the bookend1 value wraps to a
negative.
Best
regards,
Michael
Lum
4600 Jacombs Road,
Richmond BC, Canada V6V 3B1 | +1.604.303.2315
- [gpsd-users] Shared memory interface with gpsd restart results in no data for client,
Michael Lum <=
- Re: [gpsd-users] Shared memory interface with gpsd restart results in no data for client, Michael Lum, 2018/06/15
- Re: [gpsd-users] Shared memory interface with gpsd restart results in no data for client, Gary E. Miller, 2018/06/15
- Re: [gpsd-users] Shared memory interface with gpsd restart results in no data for client, Charles Curley, 2018/06/15
- Re: [gpsd-users] Shared memory interface with gpsd restart results in no data for client, Gary E. Miller, 2018/06/15
- Re: [gpsd-users] versioning. Was: Shared memory interface with gpsd restart results in no data for client, Charles Curley, 2018/06/20
- Re: [gpsd-users] versioning. Was: Shared memory interface with gpsd restart results in no data for client, Gary E. Miller, 2018/06/20
- Re: [gpsd-users] versioning. Was: Shared memory interface with gpsd restart results in no data for client, Charles Curley, 2018/06/20
- Re: [gpsd-users] versioning. Was: Shared memory interface with gpsd restart results in no data for client, Charles Curley, 2018/06/20
- Re: [gpsd-users] Shared memory interface with gpsd restart results in no data for client, Charles Curley, 2018/06/20