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

 
 

bug #37451: gpsmon segfaults on proprietary NMEA record

Submitter:  Jeremy Mortis <jem>
Submitted:  Thu 27 Sep 2012 08:23:31 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  esr
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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

Fix confirmed by submitter.

Eric S. Raymond <esr>
Group administrator
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.

Thanks.

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>
Group administrator
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:
$PMTKLOX,1,40,A8FD6050,02BB3E4C,428F3FE4,C2490437,B7FD6050,02BE3E4C,428D3FE4,C2470421,C6FD6050,02BC3E4C,42893FE4,C2440455,D5FD6050,027D3E4C,428A3FE4,C2420482,14FE6050,02A63E4C,427C3FE4,C240046F,23FE6050,02903E4C,428E3FE4,C240049C*17

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 Files:
   
   
Comment:
   

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
  • -email is unavailable- added by esr (Posted a comment)
  • -email is unavailable- added by jem (Submitted the item)
  • -email is unavailable- added by jem
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-22 esr Open/ClosedOpen Closed
    2012-10-24 esr StatusNeed Info Fixed
    2012-10-23 esr StatusNone Need Info
        Assigned toNone esr
    2012-09-27 jem Attached File- Added bad.log, #26662
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code