SEGV while moving about in libedit

Bug #1445848 reported by Chris Pavlina
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Won't Fix
Critical
Unassigned

Bug Description

libedit dumped core during simple navigate/pan operations during a long editing session.

~ % coredumpctl gdb
           PID: 5539 (kicad)
           UID: 1000 (cmp)
           GID: 1000 (cmp)
        Signal: 11 (SEGV)
     Timestamp: Sat 2015-04-18 22:02:34 EDT (17s ago)
  Command Line: /opt/kicad/bin/kicad
    Executable: /opt/kicad/bin/kicad
 Control Group: /user.slice/user-1000.slice/session-c1.scope
          Unit: session-c1.scope
         Slice: user-1000.slice
       Session: c1
     Owner UID: 1000 (cmp)
       Boot ID: 71a69430ff9c4f90a002d4406a8baef0
    Machine ID: f11eafa91b284132aa328da2c8850845
      Hostname: cmp-desktop
      Coredump: /var/lib/systemd/coredump/core.kicad.1000.71a69430ff9c4f90a002d4406a8baef0.5539.1429408954000000.lz4
       Message: Process 5539 (kicad) of user 1000 dumped core.

GNU gdb (GDB) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/kicad/bin/kicad...done.
[New LWP 5539]
[New LWP 5550]

warning: .dynamic section for "/opt/kicad/bin/_eeschema.kiface" is not at the expected address (wrong library or version mismatch?)

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/opt/kicad/bin/kicad'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f20a32d2c04 in LIB_EDIT_FRAME::EndDrawGraphicItem (this=0x1c0f9d0, DC=0x7ffc08aba240) at /home/cmp/git/kicad/eeschema/symbdraw.cpp:354
354 m_drawItem->EndEdit( GetCrossHairPosition( true ) );
(gdb) bt
#0 0x00007f20a32d2c04 in LIB_EDIT_FRAME::EndDrawGraphicItem (this=0x1c0f9d0, DC=0x7ffc08aba240) at /home/cmp/git/kicad/eeschema/symbdraw.cpp:354
#1 0x00007f20a322cd75 in LIB_EDIT_FRAME::OnLeftClick (this=0x1c0f9d0, DC=0x7ffc08aba240, aPosition=...) at /home/cmp/git/kicad/eeschema/libedit_onleftclick.cpp:84
#2 0x00007f20a3388507 in EDA_DRAW_PANEL::OnMouseEvent (this=0x1c144c0, event=...) at /home/cmp/git/kicad/common/draw_panel.cpp:1068
#3 0x00007f20b3ee7b5e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/libwx_baseu-3.0.so.0
#4 0x00007f20b4084508 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#5 0x00007f20b408460b in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/libwx_baseu-3.0.so.0
#6 0x00007f20b40849b8 in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#7 0x00007f20b4084a43 in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#8 0x00007f20b4084aa5 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#9 0x00007f20b4ab25cb in wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_gtk2u_core-3.0.so.0
#10 0x00007f20b4084817 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#11 0x00007f20b484b1b2 in ?? () from /usr/lib/libwx_gtk2u_core-3.0.so.0
#12 0x00007f20b231590f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#13 0x00007f20b1ced175 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#14 0x00007f20b1cfea5c in ?? () from /usr/lib/libgobject-2.0.so.0
#15 0x00007f20b1d07205 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#16 0x00007f20b1d0795f in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#17 0x00007f20b242cb9c in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#18 0x00007f20b2314054 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
#19 0x00007f20b23144eb in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
#20 0x00007f20b1f892cc in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#21 0x00007f20b0fc871d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#22 0x00007f20b0fc8a08 in ?? () from /usr/lib/libglib-2.0.so.0
#23 0x00007f20b0fc8d32 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#24 0x00007f20b2313467 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#25 0x00007f20b481e1d5 in wxGUIEventLoop::DoRun() () from /usr/lib/libwx_gtk2u_core-3.0.so.0
#26 0x00007f20b3f2dd50 in wxEventLoopBase::Run() () from /usr/lib/libwx_baseu-3.0.so.0
#27 0x00007f20b3ee9f06 in wxAppConsoleBase::MainLoop() () from /usr/lib/libwx_baseu-3.0.so.0
#28 0x000000000043e790 in APP_KICAD::OnRun (this=0x18345d0) at /home/cmp/git/kicad/kicad/kicad.cpp:274
#29 0x00007f20b3f8581d in wxEntry(int&, wchar_t**) () from /usr/lib/libwx_baseu-3.0.so.0
#30 0x000000000043cb26 in main (argc=1, argv=0x7ffc08abb048) at /home/cmp/git/kicad/kicad/kicad.cpp:306
(gdb)

Core saved in case someone wants to look at it.

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

bzr-5609
Application: kicad
Version: (after 2015-apr-15 BZR unknown)-product Debug build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.9.2,wx containers,compatible with 2.8)
Platform: Linux 3.19.3-3-ARCH x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.57.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=OFF
         KICAD_SCRIPTING_MODULES=OFF
         KICAD_SCRIPTING_WXPYTHON=OFF
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Changed in kicad:
importance: Undecided → Critical
Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

warning: .dynamic section for "/opt/kicad/bin/_eeschema.kiface" is not at the expected address (wrong library or version mismatch?)

This is my fault, gdb loaded the wrong binary. Switching to the correct one doesn't change the backtrace, though.

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :
Download full text (4.9 KiB)

And another...

~ % coredumpctl gdb
           PID: 11016 (kicad)
           UID: 1000 (cmp)
           GID: 1000 (cmp)
        Signal: 11 (SEGV)
     Timestamp: Sun 2015-04-19 22:17:07 EDT (12s ago)
  Command Line: /opt/kicad/bin/kicad
    Executable: /opt/kicad/bin/kicad
 Control Group: /user.slice/user-1000.slice/session-c1.scope
          Unit: session-c1.scope
         Slice: user-1000.slice
       Session: c1
     Owner UID: 1000 (cmp)
       Boot ID: 71a69430ff9c4f90a002d4406a8baef0
    Machine ID: f11eafa91b284132aa328da2c8850845
      Hostname: cmp-desktop
      Coredump: /var/lib/systemd/coredump/core.kicad.1000.71a69430ff9c4f90a002d4406a8baef0.11016.1429496227000000.lz4
       Message: Process 11016 (kicad) of user 1000 dumped core.

GNU gdb (GDB) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/kicad/bin/kicad...done.
[New LWP 11016]
[New LWP 11078]
[New LWP 11085]
[New LWP 11083]
[New LWP 11035]
[New LWP 11084]

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/opt/kicad/bin/kicad'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000000000ab28400 in ?? ()
(gdb) bt
#0 0x000000000ab28400 in ?? ()
#1 0x00007f9a54a7ac56 in LIB_EDIT_FRAME::EndDrawGraphicItem (this=0x2433560, DC=0x7fff3b8c46e0) at /home/cmp/git/kicad/eeschema/symbdraw.cpp:354
#2 0x00007f9a549d4dc5 in LIB_EDIT_FRAME::OnLeftClick (this=0x2433560, DC=0x7fff3b8c46e0, aPosition=...) at /home/cmp/git/kicad/eeschema/libedit_onleftclick.cpp:84
#3 0x00007f9a54b30557 in EDA_DRAW_PANEL::OnMouseEvent (this=0x3a42600, event=...) at /home/cmp/git/kicad/common/draw_panel.cpp:1068
#4 0x00007f9a75389b5e in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from /usr/lib/libwx_baseu-3.0.so.0
#5 0x00007f9a75526508 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#6 0x00007f9a7552660b in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from /usr/lib/libwx_baseu-3.0.so.0
#7 0x00007f9a755269b8 in wxEvtHandler::TryHereOnly(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#8 0x00007f9a75526a43 in wxEvtHandler::ProcessEventLocally(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so.0
#9 0x00007f9a75526aa5 in wxEvtHandler::ProcessEvent(wxEvent&) () from /usr/lib/libwx_baseu-3.0.so....

Read more...

Revision history for this message
jean-pierre charras (jp-charras) wrote :

How to reproduce this crash ?

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Unfortunately, I don't know. It happened when I went to move an object in the middle of an hours-long editing session, no idea what led up to it. I was just picking up a label and moving it, for what must have been the hundredth time. That's why I saved the core dumps, in case somebody wants to hunt for clues :(

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

By label I'm assuming you mean field or are you referring to a text object?

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Agh, yes, it would have been a field.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Chris,

Do you know if you were adding and/or deleting any user defined fields or if you were only moving the default (reference, value, footprint, and datasheet) fields? I've tried everything I could think to do with fields and I cannot get the library editor to segfault. Any help to reproduce this bug would be greatly appreciated.

Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

I haven't been able to reproduce it either, so I'm just going to close this. Whatever causes it either happens incredibly rarely or has been "accidentally" fixed by something else.

Changed in kicad:
status: New → Incomplete
Revision history for this message
Chris Pavlina (pavlina-chris) wrote :

Further investigation turned up nothing - I can't find a way to bring this up either. And when I went to dig through the core dump, I found my system had deleted it as it was old. I'm going to close this one Won't Fix to get it out of the way - I highly doubt it will come up again. Might have been due to something completely unrelated. Who knows, could have been related to an external library, a memory fault, anything. This does not appear to be a problem anymore, whatever it was.

Changed in kicad:
status: Incomplete → Won't Fix
Revision history for this message
Nick Østergaard (nickoe) wrote :

Some problems exist only to never be fixed. :P

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1445848] Re: SEGV while moving about in libedit

Someone can reopen the bug report if they can reproduce it and give
detailed instructions on how reliably reproduce it.

On 6/22/2015 9:05 PM, Chris Pavlina wrote:
> Further investigation turned up nothing - I can't find a way to bring
> this up either. And when I went to dig through the core dump, I found my
> system had deleted it as it was old. I'm going to close this one Won't
> Fix to get it out of the way - I highly doubt it will come up again.
> Might have been due to something completely unrelated. Who knows, could
> have been related to an external library, a memory fault, anything. This
> does not appear to be a problem anymore, whatever it was.
>
> ** Changed in: kicad
> Status: Incomplete => Won't Fix
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.