bug-ncurses
[Top][All Lists]
Advanced

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

Re: gpsmon crashes in ncurses code


From: Stian Skjelstad
Subject: Re: gpsmon crashes in ncurses code
Date: Fri, 15 May 2020 15:19:54 +0200

Tested with the helgrind tool too (tests for potential thread concurrency issues - multiple threads write/read from same memory locations without cache flushes/semaphores)?

Second potential issue from the back of my head: does gpsd use SIGTIMER? If so, make sure that all codepaths from that handler never touches ncurses.

Stian

On Fri, 15 May 2020, 14:49 SZIGETVÁRI János, <address@hidden> wrote:
Hi Stian,

Yes, that was one of the first things we did over at the gpsd mailing list.
This was the result:

root@ntp:~# valgrind /usr/bin/gpsmon
==9937== Memcheck, a memory error detector
==9937== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==9937== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==9937== Command: /usr/bin/gpsmon
==9937==
ESC[?1049hESC[22;0;0tESC[1;24rESC(BESC[mESC[4lESC[?7hESC[?1hESC===9937== Invalid write of size 4
==9937==    at 0x145D4: refresh_statwin (gpsmon.c:442)
==9937==    by 0x149E7: curses_init (gpsmon.c:490)
==9937==    by 0x176D7: main (gpsmon.c:1379)
==9937==  Address 0x4bcfaf0 is 24 bytes before a block of size 16 in arena "client"
==9937==

Best Regards,
János
--
Janos SZIGETVARI
RHCE, License no. 150-053-692

LinkedIn: linkedin.com/in/janosszigetvari

__@__˚V˚
Make the switch to open (source) applications, protocols, formats now:
- windows -> Linux, iexplore -> Firefox, msoffice -> LibreOffice
- msn -> jabber protocol (Pidgin, Google Talk)
- mp3 -> ogg, wmv -> ogg, jpg -> png, doc/xls/ppt -> odt/ods/odp


Stian Skjelstad <address@hidden> ezt írta (időpont: 2020. máj. 15., P, 14:38):
Hi

Have you testes to run gpsd using valgrind (using default memcheck tool or with helgrind tool)?

Stian

gpsmon.c, there's no report_lock() /
report_unlock() around the calls to this function, e.g., as
used in select_packet_monitor().  You might get better results with
the trace if the curses calls were consistently locked (whether
or not it seems "necessary").

reply via email to

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