gpsd-users
[Top][All Lists]
Advanced

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

Re: Segfault after upgrade.


From: Kai Harrekilde-Petersen
Subject: Re: Segfault after upgrade.
Date: Sun, 24 May 2020 13:39:53 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

David,

The OS never generates a segmentation violation, only programs does that and the OS reports back that the program did something illegal. If the OS makes an error, you usually get a kernel panic/oops message (and the system goes belly-up).

Most of the strace just shows the dynamic libraries being set up (much akin to .DLL on Windows).

The bit you quoted below shows that the program tries to access an unmapped memory location, at address 0x5343ce. You would have to run cgps under a debugger (e.g. ddd or gdb) to determine why.

Kai

On 24 May 2020 12.49, David J Taylor wrote:
The next step would be to run the command under strace -

    strace -f <path to gpsd>/gpsd <and whatever options you are feeding it>

At least, that's the form I always use, the -f means it 'follows' child
processes that are created by the main process. Beware that strace can
generate scads of output, and much of it can appear near incomprehensible.
You can direct the output to a file using the -o option.

I can never remember whether strace is part of the default installation,
so you may have to 'apt install strace'.

Despite the inscrutable nature of the output, when something is
segfaulting, the clues tend to stick out, either by breaking a pattern in
the output that you can perceive, or in a rather blatant chunk of output
at the very end before it exits.

Paul Theodoropoulos
www.anastrophe.com
====================================================

Thanks, Paul.  Yes, strace is installed, so I ran it on cgps which also segfaults.

Here are the last few lines of output:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mprotect(0x507000, 4096, PROT_READ)     = 0
mprotect(0xb6fa5000, 4096, PROT_READ)   = 0
munmap(0xb6f4e000, 80160)               = 0
set_tid_address(0xb6f9e078)             = 19536
set_robust_list(0xb6f9e080, 12)         = 0
rt_sigaction(SIGRTMIN, {sa_handler=0xb6ddf8e8, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0xb6cba130}, NULL, 8) = 0 rt_sigaction(SIGRT_1, {sa_handler=0xb6ddf9a4, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0xb6cba130}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
ugetrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
brk(NULL)                               = 0x17e6000
brk(0x1807000)                          = 0x1807000
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x5343ce} ---
+++ killed by SIGSEGV +++
Segmentation fault
pi@RasPi-3:~ $
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I've kept the whole 430+ lines if needed and uploaded it to:

 https://www.satsignal.eu/temp/seg-fault.txt

I can't see whether this is in the OS or the cgps program, though.  Again, it's /both/ cgps and gpsd which segfault, so perhaps something in a common library?

Cheers,
David




reply via email to

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