[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Make the daemon start if SHM export segment exists but is too sm
From: |
Matt |
Subject: |
[PATCH] Make the daemon start if SHM export segment exists but is too small |
Date: |
Thu, 30 Jan 2020 16:07:13 +1100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 |
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.
The attached patches works around this scenario by deleting, then
re-creating the shm segment with the desired size.
The too-small SHM segment appears to be hanging around because the
daemon doesn't delete it on exit because the daemon has dropped
privileges by that time. This is a separate problem, which I intend to
address shortly.
Failure mode without these patches:
Jan 30 09:58:13 hostname gpsd[8584]: gpsd:ERROR: shmget(0x47505344,
24024, 0666) for SHM export failed: Invalid argument
Old segment lying around:
$ sudo ipcs |fgrep 0x47505344
0x47505344 8 root 666 20816 0
New segment after starting daemon with these patches:
$ sudo ipcs |fgrep 0x47505344
0x47505344 851992 root 666 24032 1
0001-If-the-SHM-export-segment-can-t-be-used-because-it-s.patch
Description: Text Data
0002-Remove-assertion-which-anyway-passes-in-accordance-w.patch
Description: Text Data
signature.asc
Description: OpenPGP digital signature
- [PATCH] Make the daemon start if SHM export segment exists but is too small,
Matt <=