gpsd-dev
[Top][All Lists]
Advanced

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

Re: [PATCH] Make the daemon start if SHM export segment exists but is to


From: Gary E. Miller
Subject: Re: [PATCH] Make the daemon start if SHM export segment exists but is too small
Date: Thu, 30 Jan 2020 12:09:21 -0800

Yo Matt!

On Thu, 30 Jan 2020 16:07:13 +1100
Matt <address@hidden> wrote:

> On a Debian system, after upgrading gpsd just now, the newer version
> of the daemon failed to start because there is already a sysv shared
> memory segment for exporting data to other programs, but it is too
> small.

Just run "scons shmclean" in the gpsd source directory.

> The attached patches works around this scenario by deleting, then
> re-creating the shm segment with the desired size.

Your patch does not delete the shm, it just removes the check
for wrong sized shmexport.  Which allows gpsd to then use a wrong
size shm, leading to later memory errors.

Im in favor of removing all asserts, and replacing them with normal
runtime errors, but neither solves the underlying problem, just points
to it.

> The too-small SHM segment appears to be hanging around because

Something created the wrong sized segment after you booted your system.
You need to find, and fix, the program creating the wrong sized segment.

Maybe an old copy of gpsd got run before you ran the new gpsd, forgetting
to do the shmclean, or rebooting, first.

> the
> daemon doesn't delete it on exit because the daemon has dropped
> privileges by that time.

Yup.  Also because other programs will have the SHM opened (chronyd, ntpd,
ntshmmon, etc.) so you can't delete it.

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


reply via email to

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