bugGNU Octave - Bugs: bug #60420, Connect unused SIGNAL/SLOTS in...

 
 

bug #60420: Connect unused SIGNAL/SLOTS in octave-qobject.cc??

Submitter:  Rik <rik5>
Submitted:  Mon 19 Apr 2021 08:48:48 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  3 - Low Item Group:  Regression
Status:  In Progress Assigned to:  jwe
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 30 Apr 2021 04:43:13 AM UTC, comment #17: 

Thanks for doing that.  I think things will be more reliable once we have all the connections made with objects/function pointer pairs.  At least then missing functions or type mismatches should be compile time errors.

John W. Eaton <jwe>
Group administrator
Fri 30 Apr 2021 03:58:55 AM UTC, comment #16: 

I went through the one remaining file with SIGNAL/SLOTS and verified which were necessary.  The only one was this


    QTimer::singleShot (0, m_interpreter_qobj, SLOT (execute (void)));


I got rid of the other instances of SIGNAL/SLOT in this file by reverting to the code jwe had written.  See cset http://hg.savannah.gnu.org/hgweb/octave/rev/c7206af46897.

Rik <rik5>
Group administrator
Thu 29 Apr 2021 04:27:02 AM UTC, comment #15: 

If possible, I would like to have all the signal/slot connections made with function pointers instead of the SIGNAL/SLOT macros but for now it is fine if they are not all done that way.  It would be helpful to know exactly which one of the changes in the signal/slot connections caused the trouble.

John W. Eaton <jwe>
Group administrator
Wed 28 Apr 2021 10:04:57 PM UTC, comment #14: 

@jwe: Okay to close this report?  Do you need to connect any unused SIGNAL/SLOTS in octave-qobject.cc or were these changesets enough?


changeset:   29549:cf02394695b3
user:        John W. Eaton <jwe@octave.org>
date:        Wed Apr 21 13:23:16 2021 -0400
summary:     * octave-qobject.cc: Minor style fixes.

changeset:   29548:f6ad83cbe3c4
user:        John W. Eaton <jwe@octave.org>
date:        Wed Apr 21 12:00:32 2021 -0400
summary:     simplify interpreter shutdown in the GUI


Rik <rik5>
Group administrator
Thu 22 Apr 2021 03:53:54 PM UTC, comment #13: 

I am lowering the priority since I resolved the issue by backing out the changes to octave-qobject.cc.  Keeping the bug report open for a while in case another effort should be made to connect the signals/slots for that object.  Re-titling.

Rik <rik5>
Group administrator
Tue 20 Apr 2021 04:57:03 PM UTC, comment #12: 

Rather than one by one, I did a binary search through the changeset.  It was the changes to octave-qobject.cc that caused the hang.  This isn't my area of code, so I don't know why that should be so.  I reverted the changes to that one file in this cset http://hg.savannah.gnu.org/hgweb/octave/rev/4eeef8cdaa2c.

Attached is a diff file that has the changes that provoked the issue.

(file #51299)

Rik <rik5>
Group administrator
Tue 20 Apr 2021 05:05:27 AM UTC, comment #11: 

OK, I think now I got it right. I attached gdb to hanged process
after exit:


(gdb) thread apply all bt

Thread 9 (Thread 0x7f96c22c9700 (LWP 308915)):
#0  0x00007f9831aae5cc in sigtimedwait () at /lib64/libc.so.6
#1  0x00007f9831e4b6ac in sigwait () at /lib64/libpthread.so.0
#2  0x00007f983f6fb2bf in sigwait () at /lib64/libtsan.so.0
#3  0x00007f983b797382 in signal_watcher (arg=0x7f983e79e27c <octave::generic_sig_handler(int)>) at ../liboctave/wrappers/signal-wrappers.c:697
#4  0x00007f983f6e568e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#5  0x00007f9831e4114a in start_thread () at /lib64/libpthread.so.0
#6  0x00007f9831b72f23 in clone () at /lib64/libc.so.6

Thread 8 (Thread 0x7f96c300d700 (LWP 308914)):
#0  0x00007f9831b67ca1 in poll () at /lib64/libc.so.6
#1  0x00007f983f7098c1 in poll () at /lib64/libtsan.so.0
#2  0x00007f982db5c9b6 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007f982db5cae0 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#4  0x00007f983bf8518b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007f983bf3118b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f983bd8fd42 in QThread::exec() () at /lib64/libQt5Core.so.5
#7  0x00007f983bd91076 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#8  0x00007f983f6e568e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#9  0x00007f9831e4114a in start_thread () at /lib64/libpthread.so.0
#10 0x00007f9831b72f23 in clone () at /lib64/libc.so.6

Thread 7 (Thread 0x7f96c6806700 (LWP 308912)):
#0  0x00007f9831b67ca1 in poll () at /lib64/libc.so.6
#1  0x00007f983f7098c1 in poll () at /lib64/libtsan.so.0
#2  0x00007f982db5c9b6 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007f982db5cae0 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#4  0x00007f983bf8518b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007f983bf3118b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007f983bd8fd42 in QThread::exec() () at /lib64/libQt5Core.so.5
#7  0x00007f982087cee9 in QDBusConnectionManager::run() () at /lib64/libQt5DBus.so.5
#8  0x00007f983bd91076 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#9  0x00007f983f6e568e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#10 0x00007f9831e4114a in start_thread () at /lib64/libpthread.so.0
#11 0x00007f9831b72f23 in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7f96c9aff700 (LWP 308911)):
#0  0x00007f9831b67ca1 in poll () at /lib64/libc.so.6
#1  0x00007f983f7098c1 in poll () at /lib64/libtsan.so.0
#2  0x00007f982db5c9b6 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007f982db5cd72 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#4  0x00007f970ca9255a in gdbus_shared_thread_func () at /lib64/libgio-2.0.so.0
#5  0x00007f982db84d4a in g_thread_proxy () at /lib64/libglib-2.0.so.0
#6  0x00007f983f6e568e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#7  0x00007f9831e4114a in start_thread () at /lib64/libpthread.so.0
#8  0x00007f9831b72f23 in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7f96ca9b9700 (LWP 308910)):
--Type <RET> for more, q to quit, c to continue without paging--c
#0  0x00007f9831b67ca1 in poll () at /lib64/libc.so.6
#1  0x00007f983f7098c1 in poll () at /lib64/libtsan.so.0
#2  0x00007f982db5c9b6 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007f982db5cae0 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#4  0x00007f982db5cb31 in glib_worker_main () at /lib64/libglib-2.0.so.0
#5  0x00007f982db84d4a in g_thread_proxy () at /lib64/libglib-2.0.so.0
#6  0x00007f983f6e568e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#7  0x00007f9831e4114a in start_thread () at /lib64/libpthread.so.0
#8  0x00007f9831b72f23 in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7f97099f7700 (LWP 308909)):
#0  0x00007f9831b67ca1 in poll () at /lib64/libc.so.6
#1  0x00007f983f7098c1 in poll () at /lib64/libtsan.so.0
#2  0x00007f982db5c9b6 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007f982db5cae0 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#4  0x00007f9709e5be6d in dconf_gdbus_worker_thread () at /usr/lib64/gio/modules/libdconfsettings.so
#5  0x00007f982db84d4a in g_thread_proxy () at /lib64/libglib-2.0.so.0
#6  0x00007f983f6e568e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#7  0x00007f9831e4114a in start_thread () at /lib64/libpthread.so.0
#8  0x00007f9831b72f23 in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7f970f991700 (LWP 308908)):
#0  0x00007f9831b67ca1 in poll () at /lib64/libc.so.6
#1  0x00007f983f7098c1 in poll () at /lib64/libtsan.so.0
#2  0x00007f982bee66cf in _xcb_conn_wait () at /lib64/libxcb.so.1
#3  0x00007f982bee834a in xcb_wait_for_event () at /lib64/libxcb.so.1
#4  0x00007f9711e373d8 in QXcbEventQueue::run() () at /lib64/libQt5XcbQpa.so.5
#5  0x00007f983bd91076 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#6  0x00007f983f6e568e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#7  0x00007f9831e4114a in start_thread () at /lib64/libpthread.so.0
#8  0x00007f9831b72f23 in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f98206ff700 (LWP 308907)):
#0  0x00007f9831b3efc8 in nanosleep () at /lib64/libc.so.6
#1  0x00007f9831b6ad88 in usleep () at /lib64/libc.so.6
#2  0x00007f983f709f02 in usleep () at /lib64/libtsan.so.0
#3  0x00007f983f733410 in __tsan::BackgroundThread(void*) () at /lib64/libtsan.so.0
#4  0x00007f9831e4114a in start_thread () at /lib64/libpthread.so.0
#5  0x00007f9831b72f23 in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f9821abf800 (LWP 308777)):
#0  0x00007f9831b6d78d in syscall () at /lib64/libc.so.6
#1  0x00007f983bd91325 in QBasicMutex::lockInternal() () at /lib64/libQt5Core.so.5
#2  0x00007f983f070dba in QMutexLocker::QMutexLocker(QBasicMutex*) (this=0x7fffd1000408, m=0x7b280001ef88) at /usr/include/qt5/QtCore/qmutex.h:206
#3  0x00007f983f1cf0a5 in octave::qt_interpreter_events::confirm_shutdown_octave() (this=0x7b280001ef00) at ../libgui/src/qt-interpreter-events.cc:630
#4  0x00007f983f1d7a27 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (octave::qt_interpreter_events::*)()>::call(void (octave::qt_interpreter_events::*)(), octave::qt_interpreter_events*, void**) (f=(void (octave::qt_interpreter_events::*)(octave::qt_interpreter_events * const)) 0x7f983f1cf070 <octave::qt_interpreter_events::confirm_shutdown_octave()>, o=0x7b280001ef00, arg=0x7fffd10005c0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#5  0x00007f983f1d7285 in QtPrivate::FunctionPointer<void (octave::qt_interpreter_events::*)()>::call<QtPrivate::List<>, void>(void (octave::qt_interpreter_events::*)(), octave::qt_interpreter_events*, void**) (f=(void (octave::qt_interpreter_events::*)(octave::qt_interpreter_events * const)) 0x7f983f1cf070 <octave::qt_interpreter_events::confirm_shutdown_octave()>, o=0x7b280001ef00, arg=0x7fffd10005c0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#6  0x00007f983f1d6366 in QtPrivate::QSlotObject<void (octave::qt_interpreter_events::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x7b0800044060, r=0x7b280001ef00, a=0x7fffd10005c0, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:414
#7  0x00007f983bf5b69b in QMetaObject::activate(QObject*, int, int, void**) () at /lib64/libQt5Core.so.5
#8  0x00007f983f2bcd7a in octave::qt_interpreter_events::confirm_shutdown_signal() (this=0x7b280001ef00) at libgui/src/moc-qt-interpreter-events.cc:792
#9  0x00007f983f1ccce9 in octave::qt_interpreter_events::confirm_shutdown() (this=0x7b280001ef00) at ../libgui/src/qt-interpreter-events.cc:284
#10 0x00007f983e5ea4c5 in octave::event_manager::confirm_shutdown() (this=0x7b88000043b0) at ../libinterp/corefcn/event-manager.h:467
#11 0x00007f983e5e8421 in octave::interpreter::quit(int, bool, bool) (this=0x7b8800003000, exit_status=0, force=false, confirm=true) at ../libinterp/corefcn/interpreter.cc:2026
#12 0x00007f983e5dcc7f in Fquit(octave::interpreter&, octave_value_list const&, int) (interp=..., args=...) at ../libinterp/corefcn/interpreter.cc:232
#13 0x00007f983dedd374 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7b440008dcc0, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-builtin.cc:65
#14 0x00007f983df5bf30 in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7b440008dcc0, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-fcn.cc:57
#15 0x00007f983e1a0895 in octave::tree_identifier::evaluate_n(octave::tree_evaluator&, int) (this=0x7b0c00077c10, tw=..., nargout=0) at ../libinterp/parse-tree/pt-id.cc:130
#16 0x00007f983e1a11f2 in octave::tree_identifier::evaluate(octave::tree_evaluator&, int) (this=0x7b0c00077c10, tw=..., nargout=0) at ../libinterp/parse-tree/pt-id.h:98
#17 0x00007f983e173fdb in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7b8800003dd8, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3629
#18 0x00007f983e1b6830 in octave::tree_statement::accept(octave::tree_walker&) (this=0x7b0c000901b0, tw=...) at ../libinterp/parse-tree/pt-stmt.h:124
#19 0x00007f983e17453e in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7b8800003dd8, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3714
#20 0x00007f983de71284 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7b0c00072e40, tw=...) at ../libinterp/parse-tree/pt-stmt.h:201
#21 0x00007f983e167d56 in octave::tree_evaluator::eval(std::shared_ptr<octave::tree_statement_list>&, bool) (this=0x7b8800003dd8, stmt_list=std::shared_ptr<octave::tree_statement_list> (use count 2, weak count 0) = {...}, interactive=true) at ../libinterp/parse-tree/pt-eval.cc:882
#22 0x00007f983e1671e4 in octave::tree_evaluator::repl() (this=0x7b8800003dd8) at ../libinterp/parse-tree/pt-eval.cc:709
#23 0x00007f983e5e5aa3 in octave::interpreter::main_loop() (this=0x7b8800003000) at ../libinterp/corefcn/interpreter.cc:1385
#24 0x00007f983e5e014a in octave::interpreter::execute() (this=0x7b8800003000) at ../libinterp/corefcn/interpreter.cc:979
#25 0x00007f983f11854b in octave::interpreter_qobject::execute() (this=0x7b0800044100) at ../libgui/src/interpreter-qobject.cc:91
#26 0x00007f983f1cac41 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (octave::interpreter_qobject::*)()>::call(void (octave::interpreter_qobject::*)(), octave::interpreter_qobject*, void**) (f=(void (octave::interpreter_qobject::*)(octave::interpreter_qobject * const)) 0x7f983f1181dc <octave::interpreter_qobject::execute()>, o=0x7b0800044100, arg=0x7fffd10014a0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#27 0x00007f983f1cab93 in QtPrivate::FunctionPointer<void (octave::interpreter_qobject::*)()>::call<QtPrivate::List<>, void>(void (octave::interpreter_qobject::*)(), octave::interpreter_qobject*, void**) (f=(void (octave::interpreter_qobject::*)(octave::interpreter_qobject * const)) 0x7f983f1181dc <octave::interpreter_qobject::execute()>, o=0x7b0800044100, arg=0x7fffd10014a0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#28 0x00007f983f1ca586 in QtPrivate::QSlotObject<void (octave::interpreter_qobject::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x7b08000a38c0, r=0x7b0800044100, a=0x7fffd10014a0, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:414
#29 0x00007f983bf672da in QSingleShotTimer::timerEvent(QTimerEvent*) () at /lib64/libQt5Core.so.5
#30 0x00007f983bf5c22b in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#31 0x00007f983c87c5f5 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#32 0x00007f983c883b10 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#33 0x00007f983f1c4edf in octave::octave_qapplication::notify(QObject*, QEvent*) (this=0x7b0400002850, receiver=0x7b0c0005ddb0, ev=0x7fffd1001890) at ../libgui/src/octave-qobject.cc:133
#34 0x00007f983bf32326 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#35 0x00007f983bf84444 in QTimerInfoList::activateTimers() () at /lib64/libQt5Core.so.5
#36 0x00007f983bf84cec in timerSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5Core.so.5
#37 0x00007f982db5c67d in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#38 0x00007f982db5ca48 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#39 0x00007f982db5cae0 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#40 0x00007f983bf8518b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#41 0x00007f983bf3118b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#42 0x00007f983bf391a6 in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#43 0x00007f983f1c66f9 in octave::base_qobject::exec() (this=0x7fffd1001ba0) at ../libgui/src/octave-qobject.cc:343
#44 0x00007f983f1d9223 in octave::qt_application::execute() (this=0x7fffd1001d20) at ../libgui/src/qt-application.cc:73
#45 0x0000000000401b93 in main(int, char**) (argc=8, argv=0x7fffd1002058) at ../src/main-gui.cc:131
(gdb)


Dmitri A. Sergatskov <dasergatskov>
Tue 20 Apr 2021 04:55:40 AM UTC, comment #10: 

I am not sure I did that correctly -- I cannot gdb prompt until I kill octave process (with sig 15):


octave:1> exit

Thread 1 "lt-octave-gui" received signal SIGTERM, Terminated.
0x00007fffe91bc78d in syscall () from /lib64/libc.so.6
Missing separate debuginfos, use: yum debuginfo-install GConf2-3.2.6-22.el8.x86_64 dbus-glib-0.110-2.el8.x86_64
(gdb) thread apply all bt

Thread 9 (Thread 0x7ffe799db700 (LWP 308259)):
#0  0x00007fffe90fd5cc in sigtimedwait () at /lib64/libc.so.6
#1  0x00007fffe949a6ac in sigwait () at /lib64/libpthread.so.0
#2  0x00007ffff6d4a2bf in sigwait () at /lib64/libtsan.so.0
#3  0x00007ffff2de6382 in signal_watcher (arg=
    0x7ffff5ded27c <octave::generic_sig_handler(int)>)
    at ../liboctave/wrappers/signal-wrappers.c:697
#4  0x00007ffff6d3468e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#5  0x00007fffe949014a in start_thread () at /lib64/libpthread.so.0
#6  0x00007fffe91c1f23 in clone () at /lib64/libc.so.6

Thread 8 (Thread 0x7ffe7a71f700 (LWP 308258)):
#0  0x00007fffe91b6ca1 in poll () at /lib64/libc.so.6
#1  0x00007ffff6d588c1 in poll () at /lib64/libtsan.so.0
#2  0x00007fffe51ab9b6 in g_main_context_iterate.isra ()
    at /lib64/libglib-2.0.so.0
#3  0x00007fffe51abae0 in g_main_context_iteration ()
    at /lib64/libglib-2.0.so.0
#4  0x00007ffff35d418b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007ffff358018b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
--Type <RET> for more, q to quit, c to continue without paging--
#6  0x00007ffff33ded42 in QThread::exec() () at /lib64/libQt5Core.so.5
#7  0x00007ffff33e0076 in QThreadPrivate::start(void*) ()
    at /lib64/libQt5Core.so.5
#8  0x00007ffff6d3468e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#9  0x00007fffe949014a in start_thread () at /lib64/libpthread.so.0
#10 0x00007fffe91c1f23 in clone () at /lib64/libc.so.6

Thread 7 (Thread 0x7ffe7e206700 (LWP 308256)):
#0  0x00007fffe91b6ca1 in poll () at /lib64/libc.so.6
#1  0x00007ffff6d588c1 in poll () at /lib64/libtsan.so.0
#2  0x00007fffe51ab9b6 in g_main_context_iterate.isra ()
    at /lib64/libglib-2.0.so.0
#3  0x00007fffe51abae0 in g_main_context_iteration ()
    at /lib64/libglib-2.0.so.0
#4  0x00007ffff35d418b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#5  0x00007ffff358018b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#6  0x00007ffff33ded42 in QThread::exec() () at /lib64/libQt5Core.so.5
#7  0x00007fffd7e7cee9 in QDBusConnectionManager::run() ()
    at /lib64/libQt5DBus.so.5
#8  0x00007ffff33e0076 in QThreadPrivate::start(void*) ()
    at /lib64/libQt5Core.so.5
--Type <RET> for more, q to quit, c to continue without paging--c
#9  0x00007ffff6d3468e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#10 0x00007fffe949014a in start_thread () at /lib64/libpthread.so.0
#11 0x00007fffe91c1f23 in clone () at /lib64/libc.so.6

Thread 6 (Thread 0x7ffe810ff700 (LWP 308255)):
#0  0x00007fffe91b6ca1 in poll () at /lib64/libc.so.6
#1  0x00007ffff6d588c1 in poll () at /lib64/libtsan.so.0
#2  0x00007fffe51ab9b6 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007fffe51abd72 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#4  0x00007ffec409255a in gdbus_shared_thread_func () at /lib64/libgio-2.0.so.0
#5  0x00007fffe51d3d4a in g_thread_proxy () at /lib64/libglib-2.0.so.0
#6  0x00007ffff6d3468e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#7  0x00007fffe949014a in start_thread () at /lib64/libpthread.so.0
#8  0x00007fffe91c1f23 in clone () at /lib64/libc.so.6

Thread 5 (Thread 0x7ffe81fc2700 (LWP 308254)):
#0  0x00007fffe91b6ca1 in poll () at /lib64/libc.so.6
#1  0x00007ffff6d588c1 in poll () at /lib64/libtsan.so.0
#2  0x00007fffe51ab9b6 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007fffe51abae0 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#4  0x00007fffe51abb31 in glib_worker_main () at /lib64/libglib-2.0.so.0
#5  0x00007fffe51d3d4a in g_thread_proxy () at /lib64/libglib-2.0.so.0
#6  0x00007ffff6d3468e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#7  0x00007fffe949014a in start_thread () at /lib64/libpthread.so.0
#8  0x00007fffe91c1f23 in clone () at /lib64/libc.so.6

Thread 4 (Thread 0x7ffec0ff7700 (LWP 308252)):
#0  0x00007fffe91b6ca1 in poll () at /lib64/libc.so.6
#1  0x00007ffff6d588c1 in poll () at /lib64/libtsan.so.0
#2  0x00007fffe51ab9b6 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#3  0x00007fffe51abae0 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#4  0x00007ffec145be6d in dconf_gdbus_worker_thread () at /usr/lib64/gio/modules/libdconfsettings.so
#5  0x00007fffe51d3d4a in g_thread_proxy () at /lib64/libglib-2.0.so.0
#6  0x00007ffff6d3468e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#7  0x00007fffe949014a in start_thread () at /lib64/libpthread.so.0
#8  0x00007fffe91c1f23 in clone () at /lib64/libc.so.6

Thread 3 (Thread 0x7ffec6f91700 (LWP 308251)):
#0  0x00007fffe91b6ca1 in poll () at /lib64/libc.so.6
#1  0x00007ffff6d588c1 in poll () at /lib64/libtsan.so.0
#2  0x00007fffe35356cf in _xcb_conn_wait () at /lib64/libxcb.so.1
#3  0x00007fffe353734a in xcb_wait_for_event () at /lib64/libxcb.so.1
#4  0x00007ffec94373d8 in QXcbEventQueue::run() () at /lib64/libQt5XcbQpa.so.5
#5  0x00007ffff33e0076 in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#6  0x00007ffff6d3468e in __tsan_thread_start_func () at /lib64/libtsan.so.0
#7  0x00007fffe949014a in start_thread () at /lib64/libpthread.so.0
#8  0x00007fffe91c1f23 in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7fffd7cff700 (LWP 308250)):
#0  0x00007fffe918dfc8 in nanosleep () at /lib64/libc.so.6
#1  0x00007fffe91b9d88 in usleep () at /lib64/libc.so.6
#2  0x00007ffff6d58f02 in usleep () at /lib64/libtsan.so.0
#3  0x00007ffff6d82410 in __tsan::BackgroundThread(void*) () at /lib64/libtsan.so.0
#4  0x00007fffe949014a in start_thread () at /lib64/libpthread.so.0
#5  0x00007fffe91c1f23 in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7fffd910e800 (LWP 308240)):
#0  0x00007fffe91bc78d in syscall () at /lib64/libc.so.6
#1  0x00007ffff33e0325 in QBasicMutex::lockInternal() () at /lib64/libQt5Core.so.5
#2  0x00007ffff66bfdba in QMutexLocker::QMutexLocker(QBasicMutex*) (this=0x7fffffffc0d8, m=0x7b280001ef88) at /usr/include/qt5/QtCore/qmutex.h:206
#3  0x00007ffff681e0a5 in octave::qt_interpreter_events::confirm_shutdown_octave() (this=0x7b280001ef00) at ../libgui/src/qt-interpreter-events.cc:630
#4  0x00007ffff6826a27 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (octave::qt_interpreter_events::*)()>::call(void (octave::qt_interpreter_events::*)(), octave::qt_interpreter_events*, void**) (f=(void (octave::qt_interpreter_events::*)(octave::qt_interpreter_events * const)) 0x7ffff681e070 <octave::qt_interpreter_events::confirm_shutdown_octave()>, o=0x7b280001ef00, arg=0x7fffffffc290) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#5  0x00007ffff6826285 in QtPrivate::FunctionPointer<void (octave::qt_interpreter_events::*)()>::call<QtPrivate::List<>, void>(void (octave::qt_interpreter_events::*)(), octave::qt_interpreter_events*, void**) (f=(void (octave::qt_interpreter_events::*)(octave::qt_interpreter_events * const)) 0x7ffff681e070 <octave::qt_interpreter_events::confirm_shutdown_octave()>, o=0x7b280001ef00, arg=0x7fffffffc290) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#6  0x00007ffff6825366 in QtPrivate::QSlotObject<void (octave::qt_interpreter_events::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x7b0800044020, r=0x7b280001ef00, a=0x7fffffffc290, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:414
#7  0x00007ffff35aa69b in QMetaObject::activate(QObject*, int, int, void**) () at /lib64/libQt5Core.so.5
#8  0x00007ffff690bd7a in octave::qt_interpreter_events::confirm_shutdown_signal() (this=0x7b280001ef00) at libgui/src/moc-qt-interpreter-events.cc:792
#9  0x00007ffff681bce9 in octave::qt_interpreter_events::confirm_shutdown() (this=0x7b280001ef00) at ../libgui/src/qt-interpreter-events.cc:284
#10 0x00007ffff5c394c5 in octave::event_manager::confirm_shutdown() (this=0x7b88000043b0) at ../libinterp/corefcn/event-manager.h:467
#11 0x00007ffff5c37421 in octave::interpreter::quit(int, bool, bool) (this=0x7b8800003000, exit_status=0, force=false, confirm=true) at ../libinterp/corefcn/interpreter.cc:2026
#12 0x00007ffff5c2bc7f in Fquit(octave::interpreter&, octave_value_list const&, int) (interp=..., args=...) at ../libinterp/corefcn/interpreter.cc:232
#13 0x00007ffff552c374 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7b440008db80, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-builtin.cc:65
#14 0x00007ffff55aaf30 in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) (this=0x7b440008db80, tw=..., nargout=0, args=...) at ../libinterp/octave-value/ov-fcn.cc:57
#15 0x00007ffff57ef895 in octave::tree_identifier::evaluate_n(octave::tree_evaluator&, int) (this=0x7b0c0007c410, tw=..., nargout=0) at ../libinterp/parse-tree/pt-id.cc:130
#16 0x00007ffff57f01f2 in octave::tree_identifier::evaluate(octave::tree_evaluator&, int) (this=0x7b0c0007c410, tw=..., nargout=0) at ../libinterp/parse-tree/pt-id.h:98
#17 0x00007ffff57c2fdb in octave::tree_evaluator::visit_statement(octave::tree_statement&) (this=0x7b8800003dd8, stmt=...) at ../libinterp/parse-tree/pt-eval.cc:3629
#18 0x00007ffff5805830 in octave::tree_statement::accept(octave::tree_walker&) (this=0x7b0c0007c470, tw=...) at ../libinterp/parse-tree/pt-stmt.h:124
#19 0x00007ffff57c353e in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) (this=0x7b8800003dd8, lst=...) at ../libinterp/parse-tree/pt-eval.cc:3714
#20 0x00007ffff54c0284 in octave::tree_statement_list::accept(octave::tree_walker&) (this=0x7b0c0007b360, tw=...) at ../libinterp/parse-tree/pt-stmt.h:201
#21 0x00007ffff57b6d56 in octave::tree_evaluator::eval(std::shared_ptr<octave::tree_statement_list>&, bool) (this=0x7b8800003dd8, stmt_list=std::shared_ptr<octave::tree_statement_list> (use count 2, weak count 0) = {...}, interactive=true) at ../libinterp/parse-tree/pt-eval.cc:882
#22 0x00007ffff57b61e4 in octave::tree_evaluator::repl() (this=0x7b8800003dd8) at ../libinterp/parse-tree/pt-eval.cc:709
#23 0x00007ffff5c34aa3 in octave::interpreter::main_loop() (this=0x7b8800003000) at ../libinterp/corefcn/interpreter.cc:1385
#24 0x00007ffff5c2f14a in octave::interpreter::execute() (this=0x7b8800003000) at ../libinterp/corefcn/interpreter.cc:979
#25 0x00007ffff676754b in octave::interpreter_qobject::execute() (this=0x7b08000440c0) at ../libgui/src/interpreter-qobject.cc:91
#26 0x00007ffff6819c41 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (octave::interpreter_qobject::*)()>::call(void (octave::interpreter_qobject::*)(), octave::interpreter_qobject*, void**) (f=(void (octave::interpreter_qobject::*)(octave::interpreter_qobject * const)) 0x7ffff67671dc <octave::interpreter_qobject::execute()>, o=0x7b08000440c0, arg=0x7fffffffd170) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
#27 0x00007ffff6819b93 in QtPrivate::FunctionPointer<void (octave::interpreter_qobject::*)()>::call<QtPrivate::List<>, void>(void (octave::interpreter_qobject::*)(), octave::interpreter_qobject*, void**) (f=(void (octave::interpreter_qobject::*)(octave::interpreter_qobject * const)) 0x7ffff67671dc <octave::interpreter_qobject::execute()>, o=0x7b08000440c0, arg=0x7fffffffd170) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:185
#28 0x00007ffff6819586 in QtPrivate::QSlotObject<void (octave::interpreter_qobject::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x7b08000a3880, r=0x7b08000440c0, a=0x7fffffffd170, ret=0x0) at /usr/include/qt5/QtCore/qobjectdefs_impl.h:414
#29 0x00007ffff35b62da in QSingleShotTimer::timerEvent(QTimerEvent*) () at /lib64/libQt5Core.so.5
#30 0x00007ffff35ab22b in QObject::event(QEvent*) () at /lib64/libQt5Core.so.5
#31 0x00007ffff3ecb5f5 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#32 0x00007ffff3ed2b10 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQt5Widgets.so.5
#33 0x00007ffff6813edf in octave::octave_qapplication::notify(QObject*, QEvent*) (this=0x7b0400002850, receiver=0x7b0c0006df20, ev=0x7fffffffd560) at ../libgui/src/octave-qobject.cc:133
#34 0x00007ffff3581326 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib64/libQt5Core.so.5
#35 0x00007ffff35d3444 in QTimerInfoList::activateTimers() () at /lib64/libQt5Core.so.5
#36 0x00007ffff35d3cec in timerSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQt5Core.so.5
#37 0x00007fffe51ab67d in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#38 0x00007fffe51aba48 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#39 0x00007fffe51abae0 in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#40 0x00007ffff35d418b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#41 0x00007ffff358018b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQt5Core.so.5
#42 0x00007ffff35881a6 in QCoreApplication::exec() () at /lib64/libQt5Core.so.5
#43 0x00007ffff68156f9 in octave::base_qobject::exec() (this=0x7fffffffd870) at ../libgui/src/octave-qobject.cc:343
#44 0x00007ffff6828223 in octave::qt_application::execute() (this=0x7fffffffd9f0) at ../libgui/src/qt-application.cc:73
#45 0x0000000000401b93 in main(int, char**) (argc=1, argv=0x7fffffffdd28) at ../src/main-gui.cc:131
(gdb)


Dmitri A. Sergatskov <dasergatskov>
Tue 20 Apr 2021 02:01:01 AM UTC, comment #9: 

If nothing else works I can undo the big change and apply it in a series of smaller changesets (maybe one for each file that makes signal/slot connections?) so we can narrow the search for the change that causes the problem.

John W. Eaton <jwe>
Group administrator
Tue 20 Apr 2021 01:52:23 AM UTC, comment #8: 

Can you attach gdb to the octave process after it hangs and execute "thread apply all bt" at the (gdb) prompt so we might be able to see where it is stuck?

John W. Eaton <jwe>
Group administrator
Mon 19 Apr 2021 11:21:28 PM UTC, comment #7: 

ThreadSanitizer log is attached.

Dmitri.
--


(file #51290)

Dmitri A. Sergatskov <dasergatskov>
Mon 19 Apr 2021 11:18:26 PM UTC, comment #6: 

In my case it also hangs on plot().
I compiled it with ThreadSanitizer. it spills a lot of error during startup, but nothing at exit or plot. It just hangs.

Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Mon 19 Apr 2021 11:02:18 PM UTC, comment #5: 

That's what I saw as well.  Building the docs hung, and I had to suspend the 'make' command because Ctrl+C wouldn't kill it.  Then I had to kill -9 the 'make' job.  Since Octave was built by this time, I could use run-octave and that's where I found that I couldn't exit from the interpreter.

Rik <rik5>
Group administrator
Mon 19 Apr 2021 10:48:08 PM UTC, comment #4: 

There may be something. I just tried to build dev on CentOS 8
(Qt 5.12.5) and it hangs while building figs for docs.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 19 Apr 2021 10:30:50 PM UTC, comment #3: 

Hmm, everybody else seems to be running more recent versions of Qt.  It's utterly repeatable for me.

Rik <rik5>
Group administrator
Mon 19 Apr 2021 09:38:41 PM UTC, comment #2: 

Works fine for me on Fedora 34-beta with Qt 5.15.2

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Mon 19 Apr 2021 09:22:23 PM UTC, comment #1: 

I don't see this behavior.  I'm using Qt 5.15.2 on Debian.

John W. Eaton <jwe>
Group administrator
Mon 19 Apr 2021 08:48:48 PM UTC, original submission:  

After this changeset,


changeset:   29542:3d34b70b5a49
bookmark:    @
tag:         tip
user:        John W. Eaton <jwe@octave.org>
date:        Fri Apr 16 23:06:32 2021 -0400
summary:     connect many Qt signals and slots without SIGNAL and SLOT macros


starting and stopping the interpreter causes it to just hang.  Example code:


./run-octave -f
exit


This is with Kubuntu 18.04, Qt 5.9.5.

Rik <rik5>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #51299:  bug60420.patch added by rik5 (5KiB - text/x-patch)
file #51290:  threadsan.log added by dasergatskov (40KiB - text/x-log)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-22 rik5 Priority5 - Normal 3 - Low
        SummaryInterpreter hangs on exit after cset 29542 Connect unused SIGNAL/SLOTS in octave-qobject.cc??
    2021-04-20 rik5 Attached File- Added bug60420.patch, #51299
        StatusNone In Progress
    2021-04-19 dasergatskov Attached File- Added threadsan.log, #51290

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code