bugGPSD - Bugs: bug #37451, gpsmon segfaults on proprietary...


bug #37451: gpsmon segfaults on proprietary NMEA record

Submitted by:  Jeremy Mortis <jem>
Submitted on:  Thu 27 Sep 2012 08:23:31 PM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Eric S. Raymond <esr>
Open/Closed: Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 24 Oct 2012 04:22:09 AM UTC, comment #4:

Fix confirmed by submitter.

Eric S. Raymond <esr>
Project AdministratorIn charge of this item.
Tue 23 Oct 2012 03:25:35 PM UTC, comment #3:

The segfault happens in gpsmon, not gpsfake. gpsdecode happily
ignores the unrecognized records.

To reproduce, in one terminal window run 'gpsfake -i bad.log' and in another run gpsmon. Advance through a few records in the gpsfake window and gpsmon will segfault.

I just tried it again with the GIT head and the problem still happens. I'm running Ubuntu 12.05.


Jeremy Mortis <jem>
Tue 23 Oct 2012 02:39:54 PM UTC, comment #2:

I attempted to reproduce this behavior with git head and the following command:

gpsfake -1 -g <bad.log

but I couldn't replicate it. What was the exact command you used?

Please try reproducing with git head.

Also, please try reproducing by running the bad log through gpsdecode. From the error pattern this is almost certainly a problem in driver_nmea.c, and that utility exercises the NMEA decoder ditectly while avoiding the additional complexity of gpsfake and the gpsd toplevel.

Eric S. Raymond <esr>
Project AdministratorIn charge of this item.
Thu 27 Sep 2012 08:43:42 PM UTC, comment #1:

I should add that it's a freshly compiled gpsd 3.7, running on 64-bit Ubuntu 12.04. The 3.4 package available from the Ubuntu repo exhibits the same behaviour.

Jeremy Mortis <jem>
Thu 27 Sep 2012 08:23:31 PM UTC, original submission:

The GlobalTop MT3339 GPS chip includes a capability to record GPS fixes in flash for later retrieval. The download request is made via a proprietary NMEA packet "$PMTK622,1*29".

The results look like:

A few are contained in the attached file.

gpsmon segfaults when it encounters these PMTKLOX packets. Using gpsfake in one-step mode it appears to happen on the third packet.

Jeremy Mortis <jem>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #26662:  bad.log added by jem (1KiB - text/x-log)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by esr (Posted a comment)
  • -unavailable- added by jem (Submitted the item)
  • -unavailable- added by jem

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 22 Nov 2013 01:47:25 PM UTCesrOpen/ClosedOpen=>Closed
    Wed 24 Oct 2012 04:22:09 AM UTCesrStatusNeed Info=>Fixed
    Tue 23 Oct 2012 02:39:54 PM UTCesrStatusNone=>Need Info
      Assigned toNone=>esr
    Thu 27 Sep 2012 08:23:31 PM UTCjemAttached File-=>Added bad.log, #26662
      Carbon-Copy-=>Added -unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup1