[Top][All Lists]

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

Re: Unexpected logging from gpsd

From: Mick Durkin
Subject: Re: Unexpected logging from gpsd
Date: Mon, 11 Oct 2021 11:25:12 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

Hi Gary,

I removed gpsd with "scons uninstall" and then deleted the entire gpsd 

I then pulled a fresh copy from the repository and did a full "scons && scons check 
&& scons udev-install".
This went without any problems that I could see apart from some warnings about 
missing stuff that seems to be
related to graphical things (this is a text-only server).

I logged this whole "git clone" and "scons" process to the attached 

I then started gpsd with my normal "gpsd -n /dev/ttyS0" and ran the gpsdebuginfo script, 
logging these steps to the attached "gpsdebuginfo.log".

The bottom of this log also includes a couple of short snapshots of "tail -10 
/var/log/messages" which show the output I originally found still appearing.

Below you said "All the time?  I thought you said only for PPS stuff?", what I 
meant was that I see these PPS logs all the time.
I do not see any output from the non-thread parts of gpsd.

I am familiar with that latter type of output as I have used the -D x option in 
the past when working on the code.

The thread specific output is something I have not worked with as either it is 
more recent than the versions of gpsd I have worked with
or it never came to my attention before. I certainly never set anything 
deliberately to trigger these thread related logs.

If there is any other information or logs I can supply, please let me know.


Mick Durkin

On 10/10/2021 19:49, Gary E. Miller wrote:
Yo Mick!

On Sun, 10 Oct 2021 15:45:58 +0100
Mick Durkin <> wrote:

That still leaves me unclear why gpsd is outputting debug data all
the time.

All the time?  I thought you said only for PPS stuff?

When we want debugging to be active we specify the level
with the -D n option at startup.


This output is only coming from the
ppsthread code within gpsd, so why would that code be different?

As the name says, the PPS code is in a thread.  C code in a thread has
to be written differently than non-threaed C code because C is not
inherently safe with threads.

Alsoat all the gpsd code uses GPSD_LOG() for logging.  But to avoid
I/O and buffer contention, the PPS thread code uses pps_thread->log_hook().

log_hook() points to ppsthread_log90 in gpsd/libgpsd_core.c

It uses similar log levels to GPSD_LOG():

log_hook() levels:

#define THREAD_ERROR    0
#define THREAD_WARN     1
#define THREAD_INF      2
#define THREAD_PROG     3
#define THREAD_RAW      4

GPSD_LOG() levels:

/* logging levels */
#define LOG_ERROR       -1      /* errors, display always */
#define LOG_SHOUT       0       /* not an error but we should always see it */
#define LOG_WARN        1       /* not errors but may indicate a problem */
#define LOG_CLIENT      2       /* log JSON reports to clients */
#define LOG_INF         3       /* key informative messages */
#define LOG_PROG        4       /* progress messages */
#define LOG_IO          5       /* IO to and from devices */
#define LOG_DATA        6       /* log data management messages */
#define LOG_SPIN        7       /* logging for catching spin bugs */
#define LOG_RAW         8       /* raw low-level I/O */
#define LOG_RAW1        9       // rawer
#define LOG_RAW2       10       // rawest

If you are getting debug level logs from log_hook() and not from GPSD_LOG()
then that points to some problem in log_hook() decding what to send
to the logs.

I'd still like the output of gpsdebuginfo.

And be sure that all traces of any previous gpsd installation have been
removed and that you started your build from a clean tree.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  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: install.log
Description: Text document

Attachment: gpsdebuginfo.log
Description: Text document

reply via email to

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