[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63752] experimental-terminal-widget crashes O
From: |
Dmitri A. Sergatskov |
Subject: |
[Octave-bug-tracker] [bug #63752] experimental-terminal-widget crashes Octave |
Date: |
Tue, 7 Mar 2023 16:48:58 -0500 (EST) |
Follow-up Comment #11, bug #63752 (project octave):
../configure --disable-docs --disable-jave CFLAGS="-ggdb3 -O0
-fsanitize=thread" CXXFLAGS="-ggdb3 -O0 -fsanitize=thread" FFLAGS="-ggdb3 -O0
-fsanitize=thread"
HG ID for this build is "129e5fc5372b"
$ TSAN_OPTIONS='ignore_noninstrumented_modules=1' ./run-octave -f --gui
GNU Octave, version 8.1.1
Copyright (C) 1993-2023 The Octave Project Developers.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'.
Octave was configured for "x86_64-pc-linux-gnu".
Additional information about Octave is available at https://www.octave.org.
Please contribute if you find this software useful.
For more information, visit https://www.octave.org/get-involved.html
Read https://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.
>> ==================
WARNING: ThreadSanitizer: data race (pid=123284)
Write of size 8 at 0x7f827d2e9598 by thread T7:
#0 SelfListener::recvData(char const*, int)
libgui/qterminal/libqterminal/unix/moc-SelfListener.cc:137
(liboctgui.so.9+0x146a44)
#1 SelfListener::run()
../libgui/qterminal/libqterminal/unix/SelfListener.cpp:32
(liboctgui.so.9+0x11e16f)
#2 QThreadPrivate::start(void*) <null> (libQt5Core.so.5+0xe9bf8)
Previous read of size 8 at 0x7f827d2e9598 by main thread:
[failed to restore the stack]
As if synchronized via sleep:
#0 nanosleep <null> (libtsan.so.0+0x67afc)
#1 qt_nanosleep(timespec) <null> (libQt5Core.so.5+0x2f8334)
#2 QThreadPrivate::start(void*) <null> (libQt5Core.so.5+0xe9bf8)
Location is stack of thread T7.
Thread T7 'SelfListener' (tid=123312, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x61748)
#1 QThread::start(QThread::Priority) <null> (libQt5Core.so.5+0xe969e)
#2 QUnixTerminalImpl::initialize()
../libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp:81
(liboctgui.so.9+0x102ab3)
#3 QUnixTerminalImpl::QUnixTerminalImpl(octave::base_qobject&, QWidget*)
../libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp:31
(liboctgui.so.9+0x102473)
#4 QTerminal::create(octave::base_qobject&, QWidget*)
../libgui/qterminal/libqterminal/QTerminal.cc:57 (liboctgui.so.9+0x1358a8)
#5 octave::terminal_dock_widget::terminal_dock_widget(QWidget*,
octave::base_qobject&) ../libgui/src/terminal-dock-widget.cc:81
(liboctgui.so.9+0x38bea8)
#6 octave::base_qobject::terminal_widget(octave::main_window*)
../libgui/src/octave-qobject.cc:461 (liboctgui.so.9+0x2fc626)
#7 octave::main_window::adopt_terminal_widget()
../libgui/src/main-window.cc:236 (liboctgui.so.9+0x2b39e5)
#8 octave::main_window::adopt_dock_widgets()
../libgui/src/main-window.cc:223 (liboctgui.so.9+0x2b38ee)
#9 octave::main_window::main_window(octave::base_qobject&)
../libgui/src/main-window.cc:166 (liboctgui.so.9+0x2b3090)
#10 octave::base_qobject::base_qobject(octave::qt_application&, bool)
../libgui/src/octave-qobject.cc:291 (liboctgui.so.9+0x2fb39b)
#11 octave::qt_application::execute() ../libgui/src/qt-application.cc:71
(liboctgui.so.9+0x31c49d)
#12 main ../src/main-gui.cc:148 (lt-octave-gui+0x403730)
SUMMARY: ThreadSanitizer: data race
libgui/qterminal/libqterminal/unix/moc-SelfListener.cc:137 in
SelfListener::recvData(char const*, int)
==================
==================
WARNING: ThreadSanitizer: data race (pid=123284)
Write of size 8 at 0x7b18000a2218 by main thread:
#0 std::deque<octave::action_container::elem*,
std::allocator<octave::action_container::elem*>
>::push_back(octave::action_container::elem* const&)
/usr/include/c++/11/bits/stl_deque.h:1503 (liboctinterp.so.11+0x98c262)
#1 std::queue<octave::action_container::elem*,
std::deque<octave::action_container::elem*,
std::allocator<octave::action_container::elem*> >
>::push(octave::action_container::elem* const&)
/usr/include/c++/11/bits/stl_queue.h:266 (liboctinterp.so.11+0xddbd6b)
#2 octave::event_queue::add_action(octave::action_container::elem*)
../libinterp/corefcn/event-queue.h:83 (liboctinterp.so.11+0xdd9e5d)
#3 void octave::action_container::add<std::_Bind<std::function<void
(octave::interpreter&)>
(std::reference_wrapper<octave::interpreter>)>>(std::_Bind<std::function<void
(octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&&)
../liboctave/util/action-container.h:148 (liboctinterp.so.11+0xddc37f)
#4 octave::event_manager::post_event(std::function<void
(octave::interpreter&)> const&) ../libinterp/corefcn/event-manager.cc:171
(liboctinterp.so.11+0xdd5e9b)
#5 octave::interpreter_qobject::interpreter_event(std::function<void
(octave::interpreter&)> const&) ../libgui/src/interpreter-qobject.cc:130
(liboctgui.so.9+0x2434e8)
#6 octave::base_qobject::interpreter_event(std::function<void
(octave::interpreter&)> const&) ../libgui/src/octave-qobject.cc:993
(liboctgui.so.9+0x2ff6ba)
#7 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>,
QtPrivate::List<std::function<void (octave::interpreter&)> const&>, void, void
(octave::base_qobject::*)(std::function<void (octave::interpreter&)>
const&)>::call(void (octave::base_qobject::*)(std::function<void
(octave::interpreter&)> const&), octave::base_qobject*, void**)
/usr/include/qt5/QtCore/qobjectdefs_impl.h:152 (liboctgui.so.9+0x2ea837)
#8 void QtPrivate::FunctionPointer<void
(octave::base_qobject::*)(std::function<void (octave::interpreter&)>
const&)>::call<QtPrivate::List<std::function<void (octave::interpreter&)>
const&>, void>(void (octave::base_qobject::*)(std::function<void
(octave::interpreter&)> const&), octave::base_qobject*, void**)
/usr/include/qt5/QtCore/qobjectdefs_impl.h:185 (liboctgui.so.9+0x2e8331)
#9 QtPrivate::QSlotObject<void
(octave::base_qobject::*)(std::function<void (octave::interpreter&)> const&),
QtPrivate::List<std::function<void (octave::interpreter&)> const&>,
void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
/usr/include/qt5/QtCore/qobjectdefs_impl.h:418 (liboctgui.so.9+0x2e6bf1)
#10 void doActivate<false>(QObject*, int, void**) <null>
(libQt5Core.so.5+0x2daf48)
#11 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>,
QtPrivate::List<std::function<void (octave::interpreter&)> const&>, void, void
(octave::file_editor_interface::*)(std::function<void (octave::interpreter&)>
const&)>::call(void (octave::file_editor_interface::*)(std::function<void
(octave::interpreter&)> const&), octave::file_editor_interface*, void**)
<null> (liboctgui.so.9+0x299f5c)
#12 void QtPrivate::FunctionPointer<void
(octave::file_editor_interface::*)(std::function<void (octave::interpreter&)>
const&)>::call<QtPrivate::List<std::function<void (octave::interpreter&)>
const&>, void>(void (octave::file_editor_interface::*)(std::function<void
(octave::interpreter&)> const&), octave::file_editor_interface*, void**)
<null> (liboctgui.so.9+0x297350)
#13 QtPrivate::QSlotObject<void
(octave::file_editor_interface::*)(std::function<void (octave::interpreter&)>
const&), QtPrivate::List<std::function<void (octave::interpreter&)> const&>,
void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) <null>
(liboctgui.so.9+0x295309)
#14 void doActivate<false>(QObject*, int, void**) <null>
(libQt5Core.so.5+0x2daf48)
#15 octave::file_editor_tab::update_breakpoints()
../libgui/src/m-editor/file-editor-tab.cc:2063 (liboctgui.so.9+0x251a14)
#16 octave::file_editor::request_open_file(QString const&, QString const&,
int, bool, bool, bool, QString const&, int, QString const&)
../libgui/src/m-editor/file-editor.cc:1758 (liboctgui.so.9+0x278887)
#17 octave::file_editor::restore_session(octave::gui_settings*)
../libgui/src/m-editor/file-editor.cc:374 (liboctgui.so.9+0x270eec)
#18 octave::main_window::handle_octave_ready()
../libgui/src/main-window.cc:1805 (liboctgui.so.9+0x2bdc13)
#19 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>,
void, void (octave::main_window::*)()>::call(void (octave::main_window::*)(),
octave::main_window*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:152
(liboctgui.so.9+0x2e9028)
#20 void QtPrivate::FunctionPointer<void
(octave::main_window::*)()>::call<QtPrivate::List<>, void>(void
(octave::main_window::*)(), octave::main_window*, void**)
/usr/include/qt5/QtCore/qobjectdefs_impl.h:185 (liboctgui.so.9+0x2e772d)
#21 QtPrivate::QSlotObject<void (octave::main_window::*)(),
QtPrivate::List<>,void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*,
void**, bool*) /usr/include/qt5/QtCore/qobjectdefs_impl.h:418
(liboctgui.so.9+0x2e50f3)
#22 QObject::event(QEvent*) <null> (libQt5Core.so.5+0x2d1a98)
#23 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null>
(libQt5Core.so.5+0x2a7357)
#24 octave::qt_application::execute() ../libgui/src/qt-application.cc:73
(liboctgui.so.9+0x31c4ac)
#25 main ../src/main-gui.cc:148 (lt-octave-gui+0x403730)
Previous read of size 8 at 0x7b18000a2218 by thread T14:
#0 std::operator-(std::_Deque_iterator<octave::action_container::elem*,
octave::action_container::elem*&, octave::action_container::elem**> const&,
std::_Deque_iterator<octave::action_container::elem*,
octave::action_container::elem*&, octave::action_container::elem**> const&)
/usr/include/c++/11/bits/stl_deque.h:357 (liboctinterp.so.11+0x98d903)
#1 std::deque<octave::action_container::elem*,
std::allocator<octave::action_container::elem*> >::size() const
/usr/include/c++/11/bits/stl_deque.h:1234 (liboctinterp.so.11+0x98c1a3)
#2 std::queue<octave::action_container::elem*,
std::deque<octave::action_container::elem*,
std::allocator<octave::action_container::elem*> > >::size() const
/usr/include/c++/11/bits/stl_queue.h:209 (liboctinterp.so.11+0xddbd28)
#3 octave::event_queue::size() const ../libinterp/corefcn/event-queue.h:77
(liboctinterp.so.11+0xdd9e16)
#4 octave::action_container::run()
../liboctave/util/action-container.h:202 (liboctinterp.so.11+0x989027)
#5 octave::event_manager::process_events(bool)
../libinterp/corefcn/event-manager.cc:120 (liboctinterp.so.11+0xdd5b23)
#6 readline_event_hook ../libinterp/corefcn/event-manager.cc:53
(liboctinterp.so.11+0xdd562c)
#7 octave::command_editor::event_handler()
../liboctave/util/cmd-edit.cc:1174 (liboctave.so.10+0xe4d932)
#8 rl_read_key <null> (libreadline.so.8+0x38bfe)
#9 octave::gnu_readline::do_readline(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool&)
../liboctave/util/cmd-edit.cc:287 (liboctave.so.10+0xe4af2d)
#10 octave::command_editor::readline(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool&)
../liboctave/util/cmd-edit.cc:1205 (liboctave.so.10+0xe4db83)
#11 octave::input_system::gnu_readline(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool&) const
../libinterp/corefcn/input.cc:789 (liboctinterp.so.11+0x1089da1)
#12
octave::input_system::interactive_input(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool&)
../libinterp/corefcn/input.cc:683 (liboctinterp.so.11+0x1089328)
#13 octave::base_reader::octave_gets(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool&)
../libinterp/corefcn/input.cc:834 (liboctinterp.so.11+0x1089ff8)
#14 octave::terminal_reader::get_input(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool&)
../libinterp/corefcn/input.cc:993 (liboctinterp.so.11+0x108a5f8)
#15 octave::input_reader::get_input(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool&)
../libinterp/corefcn/input.h:279 (liboctinterp.so.11+0xb9a57e)
#16 octave::push_parser::run() ../libinterp/parse-tree/oct-parse.yy:5757
(liboctinterp.so.11+0xbc1b9d)
#17 octave::tree_evaluator::repl() ../libinterp/parse-tree/pt-eval.cc:793
(liboctinterp.so.11+0xc05ab1)
#18 octave::interpreter::main_loop()
../libinterp/corefcn/interpreter.cc:1350 (liboctinterp.so.11+0x109f689)
#19 octave::interpreter::execute() ../libinterp/corefcn/interpreter.cc:916
(liboctinterp.so.11+0x1099ae1)
#20 octave::interpreter_qobject::execute()
../libgui/src/interpreter-qobject.cc:89 (liboctgui.so.9+0x2432eb)
#21 octave::interpreter_qobject::qt_static_metacall(QObject*,
QMetaObject::Call, int, void**) libgui/src/moc-interpreter-qobject.cc:88
(liboctgui.so.9+0x3fb9e4)
#22 QObject::event(QEvent*) <null> (libQt5Core.so.5+0x2d1a98)
#23 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null>
(libQt5Core.so.5+0x2a7357)
Location is heap block of size 88 at 0x7b18000a21e0 allocated by thread
T14:
#0 operator new(unsigned long) <null> (libtsan.so.0+0x900b2)
#1 octave::event_manager::push_event_queue()
../libinterp/corefcn/event-manager.cc:138 (liboctinterp.so.11+0xdd5c64)
#2 octave::event_manager::event_manager(octave::interpreter&)
../libinterp/corefcn/event-manager.cc:73 (liboctinterp.so.11+0xdd580d)
#3 octave::interpreter::interpreter(octave::application*)
../libinterp/corefcn/interpreter.cc:477 (liboctinterp.so.11+0x1097cda)
#4 octave::application::create_interpreter() ../libinterp/octave.cc:348
(liboctinterp.so.11+0x4eb140)
#5 octave::interpreter_qobject::execute()
../libgui/src/interpreter-qobject.cc:51 (liboctgui.so.9+0x243003)
#6 octave::interpreter_qobject::qt_static_metacall(QObject*,
QMetaObject::Call, int, void**) libgui/src/moc-interpreter-qobject.cc:88
(liboctgui.so.9+0x3fb9e4)
#7 QObject::event(QEvent*) <null> (libQt5Core.so.5+0x2d1a98)
#8 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null>
(libQt5Core.so.5+0x2a7357)
Thread T14 'QThread' (tid=123355, running) created by main thread at:
#0 pthread_create <null> (libtsan.so.0+0x61748)
#1 QThread::start(QThread::Priority) <null> (libQt5Core.so.5+0xe969e)
#2 octave::base_qobject::base_qobject(octave::qt_application&, bool)
../libgui/src/octave-qobject.cc:326 (liboctgui.so.9+0x2fb77e)
#3 octave::qt_application::execute() ../libgui/src/qt-application.cc:71
(liboctgui.so.9+0x31c49d)
#4 main ../src/main-gui.cc:148 (lt-octave-gui+0x403730)
SUMMARY: ThreadSanitizer: data race /usr/include/c++/11/bits/stl_deque.h:1503
in std::deque<octave::action_container::elem*,
std::allocator<octave::action_container::elem*>
>::push_back(octave::action_container::elem* const&)
==================
>>ver
----------------------------------------------------------------------
GNU Octave Version: 8.1.1 (hg id: 129e5fc5372b)
GNU Octave License: GNU General Public License
Operating System: Linux 5.14.0-283.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Feb
23 22:23:05 UTC 2023 x86_64
----------------------------------------------------------------------
no packages installed.
No crash but those warnings shows up just on startup.
Dmitri.
--
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63752>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/