bugGNU Octave - Bugs: bug #54507, Segfault in QT5 when resizing...

 
 

bug #54507: Segfault in QT5 when resizing window during initialization

Submitted by:  None
Submitted on:  Mon 13 Aug 2018 06:40:56 PM UTC  
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Need Info Assigned to:  None
Originator Name:  Steve Kargl Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.4.1
Operating System:  BSD

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Sun 10 Mar 2019 07:01:08 PM UTC, comment #6: 

No response, asumming this has been fixed in the latest release.  Closing report.

Rik <rik5>
Project Administrator
Sat 02 Mar 2019 09:35:15 PM UTC, comment #5: 

Version 4.4.1 is deprecated and no longer supported.  Please try with the latest stable release which is 5.1.0.  The problem is likely to have been fixed.

Rik <rik5>
Project Administrator
Fri 17 Aug 2018 12:04:11 AM UTC, comment #4: 

There could be something in Octave.  For a half year or more I've been experiencing a startup crash only after compilation and build when working on a bug, and not every time after compilation.  Instead maybe every tenth or fifteen time.  I'm using Mint linux.

It's the sort of thing in which, I'm guessing, the OS has to do a bit more work to locate and load the executable for some reason.  (Maybe find the program and put it in some hash table for quick future access?  Again, just guessing.)

Every time I see this crash, I try thinking of a way I could devise a way to find it, maybe make it occur regularly.  But then I just move on because the next launch will work fine.

I keep thinking it might have something to do with loading GUI settings from the previous session, that the long load delay causes the settings to clash with whatever else is happening at start up.  But again, that is only a general feeling.

So, the comment here about moving the window makes me wonder.  Window managers often do some fancy stuff.  For example, it wouldn't surprise me if launching an application in GTK or whatever redraws a window from tiny to small to create some neat-o effect.  So, maybe if there is a delay in loading and the settings restores the window size later than usual, maybe there is a thread clash of what the Window Manager is doing and what Octave GUI window resize is doing.

If you can make this problem more common than once every one or two days (which is what I see), it might lead to a route of investigation.  Perhaps Torsten could give simple instructions for a line to comment out so that the Octave GUI does not restore settings at start up, then you build and try to repeat the start-up crashes on FreeBSD; if the crashes go away, that could be a lead.

Dan Sebald <sebald>
Tue 14 Aug 2018 08:24:50 PM UTC, comment #3: 

Posted to the mailing list:

The crash doesn't occur on each execution.  I can get the
segfault in 1 out of every 5 or so executions.  It seems to
be related to how fast I can grab the window to resize/move
it.  I haven't noticed whether the command prompt is present
when I do the grabbing, but it is present as octave dumps
core.

Someone else has reported the bug on FreeBSD, and my FreeBSD bug
report is here:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230072

I'm not convinced it an octave problem, but I don't know
C++ so cannot delve into Qt5 with much success.  It alsoi
could be a FreeBSD pthread problem.

If you need me to recompile a support library with debug
symbols, just ask.

Thread 10 (LWP 100930):
#0  _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37
#1  0x00000002041da3e1 in _thr_umtx_timedwait_uint (mtx=0x20d1500c8, id=<optimized out>,
    clockid=<optimized out>, abstime=<optimized out>, shared=<optimized out>)
    at /usr/src/lib/libthr/thread/thr_umtx.c:236
#2  0x00000002041e4038 in cond_wait_user (abstime=0x0, cancel=1, cvp=<optimized out>, mp=<optimized out>)
    at /usr/src/lib/libthr/thread/thr_cond.c:306
#3  cond_wait_common (cond=<optimized out>, mutex=<optimized out>, abstime=0x0, cancel=1)
    at /usr/src/lib/libthr/thread/thr_cond.c:366
#4  0x0000000214bb41ed in ?? () from /usr/local/lib/dri/r600_dri.so
#5  0x0000000214bb4849 in ?? () from /usr/local/lib/dri/r600_dri.so
#6  0x00000002041d8426 in thread_start (curthread=0x211146100)
    at /usr/src/lib/libthr/thread/thr_create.c:291
#7  0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffbeff6000
warning: Unexpected size of section `.reg-xstate/100905' in core file.

Thread 9 (LWP 100905):
#0  _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37
#1  0x00000002041da3e1 in _thr_umtx_timedwait_uint (mtx=0x20d150098, id=<optimized out>,
    clockid=<optimized out>, abstime=<optimized out>, shared=<optimized out>)
    at /usr/src/lib/libthr/thread/thr_umtx.c:236
#2  0x00000002041e4038 in cond_wait_user (abstime=0x0, cancel=1, cvp=<optimized out>, mp=<optimized out>)
    at /usr/src/lib/libthr/thread/thr_cond.c:306
#3  cond_wait_common (cond=<optimized out>, mutex=<optimized out>, abstime=0x0, cancel=1)
    at /usr/src/lib/libthr/thread/thr_cond.c:366
#4  0x0000000214bb41ed in ?? () from /usr/local/lib/dri/r600_dri.so
#5  0x0000000214bb4849 in ?? () from /usr/local/lib/dri/r600_dri.so
#6  0x00000002041d8426 in thread_start (curthread=0x211145200)
    at /usr/src/lib/libthr/thread/thr_create.c:291
#7  0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffbf3f8000
warning: Unexpected size of section `.reg-xstate/100904' in core file.

Thread 8 (LWP 100904):
#0  _sigwait () at _sigwait.S:3
#1  0x00000002041ddf91 in __thr_sigwait (set=0x20346cea4 <octave_async_signals.sigmask>,
    sig=0x7fffbf5f8f94) at /usr/src/lib/libthr/thread/thr_sig.c:726
#2  0x0000000202ffaa39 in signal_watcher () from /usr/local/lib/octave/4.4.1/liboctave.so.6
#3  0x00000002041d8426 in thread_start (curthread=0x211145700)
    at /usr/src/lib/libthr/thread/thr_create.c:291
#4  0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffbf5f9000
warning: Unexpected size of section `.reg-xstate/100891' in core file.

Thread 7 (LWP 100891):
#0  _select () at _select.S:3
#1  0x00000002041db1d2 in __thr_select (numfds=1, readfds=0x7fffbf7f8f00, writefds=0x0,
    exceptfds=0x7fffbf7f8f80, timeout=0x7fffbf7f9008) at /usr/src/lib/libthr/thread/thr_syscalls.c:495
#2  0x00000002081c607d in rl_read_key () from /usr/local/lib/libreadline.so.7
#3  0x00000002081aac8b in readline_internal_char () from /usr/local/lib/libreadline.so.7
#4  0x00000002081aa5e5 in readline () from /usr/local/lib/libreadline.so.7
#5  0x0000000202fb5384 in octave::gnu_readline::do_readline(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool&) () from /usr/local/lib/octave/4.4.1/liboctave.so.6
#6  0x0000000202fb7052 in octave::command_editor::readline(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool&) () from /usr/local/lib/octave/4.4.1/liboctave.so.6
#7  0x0000000201947327 in interactive_input(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool&) () from /usr/local/lib/octave/4.4.1/liboctinterp.so.6
#8  0x0000000201946ebb in octave::base_reader::octave_gets(bool&) ()
   from /usr/local/lib/octave/4.4.1/liboctinterp.so.6
#9  0x000000020194889d in octave::terminal_reader::get_input(bool&) ()
   from /usr/local/lib/octave/4.4.1/liboctinterp.so.6
#10 0x00000002015da1e3 in octave::lexer::fill_flex_buffer(char*, unsigned int) ()
   from /usr/local/lib/octave/4.4.1/liboctinterp.so.6
#11 0x00000002015d5419 in yy_get_next_buffer(void*) () from /usr/local/lib/octave/4.4.1/liboctinterp.so.6
#12 0x00000002015c9df2 in octave_lex(OCTAVE_STYPE*, void*) ()
   from /usr/local/lib/octave/4.4.1/liboctinterp.so.6
#13 0x00000002015de8a7 in octave_pull_parse(octave_pstate*, octave::base_parser&) ()
   from /usr/local/lib/octave/4.4.1/liboctinterp.so.6
#14 0x00000002015ec96d in octave::parser::run() () from /usr/local/lib/octave/4.4.1/liboctinterp.so.6
#15 0x00000002019558d5 in octave::interpreter::main_loop() ()
   from /usr/local/lib/octave/4.4.1/liboctinterp.so.6
#16 0x000000020195478f in octave::interpreter::execute() ()
   from /usr/local/lib/octave/4.4.1/liboctinterp.so.6
#17 0x00000002009436c2 in octave::octave_interpreter::execute() ()
   from /usr/local/lib/octave/4.4.1/liboctgui.so.4
#18 0x0000000204644fb1 in QObject::event(QEvent*) () from /usr/local/lib/qt5/libQt5Core.so.5
#19 0x0000000203879151 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/local/lib/qt5/libQt5Widgets.so.5
#20 0x000000020387a441 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/local/lib/qt5/libQt5Widgets.so.5
#21 0x000000020461af91 in QCoreApplication::notifyInternal2(QObject*, QEvent*) ()
   from /usr/local/lib/qt5/libQt5Core.so.5
#22 0x000000020461be59 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /usr/local/lib/qt5/libQt5Core.so.5
#23 0x000000020466dd88 in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#24 0x0000000208747ea7 in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.0
#25 0x0000000208748234 in ?? () from /usr/local/lib/libglib-2.0.so.0
#26 0x00000002087482e4 in g_main_context_iteration () from /usr/local/lib/libglib-2.0.so.0
#27 0x000000020466d806 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/local/lib/qt5/libQt5Core.so.5
#28 0x0000000204616a8e in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/local/lib/qt5/libQt5Core.so.5
#29 0x0000000204453aec in QThread::exec() () from /usr/local/lib/qt5/libQt5Core.so.5
#30 0x0000000204457a2a in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#31 0x00000002041d8426 in thread_start (curthread=0x211144d00)
    at /usr/src/lib/libthr/thread/thr_create.c:291
#32 0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffbf7fa000
warning: Unexpected size of section `.reg-xstate/100825' in core file.

Thread 6 (LWP 100825):
#0  _umtx_op_err () at /usr/src/lib/libthr/arch/amd64/amd64/_umtx_op_err.S:37
#1  0x00000002041da3e1 in _thr_umtx_timedwait_uint (mtx=0x20d150050, id=<optimized out>,
    clockid=<optimized out>, abstime=<optimized out>, shared=<optimized out>)
    at /usr/src/lib/libthr/thread/thr_umtx.c:236
#2  0x00000002041e4038 in cond_wait_user (abstime=0x0, cancel=1, cvp=<optimized out>, mp=<optimized out>)
    at /usr/src/lib/libthr/thread/thr_cond.c:306
#3  cond_wait_common (cond=<optimized out>, mutex=<optimized out>, abstime=0x0, cancel=1)
    at /usr/src/lib/libthr/thread/thr_cond.c:366
#4  0x0000000204458e5b in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#5  0x0000000204458c24 in QWaitCondition::wait(QMutex*, unsigned long) ()
   from /usr/local/lib/qt5/libQt5Core.so.5
#6  0x0000000203a848d2 in ?? () from /usr/local/lib/qt5/libQt5Widgets.so.5
#7  0x0000000204457a2a in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#8  0x00000002041d8426 in thread_start (curthread=0x211143400)
    at /usr/src/lib/libthr/thread/thr_create.c:291
#9  0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffbf9fb000
warning: Unexpected size of section `.reg-xstate/100824' in core file.

Thread 5 (LWP 100824):
#0  _nanosleep () at _nanosleep.S:3
#1  0x00000002041dae2c in __thr_nanosleep (time_to_sleep=0x7fffbfbfaee8, time_remaining=0x7fffbfbfaee8)
    at /usr/src/lib/libthr/thread/thr_syscalls.c:289
#2  0x000000020466cf0b in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#3  0x00000002008f3272 in SelfListener::run() () from /usr/local/lib/octave/4.4.1/liboctgui.so.4
#4  0x0000000204457a2a in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#5  0x00000002041d8426 in thread_start (curthread=0x210c29700)
    at /usr/src/lib/libthr/thread/thr_create.c:291
#6  0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffbfbfc000
warning: Unexpected size of section `.reg-xstate/100822' in core file.

Thread 4 (LWP 100822):
#0  _poll () at _poll.S:3
#1  0x00000002041daf46 in __thr_poll (fds=0x211278008, nfds=1, timeout=-1)
    at /usr/src/lib/libthr/thread/thr_syscalls.c:338
#2  0x00000002087481d7 in ?? () from /usr/local/lib/libglib-2.0.so.0
#3  0x00000002087482e4 in g_main_context_iteration () from /usr/local/lib/libglib-2.0.so.0
#4  0x000000020466d806 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/local/lib/qt5/libQt5Core.so.5
#5  0x0000000204616a8e in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/local/lib/qt5/libQt5Core.so.5
#6  0x0000000204453aec in QThread::exec() () from /usr/local/lib/qt5/libQt5Core.so.5
#7  0x000000020d17c9c3 in ?? () from /usr/local/lib/qt5/libQt5DBus.so.5
#8  0x0000000204457a2a in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#9  0x00000002041d8426 in thread_start (curthread=0x210c27900)
    at /usr/src/lib/libthr/thread/thr_create.c:291
#10 0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffbfdfd000
warning: Unexpected size of section `.reg-xstate/100310' in core file.

Thread 3 (LWP 100310):
#0  _poll () at _poll.S:3
#1  0x00000002041daf46 in __thr_poll (fds=0x7fffbfffde38, nfds=1, timeout=-1)
    at /usr/src/lib/libthr/thread/thr_syscalls.c:338
#2  0x000000020bfa0e32 in ?? () from /usr/local/lib/libxcb.so.1
#3  0x000000020bfa2ffb in xcb_wait_for_event () from /usr/local/lib/libxcb.so.1
#4  0x000000020f22f3e5 in ?? () from /usr/local/lib/qt5/libQt5XcbQpa.so.5
#5  0x0000000204457a2a in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#6  0x00000002041d8426 in thread_start (curthread=0x210c26000)
    at /usr/src/lib/libthr/thread/thr_create.c:291
#7  0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffbfffe000
warning: Unexpected size of section `.reg-xstate/100653' in core file.

Thread 2 (LWP 100653):
#0  _poll () at _poll.S:3
#1  0x00000002041daf46 in __thr_poll (fds=0x212b88a00, nfds=2, timeout=10)
    at /usr/src/lib/libthr/thread/thr_syscalls.c:338
#2  0x00000002087481d7 in ?? () from /usr/local/lib/libglib-2.0.so.0
#3  0x00000002087482e4 in g_main_context_iteration () from /usr/local/lib/libglib-2.0.so.0
#4  0x000000020466d806 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/local/lib/qt5/libQt5Core.so.5
#5  0x000000020f29e6e2 in ?? () from /usr/local/lib/qt5/libQt5XcbQpa.so.5
#6  0x0000000204616a8e in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/local/lib/qt5/libQt5Core.so.5
#7  0x000000020461b66c in QCoreApplication::exec() () from /usr/local/lib/qt5/libQt5Core.so.5
#8  0x000000020095e013 in octave::gui_application::execute() ()
   from /usr/local/lib/octave/4.4.1/liboctgui.so.4
#9  0x0000000000401d91 in ?? ()
#10 0x00000000004015e5 in ?? ()
#11 0x0000000200629000 in ?? ()
#12 0x0000000000000000 in ?? ()

Thread 1 (LWP 100950):
#0  0x0000000204657e4d in QVariant::QVariant(QVariant const&) () from /usr/local/lib/qt5/libQt5Core.so.5
#1  0x0000000211b85769 in ?? () from /usr/local/lib/qt5/plugins/sqldrivers/libqsqlite.so
#2  0x0000000211b80f42 in ?? () from /usr/local/lib/qt5/plugins/sqldrivers/libqsqlite.so
#3  0x00000002007dc941 in QSqlResult::execBatch(bool) () from /usr/local/lib/qt5/libQt5Sql.so.5
#4  0x00000002021bfe32 in ?? () from /usr/local/lib/qt5/libQt5Help.so.5
#5  0x00000002021c1ed2 in ?? () from /usr/local/lib/qt5/libQt5Help.so.5
#6  0x0000000204457a2a in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#7  0x00000002041d8426 in thread_start (curthread=0x211145c00)
    at /usr/src/lib/libthr/thread/thr_create.c:291
#8  0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffbf1f7000

John W. Eaton <jwe>
Project Administrator
Tue 14 Aug 2018 07:00:47 PM UTC, comment #2: 

But seriously, I can't reproduce the problem because for me, once the window appears on the screen, Octave's initialization seems to be complete.

Could you post the result of executing

thread apply all bt

in your gdb session to see what the other threads are doing at the time of the crash?

Also, on your system, how long is the delay between the window first appearing on the screen and the Octave prompt showing up in the command window?  Or the last bit of initialization of the other windows if the command prompt is not the last thing to appear?

John W. Eaton <jwe>
Project Administrator
Tue 14 Aug 2018 06:51:58 PM UTC, comment #1: 

It seems you may have found a Henny Youngman problem.

John W. Eaton <jwe>
Project Administrator
Mon 13 Aug 2018 06:40:56 PM UTC, original submission:  

On FreeBSD-12, amd64, system where I have installed octave 4.4.0 and 4.4.1 from FreeBSD ports collection, I see a seqfault
when starting 'octave --gui' from the command line.  The segfault is reproducible for me by trying to resize the windows as soon as it appears on screen.  AFAICT, this appears to be a race issue in the initialization of octave

%  octave --gui
octave exited with signal 11
% gdb81 /usr/local/libexec/octave/4.4.1/exec/\
  amd64-portbld-freebsd12.0/octave-gui octave-gui.core

(gdb) bt
#0  0x0000000204657e4d in QVariant::QVariant(QVariant const&) ()
   from /usr/local/lib/qt5/libQt5Core.so.5
#1  0x0000000211b85769 in ?? ()
   from /usr/local/lib/qt5/plugins/sqldrivers/libqsqlite.so
#2  0x0000000211b80f42 in ?? ()
   from /usr/local/lib/qt5/plugins/sqldrivers/libqsqlite.so
#3  0x00000002007dc941 in QSqlResult::execBatch(bool) ()
   from /usr/local/lib/qt5/libQt5Sql.so.5
#4  0x00000002021bfe32 in ?? () from /usr/local/lib/qt5/libQt5Help.so.5
#5  0x00000002021c1ed2 in ?? () from /usr/local/lib/qt5/libQt5Help.so.5
#6  0x0000000204457a2a in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#7  0x00000002041d8426 in thread_start (curthread=0x211145c00)
    at /usr/src/lib/libthr/thread/thr_create.c:291
#8  0x0000000000000000 in ?? ()

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by sebald (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-10 rik5 Open/ClosedOpen => Closed
    2018-08-14 jwe StatusNone => Need Info

    Back to the top


    Powered by Savane 3.5