bugGNU Octave - Bugs: bug #63752, experimental-terminal-widget...

 
 

bug #63752: experimental-terminal-widget crashes Octave

Submitter:  Pantxo Diribarne <pantxo>
Submitted:  Fri 03 Feb 2023 08:40:28 PM UTC
   
 
Category:  GUI Severity:  5 - Blocker
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Need Info Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 8.0.90 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 04 Feb 2024 11:50:38 AM UTC, comment #19: 

@ttl: Yes I still observe the crash with the very same 4 character protocol on my older machine (the backtrace is still the same). At work, on a much more recent machine with Octave 8.4, I can run the experimental widget without issue...

Pantxo Diribarne <pantxo>
Group Member
Sat 03 Feb 2024 07:17:45 PM UTC, comment #18: 

Pantxo, do you still observe the crash after typing four characters into the experimental terminal widget?

Torsten Lilge <ttl>
Group Member
Sat 27 Jan 2024 08:18:03 PM UTC, comment #17: 

I confirm the crash and further confirm that the patch fixes it for me (for 9.0.1 hg25784f22ead3+)

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 27 Jan 2024 08:02:31 PM UTC, comment #16: 

I can not reproduce the crash in the OP but when closing Octave with the experimental widget, I get an fatal error (signal 6). Please find attached a patch that fixes the issue for me. As we are very close to the release candidate I do not want to push it directly without tests on other systems.



(file #55624)

Torsten Lilge <ttl>
Group Member
Sat 14 Oct 2023 01:25:27 PM UTC, comment #15: 

Going through bugs marked as Blocker. Is this bug present in Octave 9? Should it still be marked as a blocker?

Arun Giridhar <arungiridhar>
Group Member
Tue 07 Mar 2023 10:24:06 PM UTC, comment #14: 

Actually sombrero() brought some warnings:


==================
WARNING: ThreadSanitizer: data race (pid=201875)
  Write of size 8 at 0x7f1ec10e1f60 by thread T7:
    #0 std::__shared_ptr<octave::stack_frame, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<octave::stack_frame, (__gnu_cxx::_Lock_policy)2> const&) /usr/include/c++/11/bits/shared_ptr_base.h:1152 (liboctinterp.so.11+0xa2d231)
    #1 std::shared_ptr<octave::stack_frame>::shared_ptr(std::shared_ptr<octave::stack_frame> const&) /usr/include/c++/11/bits/shared_ptr.h:150 (liboctinterp.so.11+0xa2d28e)
    #2 octave::octave_lvalue::octave_lvalue(octave::symbol_record const&, std::shared_ptr<octave::stack_frame> const&) ../libinterp/parse-tree/oct-lvalue.h:45 (liboctinterp.so.11+0xc256af)
    #3 octave::tree_identifier::lvalue(octave::tree_evaluator&) ../libinterp/parse-tree/pt-id.cc:74 (liboctinterp.so.11+0xc249ba)
    #4 octave::tree_decl_elt::lvalue(octave::tree_evaluator&) ../libinterp/parse-tree/pt-decl.h:79 (liboctinterp.so.11+0xc05566)
    #5 octave::tree_evaluator::define_parameter_list_from_arg_vector(octave::tree_parameter_list*, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:2223 (liboctinterp.so.11+0xbf046d)
    #6 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3589 (liboctinterp.so.11+0xbf61b4)
    #7 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #8 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #9 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:427 (liboctinterp.so.11+0xc28263)
    #10 octave::tree_multi_assignment::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.cc:201 (liboctinterp.so.11+0xbd7f9f)
    #11 octave::tree_multi_assignment::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.h:156 (liboctinterp.so.11+0xbda381)
    #12 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #13 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #14 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #15 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #16 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3665 (liboctinterp.so.11+0xbf6714)
    #17 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #18 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #19 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:427 (liboctinterp.so.11+0xc28263)
    #20 octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108 (liboctinterp.so.11+0xc2be53)
    #21 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #22 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #23 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #24 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #25 octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3789 (liboctinterp.so.11+0xbf71a1)
    #26 octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:119 (liboctinterp.so.11+0xc05ae3)
    #27 octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3767 (liboctinterp.so.11+0xbf6f65)
    #28 octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:153 (liboctinterp.so.11+0xc389e1)
    #29 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3916 (liboctinterp.so.11+0xbf7a22)
    #30 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #31 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #32 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #33 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3665 (liboctinterp.so.11+0xbf6714)
    #34 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #35 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #36 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:427 (liboctinterp.so.11+0xc28263)
    #37 octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108 (liboctinterp.so.11+0xc2be53)
    #38 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #39 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #40 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #41 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #42 octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3789 (liboctinterp.so.11+0xbf71a1)
    #43 octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:119 (liboctinterp.so.11+0xc05ae3)
    #44 octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3767 (liboctinterp.so.11+0xbf6f65)
    #45 octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:153 (liboctinterp.so.11+0xc389e1)
    #46 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3916 (liboctinterp.so.11+0xbf7a22)
    #47 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #48 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #49 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #50 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3665 (liboctinterp.so.11+0xbf6714)
    #51 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #52 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #53 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:427 (liboctinterp.so.11+0xc28263)
    #54 octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108 (liboctinterp.so.11+0xc2be53)
    #55 octave::tree_simple_assignment::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.cc:101 (liboctinterp.so.11+0xbd74d9)
    #56 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #57 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #58 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #59 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #60 octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3789 (liboctinterp.so.11+0xbf71a1)
    #61 octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:119 (liboctinterp.so.11+0xc05ae3)
    #62 octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3767 (liboctinterp.so.11+0xbf6f65)
    #63 octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:153 (liboctinterp.so.11+0xc389e1)
    #64 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3916 (liboctinterp.so.11+0xbf7a22)
    #65 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #66 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #67 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #68 octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3789 (liboctinterp.so.11+0xbf71a1)
    #69 octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:119 (liboctinterp.so.11+0xc05ae3)
    #70 octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3767 (liboctinterp.so.11+0xbf6f65)
    #71 octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:153 (liboctinterp.so.11+0xc389e1)
    #72 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3916 (liboctinterp.so.11+0xbf7a22)
    #73 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #74 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #75 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #76 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3665 (liboctinterp.so.11+0xbf6714)
    #77 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #78 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #79 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:427 (liboctinterp.so.11+0xc28263)
    #80 octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108 (liboctinterp.so.11+0xc2be53)
    #81 octave::tree_simple_assignment::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.cc:101 (liboctinterp.so.11+0xbd74d9)
    #82 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #83 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #84 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #85 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #86 octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4286 (liboctinterp.so.11+0xbf9067)
    #87 octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151 (liboctinterp.so.11+0xc23a4b)
    #88 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3916 (liboctinterp.so.11+0xbf7a22)
    #89 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #90 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #91 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #92 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3665 (liboctinterp.so.11+0xbf6714)
    #93 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #94 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #95 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:427 (liboctinterp.so.11+0xc28263)
    #96 octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108 (liboctinterp.so.11+0xc2be53)
    #97 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #98 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #99 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #100 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #101 octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3789 (liboctinterp.so.11+0xbf71a1)
    #102 octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:119 (liboctinterp.so.11+0xc05ae3)
    #103 octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3767 (liboctinterp.so.11+0xbf6f65)
    #104 octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:153 (liboctinterp.so.11+0xc389e1)
    #105 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3916 (liboctinterp.so.11+0xbf7a22)
    #106 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #107 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #108 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #109 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3665 (liboctinterp.so.11+0xbf6714)
    #110 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #111 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #112 octave::tree_identifier::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-id.cc:130 (liboctinterp.so.11+0xc24e72)
    #113 octave::tree_identifier::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-id.h:98 (liboctinterp.so.11+0xc25957)
    #114 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #115 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #116 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #117 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #118 octave::tree_evaluator::eval(std::shared_ptr<octave::tree_statement_list>&, bool) ../libinterp/parse-tree/pt-eval.cc:985 (liboctinterp.so.11+0xbeaaef)
    #119 octave::tree_evaluator::parse_and_execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool&) ../libinterp/parse-tree/pt-eval.cc:617 (liboctinterp.so.11+0xbe919d)
    #120 octave::interpreter::parse_and_execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool&) ../libinterp/corefcn/interpreter.cc:835 (liboctinterp.so.11+0x107e872)
    #121 operator() ../libgui/src/command-widget.cc:153 (liboctgui.so.9+0x1e9e0c)
    #122 __invoke_impl<void, octave::command_widget::process_input_line(const QString&)::<lambda(octave::interpreter&)>&, octave::interpreter&> /usr/include/c++/11/bits/invoke.h:61 (liboctgui.so.9+0x1ebf23)
    #123 __invoke_r<void, octave::command_widget::process_input_line(const QString&)::<lambda(octave::interpreter&)>&, octave::interpreter&> /usr/include/c++/11/bits/invoke.h:111 (liboctgui.so.9+0x1ebbf1)
    #124 _M_invoke /usr/include/c++/11/bits/std_function.h:290 (liboctgui.so.9+0x1eb6c3)
    #125 std::function<void (octave::interpreter&)>::operator()(octave::interpreter&) const /usr/include/c++/11/bits/std_function.h:590 (liboctinterp.so.11+0xdc8bb8)
    #126 void std::__invoke_impl<void, std::function<void (octave::interpreter&)>&, octave::interpreter&>(std::__invoke_other, std::function<void (octave::interpreter&)>&, octave::interpreter&) /usr/include/c++/11/bits/invoke.h:61 (liboctinterp.so.11+0xdc8afa)
    #127 std::__invoke_result<std::function<void (octave::interpreter&)>&, octave::interpreter&>::type std::__invoke<std::function<void (octave::interpreter&)>&, octave::interpreter&>(std::function<void (octave::interpreter&)>&, octave::interpreter&) /usr/include/c++/11/bits/invoke.h:96 (liboctinterp.so.11+0xdc8a17)
    #128 void std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /usr/include/c++/11/functional:420 (liboctinterp.so.11+0xdc893c)
    #129 void std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>::operator()<, void>() /usr/include/c++/11/functional:503 (liboctinterp.so.11+0xdc88c6)
    #130 void std::__invoke_impl<void, std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&>(std::__invoke_other, std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&) /usr/include/c++/11/bits/invoke.h:61 (liboctinterp.so.11+0xdc8873)
    #131 std::__invoke_result<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&>::type std::__invoke<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&>(std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&) /usr/include/c++/11/bits/invoke.h:96 (liboctinterp.so.11+0xdc86c4)
    #132 void std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>::__call<void>(std::tuple<>&&, std::_Index_tuple<>) /usr/include/c++/11/functional:420 (liboctinterp.so.11+0xdc8594)
    #133 void std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>::operator()<, void>() /usr/include/c++/11/functional:503 (liboctinterp.so.11+0xdc82be)
    #134 void std::__invoke_impl<void, std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&>(std::__invoke_other, std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&) /usr/include/c++/11/bits/invoke.h:61 (liboctinterp.so.11+0xdc7c4d)
    #135 std::enable_if<is_invocable_r_v<void, std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&>, void>::type std::__invoke_r<void, std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&>(std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&) /usr/include/c++/11/bits/invoke.h:111 (liboctinterp.so.11+0xdc6ecd)
    #136 std::_Function_handler<void (), std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()> >::_M_invoke(std::_Any_data const&) /usr/include/c++/11/bits/std_function.h:290 (liboctinterp.so.11+0xdc577c)
    #137 std::function<void ()>::operator()() const /usr/include/c++/11/bits/std_function.h:590 (liboctinterp.so.11+0x94ac34)
    #138 octave::action_container::fcn_elem::run() ../liboctave/util/action-container.h:82 (liboctinterp.so.11+0xc029be)
    #139 octave::event_queue::run_first() ../libinterp/corefcn/event-queue.h:63 (liboctinterp.so.11+0xdbec80)
    #140 octave::action_container::run(unsigned long) ../liboctave/util/action-container.cc:42 (liboctave.so.10+0xe4ac04)
    #141 octave::action_container::run() ../liboctave/util/action-container.h:202 (liboctinterp.so.11+0x983919)
    #142 octave::event_manager::process_events(bool) ../libinterp/corefcn/event-manager.cc:120 (liboctinterp.so.11+0xdbaaa7)
    #143 readline_event_hook ../libinterp/corefcn/event-manager.cc:53 (liboctinterp.so.11+0xdba5b0)
    #144 octave::command_editor::event_handler() ../liboctave/util/cmd-edit.cc:1174 (liboctave.so.10+0xe4d932)
    #145 octave::command_editor::run_event_hooks() ../liboctave/util/cmd-edit.cc:1583 (liboctave.so.10+0xe5004b)
    #146 octave::tree_evaluator::server_loop() ../libinterp/parse-tree/pt-eval.cc:903 (liboctinterp.so.11+0xbea4e2)
    #147 octave::interpreter::server_loop() ../libinterp/corefcn/interpreter.cc:1355 (liboctinterp.so.11+0x10846f4)
    #148 octave::interpreter::execute() ../libinterp/corefcn/interpreter.cc:900 (liboctinterp.so.11+0x107eaa5)
    #149 octave::interpreter_qobject::execute() ../libgui/src/interpreter-qobject.cc:89 (liboctgui.so.9+0x2432eb)
    #150 octave::interpreter_qobject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) libgui/src/moc-interpreter-qobject.cc:88 (liboctgui.so.9+0x3fb9e4)
    #151 QObject::event(QEvent*) <null> (libQt5Core.so.5+0x2d1a98)
    #152 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null> (libQt5Core.so.5+0x2a7357)

  Previous read of size 8 at 0x7f1ec10e1f60 by main thread:
    #0 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<double>, void, void (octave::qt_graphics_toolkit::*)(double)>::call(void (octave::qt_graphics_toolkit::*)(double), octave::qt_graphics_toolkit*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:152 (liboctgui.so.9+0x1e23a4)
    #1 void QtPrivate::FunctionPointer<void (octave::qt_graphics_toolkit::*)(double)>::call<QtPrivate::List<double>, void>(void (octave::qt_graphics_toolkit::*)(double), octave::qt_graphics_toolkit*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:185 (liboctgui.so.9+0x1e22c4)
    #2 QtPrivate::QSlotObject<void (octave::qt_graphics_toolkit::*)(double), QtPrivate::List<double>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/qt5/QtCore/qobjectdefs_impl.h:418 (liboctgui.so.9+0x1e21fd)
    #3 QObject::event(QEvent*) <null> (libQt5Core.so.5+0x2d1a98)
    #4 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null> (libQt5Core.so.5+0x2a7357)
    #5 octave::qt_application::execute() ../libgui/src/qt-application.cc:73 (liboctgui.so.9+0x31c4ac)
    #6 main ../src/main-gui.cc:148 (lt-octave-gui+0x403730)

  Location is stack of thread T7.

  Thread T7 'QThread' (tid=202012, 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/shared_ptr_base.h:1152 in std::__shared_ptr<octave::stack_frame, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<octave::stack_frame, (__gnu_cxx::_Lock_policy)2> const&)
==================
==================
WARNING: ThreadSanitizer: data race (pid=201875)
  Write of size 8 at 0x7f1ec10e1d40 by thread T7:
    #0 Cell::index(octave_value_list const&, bool) const ../libinterp/corefcn/Cell.cc:196 (liboctinterp.so.11+0xc589a3)
    #1 octave_base_matrix<Cell>::do_index_op(octave_value_list const&, bool) ../libinterp/octave-value/ov-cell.cc:73 (liboctinterp.so.11+0x9b88d3)
    #2 octave_cell::subsref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::list<octave_value_list, std::allocator<octave_value_list> > const&, int) ../libinterp/octave-value/ov-cell.cc:171 (liboctinterp.so.11+0x9b9633)
    #3 octave_value::subsref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::list<octave_value_list, std::allocator<octave_value_list> > const&, int) ../libinterp/octave-value/ov.cc:1585 (liboctinterp.so.11+0xabc2ab)
    #4 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:611 (liboctinterp.so.11+0xc28c84)
    #5 octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108 (liboctinterp.so.11+0xc2be53)
    #6 octave::tree_evaluator::convert_to_const_vector(octave::tree_argument_list*) ../libinterp/parse-tree/pt-eval.cc:2307 (liboctinterp.so.11+0xbf0850)
    #7 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:407 (liboctinterp.so.11+0xc280e0)
    #8 octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108 (liboctinterp.so.11+0xc2be53)
    #9 octave::tree_simple_assignment::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.cc:101 (liboctinterp.so.11+0xbd74d9)
    #10 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #11 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #12 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #13 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #14 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3665 (liboctinterp.so.11+0xbf6714)
    #15 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #16 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #17 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:427 (liboctinterp.so.11+0xc28263)
    #18 octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108 (liboctinterp.so.11+0xc2be53)
    #19 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #20 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #21 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #22 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #23 octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3789 (liboctinterp.so.11+0xbf71a1)
    #24 octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:119 (liboctinterp.so.11+0xc05ae3)
    #25 octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3767 (liboctinterp.so.11+0xbf6f65)
    #26 octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:153 (liboctinterp.so.11+0xc389e1)
    #27 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3916 (liboctinterp.so.11+0xbf7a22)
    #28 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #29 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #30 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #31 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3665 (liboctinterp.so.11+0xbf6714)
    #32 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #33 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #34 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:427 (liboctinterp.so.11+0xc28263)
    #35 octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108 (liboctinterp.so.11+0xc2be53)
    #36 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #37 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #38 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #39 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #40 octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3789 (liboctinterp.so.11+0xbf71a1)
    #41 octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:119 (liboctinterp.so.11+0xc05ae3)
    #42 octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3767 (liboctinterp.so.11+0xbf6f65)
    #43 octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:153 (liboctinterp.so.11+0xc389e1)
    #44 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3916 (liboctinterp.so.11+0xbf7a22)
    #45 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #46 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #47 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #48 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3665 (liboctinterp.so.11+0xbf6714)
    #49 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #50 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #51 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:427 (liboctinterp.so.11+0xc28263)
    #52 octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108 (liboctinterp.so.11+0xc2be53)
    #53 octave::tree_simple_assignment::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.cc:101 (liboctinterp.so.11+0xbd74d9)
    #54 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #55 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #56 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #57 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #58 octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3789 (liboctinterp.so.11+0xbf71a1)
    #59 octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:119 (liboctinterp.so.11+0xc05ae3)
    #60 octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3767 (liboctinterp.so.11+0xbf6f65)
    #61 octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:153 (liboctinterp.so.11+0xc389e1)
    #62 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3916 (liboctinterp.so.11+0xbf7a22)
    #63 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #64 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #65 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #66 octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3789 (liboctinterp.so.11+0xbf71a1)
    #67 octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:119 (liboctinterp.so.11+0xc05ae3)
    #68 octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3767 (liboctinterp.so.11+0xbf6f65)
    #69 octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:153 (liboctinterp.so.11+0xc389e1)
    #70 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3916 (liboctinterp.so.11+0xbf7a22)
    #71 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #72 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #73 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #74 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3665 (liboctinterp.so.11+0xbf6714)
    #75 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #76 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #77 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:427 (liboctinterp.so.11+0xc28263)
    #78 octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108 (liboctinterp.so.11+0xc2be53)
    #79 octave::tree_simple_assignment::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.cc:101 (liboctinterp.so.11+0xbd74d9)
    #80 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #81 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #82 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #83 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #84 octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4286 (liboctinterp.so.11+0xbf9067)
    #85 octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151 (liboctinterp.so.11+0xc23a4b)
    #86 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3916 (liboctinterp.so.11+0xbf7a22)
    #87 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #88 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #89 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #90 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3665 (liboctinterp.so.11+0xbf6714)
    #91 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #92 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #93 octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:427 (liboctinterp.so.11+0xc28263)
    #94 octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108 (liboctinterp.so.11+0xc2be53)
    #95 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #96 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #97 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #98 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #99 octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3789 (liboctinterp.so.11+0xbf71a1)
    #100 octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:119 (liboctinterp.so.11+0xc05ae3)
    #101 octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3767 (liboctinterp.so.11+0xbf6f65)
    #102 octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:153 (liboctinterp.so.11+0xc389e1)
    #103 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3916 (liboctinterp.so.11+0xbf7a22)
    #104 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #105 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #106 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #107 octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3665 (liboctinterp.so.11+0xbf6714)
    #108 octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495 (liboctinterp.so.11+0xaae0af)
    #109 octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488 (liboctinterp.so.11+0xaae016)
    #110 octave::tree_identifier::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-id.cc:130 (liboctinterp.so.11+0xc24e72)
    #111 octave::tree_identifier::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-id.h:98 (liboctinterp.so.11+0xc25957)
    #112 octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3941 (liboctinterp.so.11+0xbf7b79)
    #113 octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124 (liboctinterp.so.11+0xc3a821)
    #114 octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:4026 (liboctinterp.so.11+0xbf80f0)
    #115 octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201 (liboctinterp.so.11+0x94a4cd)
    #116 octave::tree_evaluator::eval(std::shared_ptr<octave::tree_statement_list>&, bool) ../libinterp/parse-tree/pt-eval.cc:985 (liboctinterp.so.11+0xbeaaef)
    #117 octave::tree_evaluator::parse_and_execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool&) ../libinterp/parse-tree/pt-eval.cc:617 (liboctinterp.so.11+0xbe919d)
    #118 octave::interpreter::parse_and_execute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool&) ../libinterp/corefcn/interpreter.cc:835 (liboctinterp.so.11+0x107e872)
    #119 operator() ../libgui/src/command-widget.cc:153 (liboctgui.so.9+0x1e9e0c)
    #120 __invoke_impl<void, octave::command_widget::process_input_line(const QString&)::<lambda(octave::interpreter&)>&, octave::interpreter&> /usr/include/c++/11/bits/invoke.h:61 (liboctgui.so.9+0x1ebf23)
    #121 __invoke_r<void, octave::command_widget::process_input_line(const QString&)::<lambda(octave::interpreter&)>&, octave::interpreter&> /usr/include/c++/11/bits/invoke.h:111 (liboctgui.so.9+0x1ebbf1)
    #122 _M_invoke /usr/include/c++/11/bits/std_function.h:290 (liboctgui.so.9+0x1eb6c3)
    #123 std::function<void (octave::interpreter&)>::operator()(octave::interpreter&) const /usr/include/c++/11/bits/std_function.h:590 (liboctinterp.so.11+0xdc8bb8)
    #124 void std::__invoke_impl<void, std::function<void (octave::interpreter&)>&, octave::interpreter&>(std::__invoke_other, std::function<void (octave::interpreter&)>&, octave::interpreter&) /usr/include/c++/11/bits/invoke.h:61 (liboctinterp.so.11+0xdc8afa)
    #125 std::__invoke_result<std::function<void (octave::interpreter&)>&, octave::interpreter&>::type std::__invoke<std::function<void (octave::interpreter&)>&, octave::interpreter&>(std::function<void (octave::interpreter&)>&, octave::interpreter&) /usr/include/c++/11/bits/invoke.h:96 (liboctinterp.so.11+0xdc8a17)
    #126 void std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /usr/include/c++/11/functional:420 (liboctinterp.so.11+0xdc893c)
    #127 void std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>::operator()<, void>() /usr/include/c++/11/functional:503 (liboctinterp.so.11+0xdc88c6)
    #128 void std::__invoke_impl<void, std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&>(std::__invoke_other, std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&) /usr/include/c++/11/bits/invoke.h:61 (liboctinterp.so.11+0xdc8873)
    #129 std::__invoke_result<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&>::type std::__invoke<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&>(std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&) /usr/include/c++/11/bits/invoke.h:96 (liboctinterp.so.11+0xdc86c4)
    #130 void std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>::__call<void>(std::tuple<>&&, std::_Index_tuple<>) /usr/include/c++/11/functional:420 (liboctinterp.so.11+0xdc8594)
    #131 void std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>::operator()<, void>() /usr/include/c++/11/functional:503 (liboctinterp.so.11+0xdc82be)
    #132 void std::__invoke_impl<void, std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&>(std::__invoke_other, std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&) /usr/include/c++/11/bits/invoke.h:61 (liboctinterp.so.11+0xdc7c4d)
    #133 std::enable_if<is_invocable_r_v<void, std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&>, void>::type std::__invoke_r<void, std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&>(std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&) /usr/include/c++/11/bits/invoke.h:111 (liboctinterp.so.11+0xdc6ecd)
    #134 std::_Function_handler<void (), std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()> >::_M_invoke(std::_Any_data const&) /usr/include/c++/11/bits/std_function.h:290 (liboctinterp.so.11+0xdc577c)
    #135 std::function<void ()>::operator()() const /usr/include/c++/11/bits/std_function.h:590 (liboctinterp.so.11+0x94ac34)
    #136 octave::action_container::fcn_elem::run() ../liboctave/util/action-container.h:82 (liboctinterp.so.11+0xc029be)
    #137 octave::event_queue::run_first() ../libinterp/corefcn/event-queue.h:63 (liboctinterp.so.11+0xdbec80)
    #138 octave::action_container::run(unsigned long) ../liboctave/util/action-container.cc:42 (liboctave.so.10+0xe4ac04)
    #139 octave::action_container::run() ../liboctave/util/action-container.h:202 (liboctinterp.so.11+0x983919)
    #140 octave::event_manager::process_events(bool) ../libinterp/corefcn/event-manager.cc:120 (liboctinterp.so.11+0xdbaaa7)
    #141 readline_event_hook ../libinterp/corefcn/event-manager.cc:53 (liboctinterp.so.11+0xdba5b0)
    #142 octave::command_editor::event_handler() ../liboctave/util/cmd-edit.cc:1174 (liboctave.so.10+0xe4d932)
    #143 octave::command_editor::run_event_hooks() ../liboctave/util/cmd-edit.cc:1583 (liboctave.so.10+0xe5004b)
    #144 octave::tree_evaluator::server_loop() ../libinterp/parse-tree/pt-eval.cc:903 (liboctinterp.so.11+0xbea4e2)
    #145 octave::interpreter::server_loop() ../libinterp/corefcn/interpreter.cc:1355 (liboctinterp.so.11+0x10846f4)
    #146 octave::interpreter::execute() ../libinterp/corefcn/interpreter.cc:900 (liboctinterp.so.11+0x107eaa5)
    #147 octave::interpreter_qobject::execute() ../libgui/src/interpreter-qobject.cc:89 (liboctgui.so.9+0x2432eb)
    #148 octave::interpreter_qobject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) libgui/src/moc-interpreter-qobject.cc:88 (liboctgui.so.9+0x3fb9e4)
    #149 QObject::event(QEvent*) <null> (libQt5Core.so.5+0x2d1a98)
    #150 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null> (libQt5Core.so.5+0x2a7357)

  Previous read of size 8 at 0x7f1ec10e1d40 by main thread:
    #0 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<double>, void, void (octave::qt_graphics_toolkit::*)(double)>::call(void (octave::qt_graphics_toolkit::*)(double), octave::qt_graphics_toolkit*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:152 (liboctgui.so.9+0x1e23a4)
    #1 void QtPrivate::FunctionPointer<void (octave::qt_graphics_toolkit::*)(double)>::call<QtPrivate::List<double>, void>(void (octave::qt_graphics_toolkit::*)(double), octave::qt_graphics_toolkit*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:185 (liboctgui.so.9+0x1e22c4)
    #2 QtPrivate::QSlotObject<void (octave::qt_graphics_toolkit::*)(double), QtPrivate::List<double>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/qt5/QtCore/qobjectdefs_impl.h:418 (liboctgui.so.9+0x1e21fd)
    #3 QObject::event(QEvent*) <null> (libQt5Core.so.5+0x2d1a98)
    #4 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null> (libQt5Core.so.5+0x2a7357)
    #5 octave::qt_application::execute() ../libgui/src/qt-application.cc:73 (liboctgui.so.9+0x31c4ac)
    #6 main ../src/main-gui.cc:148 (lt-octave-gui+0x403730)

  Location is stack of thread T7.

  Thread T7 'QThread' (tid=202012, 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 ../libinterp/corefcn/Cell.cc:196 in Cell::index(octave_value_list const&, bool) const
==================


But those probably a separate issue.

Dmitri.
--




Dmitri A. Sergatskov <dasergatskov>
Tue 07 Mar 2023 10:17:04 PM UTC, comment #13: 

Sorry. Fixed all those:

   HG ID for this build is "129e5fc5372b"

make[2]: Leaving directory '/home/dima/src/octave/gcc_tsan'
make[1]: Leaving directory '/home/dima/src/octave/gcc_tsan'
[dima@ryzen gcc_tsan]$ TSAN_OPTIONS='ignore_noninstrumented_modules=1' ./run-octave -f --gui --experimental-terminal-widget
==================
WARNING: ThreadSanitizer: data race (pid=201467)
  Read of size 1 at 0x7ffeedfaba90 by thread T7:
    #0 octave::qt_application::gui_running() const ../libgui/src/qt-application.h:63 (liboctgui.so.9+0x31c6c8)
    #1 octave::application::is_gui_running() ../libinterp/octave.h:320 (liboctinterp.so.11+0x4e85af)
    #2 octave::F__event_manager_gui_preference__(octave::interpreter&, octave_value_list const&, int) ../libinterp/corefcn/event-manager.cc:546 (liboctinterp.so.11+0xdbd645)
    #3 octave::tree_evaluator::execute_builtin_function(octave_builtin&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3444 (liboctinterp.so.11+0xbf58be)
    #4 octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:49 (liboctinterp.so.11+0x9b789b)
    #5 octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57 (liboctinterp.so.11+0xa37cf0)
    #6 octave::interpreter::feval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, octave_value_list const&, int) ../libinterp/corefcn/interpreter.cc:1564 (liboctinterp.so.11+0x108554e)
    #7 octave::interpreter::feval(char const*, octave_value_list const&, int) ../libinterp/corefcn/interpreter.cc:1550 (liboctinterp.so.11+0x10853d1)
    #8 octave::feval(char const*, octave_value_list const&, int) ../libinterp/parse-tree/oct-parse.yy:6289 (liboctinterp.so.11+0xba8947)
    #9 octave::input_system::mfile_encoding(octave_value_list const&, int) ../libinterp/corefcn/input.cc:532 (liboctinterp.so.11+0x106d844)
    #10 octave::F__mfile_encoding__(octave::interpreter&, octave_value_list const&, int) ../libinterp/corefcn/input.cc:1592 (liboctinterp.so.11+0x1070e36)
    #11 operator() ../libgui/src/main-window.cc:2774 (liboctgui.so.9+0x2c6042)
    #12 __invoke_impl<void, octave::main_window::update_default_encoding(const QString&)::<lambda(octave::interpreter&)>&, octave::interpreter&> /usr/include/c++/11/bits/invoke.h:61 (liboctgui.so.9+0x2d1551)
    #13 __invoke_r<void, octave::main_window::update_default_encoding(const QString&)::<lambda(octave::interpreter&)>&, octave::interpreter&> /usr/include/c++/11/bits/invoke.h:111 (liboctgui.so.9+0x2cf3df)
    #14 _M_invoke /usr/include/c++/11/bits/std_function.h:290 (liboctgui.so.9+0x2cb3f1)
    #15 std::function<void (octave::interpreter&)>::operator()(octave::interpreter&) const /usr/include/c++/11/bits/std_function.h:590 (liboctinterp.so.11+0xdc8bb8)
    #16 void std::__invoke_impl<void, std::function<void (octave::interpreter&)>&, octave::interpreter&>(std::__invoke_other, std::function<void (octave::interpreter&)>&, octave::interpreter&) /usr/include/c++/11/bits/invoke.h:61 (liboctinterp.so.11+0xdc8afa)
    #17 std::__invoke_result<std::function<void (octave::interpreter&)>&, octave::interpreter&>::type std::__invoke<std::function<void (octave::interpreter&)>&, octave::interpreter&>(std::function<void (octave::interpreter&)>&, octave::interpreter&) /usr/include/c++/11/bits/invoke.h:96 (liboctinterp.so.11+0xdc8a17)
    #18 void std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) /usr/include/c++/11/functional:420 (liboctinterp.so.11+0xdc893c)
    #19 void std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>::operator()<, void>() /usr/include/c++/11/functional:503 (liboctinterp.so.11+0xdc88c6)
    #20 void std::__invoke_impl<void, std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&>(std::__invoke_other, std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&) /usr/include/c++/11/bits/invoke.h:61 (liboctinterp.so.11+0xdc8873)
    #21 std::__invoke_result<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&>::type std::__invoke<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&>(std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)>&) /usr/include/c++/11/bits/invoke.h:96 (liboctinterp.so.11+0xdc86c4)
    #22 void std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>::__call<void>(std::tuple<>&&, std::_Index_tuple<>) /usr/include/c++/11/functional:420 (liboctinterp.so.11+0xdc8594)
    #23 void std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>::operator()<, void>() /usr/include/c++/11/functional:503 (liboctinterp.so.11+0xdc82be)
    #24 void std::__invoke_impl<void, std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&>(std::__invoke_other, std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&) /usr/include/c++/11/bits/invoke.h:61 (liboctinterp.so.11+0xdc7c4d)
    #25 std::enable_if<is_invocable_r_v<void, std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&>, void>::type std::__invoke_r<void, std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&>(std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()>&) /usr/include/c++/11/bits/invoke.h:111 (liboctinterp.so.11+0xdc6ecd)
    #26 std::_Function_handler<void (), std::_Bind<std::_Bind<std::function<void (octave::interpreter&)> (std::reference_wrapper<octave::interpreter>)> ()> >::_M_invoke(std::_Any_data const&) /usr/include/c++/11/bits/std_function.h:290 (liboctinterp.so.11+0xdc577c)
    #27 std::function<void ()>::operator()() const /usr/include/c++/11/bits/std_function.h:590 (liboctinterp.so.11+0x94ac34)
    #28 octave::action_container::fcn_elem::run() ../liboctave/util/action-container.h:82 (liboctinterp.so.11+0xc029be)
    #29 octave::event_queue::run_first() ../libinterp/corefcn/event-queue.h:63 (liboctinterp.so.11+0xdbec80)
    #30 octave::action_container::run(unsigned long) ../liboctave/util/action-container.cc:42 (liboctave.so.10+0xe4ac04)
    #31 octave::action_container::run() ../liboctave/util/action-container.h:202 (liboctinterp.so.11+0x983919)
    #32 octave::event_manager::process_events(bool) ../libinterp/corefcn/event-manager.cc:120 (liboctinterp.so.11+0xdbaaa7)
    #33 readline_event_hook ../libinterp/corefcn/event-manager.cc:53 (liboctinterp.so.11+0xdba5b0)
    #34 octave::command_editor::event_handler() ../liboctave/util/cmd-edit.cc:1174 (liboctave.so.10+0xe4d932)
    #35 octave::command_editor::run_event_hooks() ../liboctave/util/cmd-edit.cc:1583 (liboctave.so.10+0xe5004b)
    #36 octave::tree_evaluator::server_loop() ../libinterp/parse-tree/pt-eval.cc:903 (liboctinterp.so.11+0xbea4e2)
    #37 octave::interpreter::server_loop() ../libinterp/corefcn/interpreter.cc:1355 (liboctinterp.so.11+0x10846f4)
    #38 octave::interpreter::execute() ../libinterp/corefcn/interpreter.cc:900 (liboctinterp.so.11+0x107eaa5)
    #39 octave::interpreter_qobject::execute() ../libgui/src/interpreter-qobject.cc:89 (liboctgui.so.9+0x2432eb)
    #40 octave::interpreter_qobject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) libgui/src/moc-interpreter-qobject.cc:88 (liboctgui.so.9+0x3fb9e4)
    #41 QObject::event(QEvent*) <null> (libQt5Core.so.5+0x2d1a98)
    #42 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null> (libQt5Core.so.5+0x2a7357)

  Previous write of size 1 at 0x7ffeedfaba90 by main thread:
    #0 octave::qt_application::gui_running(bool) ../libgui/src/qt-application.h:64 (liboctgui.so.9+0x31c710)
    #1 octave::base_qobject::start_gui(bool) ../libgui/src/octave-qobject.cc:794 (liboctgui.so.9+0x2fea48)
    #2 QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<bool>, void, void (octave::base_qobject::*)(bool)>::call(void (octave::base_qobject::*)(bool), octave::base_qobject*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:152 (liboctgui.so.9+0x30c437)
    #3 void QtPrivate::FunctionPointer<void (octave::base_qobject::*)(bool)>::call<QtPrivate::List<bool>, void>(void (octave::base_qobject::*)(bool), octave::base_qobject*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:185 (liboctgui.so.9+0x30b917)
    #4 QtPrivate::QSlotObject<void (octave::base_qobject::*)(bool), QtPrivate::List<bool>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/qt5/QtCore/qobjectdefs_impl.h:418 (liboctgui.so.9+0x30a28f)
    #5 QObject::event(QEvent*) <null> (libQt5Core.so.5+0x2d1a98)
    #6 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null> (libQt5Core.so.5+0x2a7357)
    #7 octave::qt_application::execute() ../libgui/src/qt-application.cc:73 (liboctgui.so.9+0x31c4ac)
    #8 main ../src/main-gui.cc:148 (lt-octave-gui+0x403730)

  As if synchronized via sleep:
    #0 nanosleep <null> (libtsan.so.0+0x67afc)
    #1 rpl_nanosleep ../../libgnu/nanosleep.c:81 (liboctave.so.10+0xecf735)
    #2 octave_nanosleep_wrapper ../liboctave/wrappers/nanosleep-wrapper.c:42 (liboctave.so.10+0xeaa700)
    #3 octave::sleep(double, bool) ../libinterp/corefcn/utils.cc:1599 (liboctinterp.so.11+0x12cd9ff)
    #4 octave::tree_evaluator::server_loop() ../libinterp/parse-tree/pt-eval.cc:907 (liboctinterp.so.11+0xbea4fd)
    #5 octave::interpreter::server_loop() ../libinterp/corefcn/interpreter.cc:1355 (liboctinterp.so.11+0x10846f4)
    #6 octave::interpreter::execute() ../libinterp/corefcn/interpreter.cc:900 (liboctinterp.so.11+0x107eaa5)
    #7 octave::interpreter_qobject::execute() ../libgui/src/interpreter-qobject.cc:89 (liboctgui.so.9+0x2432eb)
    #8 octave::interpreter_qobject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) libgui/src/moc-interpreter-qobject.cc:88 (liboctgui.so.9+0x3fb9e4)
    #9 QObject::event(QEvent*) <null> (libQt5Core.so.5+0x2d1a98)
    #10 QCoreApplication::notifyInternal2(QObject*, QEvent*) <null> (libQt5Core.so.5+0x2a7357)

  Location is stack of main thread.

  Location is global '<null>' at 0x000000000000 ([stack]+0x000000029a90)

  Thread T7 'QThread' (tid=201609, 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 ../libgui/src/qt-application.h:63 in octave::qt_application::gui_running() const
==================


Dmitri.
--

(the warnings are on console)

On the terminal windows:


    Welcome to Octave

>> 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.
>> version
ans = 8.1.1
>> sombrero
>>


It took looong time for plot sindows to pop-up, but it did.
No extra warning from TSAN.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Tue 07 Mar 2023 10:05:01 PM UTC, comment #12: 

Your configure line appears to have a typo:  "--disable-jave" instead of "--disable-java".

You aren't using the experimental terminal widget (QTerminal::create is called instead of the constructor for the new command_widget object).  To use the new terminal widget, you must use the command line option "--experimental-terminal-widget"  when starting Octave.

I understand that there are threading issues that could cause trouble.  Do you see the same ones if you start Octave with the "--experimental-terminal-widget" option?

John W. Eaton <jwe>
Group administrator
Tue 07 Mar 2023 09:48:58 PM UTC, comment #11: 



 ../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.
--

Dmitri A. Sergatskov <dasergatskov>
Tue 07 Mar 2023 07:43:40 PM UTC, comment #10: 

@Dimitri, I have just debugged a fresh build from the stable branch. With --experimnetal-terminal-widget the line /libgui/src/terminal-dock-widget.cc:81 is not hit on my system. Or am I misinterpreting something in your logs?

Torsten Lilge <ttl>
Group Member
Sun 05 Mar 2023 06:22:19 PM UTC, comment #9: 

Works for me, too. Debian 11 with libqscintilla 2.11.6-dfsg-2.

Regarding the stack of T7 in comment #8: The line /libgui/src/terminal-dock-widget.cc:81 should never be executed with the experimental terminal widget.

Torsten Lilge <ttl>
Group Member
Mon 06 Feb 2023 02:25:43 AM UTC, comment #8: 

Not sure if this is the same thing, but if I run (compiled w/ TSAN)
TSAN_OPTIONS='ignore_noninstrumented_modules=1' ./run-octave -f --gui --experimental-terminal-widget

on Wayland it would segfault on exit (but I  could type on therminal w/o problems). All my computers normally run on Xorg.

If I run (TSAN)

TSAN_OPTIONS='ignore_noninstrumented_modules=1' ./run-octave -f --gui I get


GNU Octave, version 8.0.91
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=181341)
  Write of size 8 at 0x7f33899805d8 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 0x7f33899805d8 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=181369, 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)
==================
>>


Dmitri.
--



Dmitri A. Sergatskov <dasergatskov>
Mon 06 Feb 2023 12:12:23 AM UTC, comment #7: 

I cannot reproduce on ubuntu 22.10 with
libqscintilla2-qt5-dev/kinetic,now 2.11.6+dfsg-4 amd64 [installed]
neither on Intel(R) Core(TM)2 Duo CPU     T9900
nor on RaspberryPi4 (both ubuntu 22.10 anf Fedora 37).

I also tried compiling octave with TSAN and id does not show any new problems there too (this is on CentOS Stream 9 with
qscintilla-qt5-2.13.0-4.el9.x86_64 imported from Fedora).

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 05 Feb 2023 07:56:48 PM UTC, comment #6: 

Ah and I am running Octave on linux Mint 21 (Ubuntu 22.04) with stock QScintilla installed using apt (libqscintilla2-qt5-dev/jammy,now 2.11.6+dfsg-4 amd64).

Pantxo Diribarne <pantxo>
Group Member
Sun 05 Feb 2023 07:52:03 PM UTC, comment #5: 

The backtrace:


(file #54316)

Pantxo Diribarne <pantxo>
Group Member
Sun 05 Feb 2023 07:51:04 PM UTC, comment #4: 

This could be a threading issue. I am running Octave on a 10 years old machine so it may be slow as compared to yours.

Here are more details. I attached a back-trace of the crash. It seams to happen in QScintilla code:


#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140737116863488) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=140737116863488) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=140737116863488, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007ffff50a7476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007ffff508d7f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff50ee6f6 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff5240b8c "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#6  0x00007ffff5105d7c in malloc_printerr (str=str@entry=0x7ffff523e764 "free(): invalid pointer") at ./malloc/malloc.c:5664
#7  0x00007ffff5107ac4 in _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at ./malloc/malloc.c:4439
#8  0x00007ffff510a4d3 in __GI___libc_free (mem=<optimized out>) at ./malloc/malloc.c:3391
#9  0x00007ffff4aee01f in QsciAccessibleScintillaBase::textRange(QsciScintillaBase*, int, int) () at /lib/libqscintilla2_qt5.so.15
#10 0x00007ffff4aef3ca in QsciAccessibleScintillaBase::characterRect(int) const () at /lib/libqscintilla2_qt5.so.15
...


That made me suspect that the following change (that I think has happened after the last time I tested the new terminal widget):


changeset:   31080:56ee6a223c51
user:        Torsten Lilge <ttl-octave@mailbox.org>
date:        Tue Jun 07 23:03:11 2022 +0200
summary:     use QScintilla instead of QTextEdit for new terminal widget


If I update to -r 31079 I can't trigger the crash anymore. From 31080 on, I can reliably trigger the crash by simply typing 4 characters. E.g., if I type "plot", after typing "t" the GUI window disappears and the message from comment #0 appears in the calling terminal.

Pantxo Diribarne <pantxo>
Group Member
Fri 03 Feb 2023 11:57:54 PM UTC, comment #3: 

Also works for me, although stderr is directed back to the shell from which I launched the GUI rather than displaying messages in the GUI.

Rik <rik5>
Group administrator
Fri 03 Feb 2023 09:28:25 PM UTC, comment #2: 

Does not crash for me


    Welcome to Octave

>> ver
----------------------------------------------------------------------
GNU Octave Version: 8.0.91 (hg id: 449d9b0f3478)
GNU Octave License: GNU General Public License
Operating System: Linux 5.14.0-247.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jan 27 19:22:07 UTC 2023 x86_64
----------------------------------------------------------------------
Package Name  | Version | Installation directory
--------------+---------+-----------------------
     control  |   3.4.0 | .../share/octave/api-v57+/packages/control-3.4.0
  statistics  |   1.5.3 | .../share/octave/api-v57+/packages/statistics-1.5.3
>> plot(1:10)
>> 123456789012345678901234567890
ans = 1.2346e+29
>>


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Fri 03 Feb 2023 09:16:28 PM UTC, comment #1: 

Running from a CLI in windows i don't get a crash.

Nicholas Jankowski <nrjank>
Group Member
Fri 03 Feb 2023 08:40:28 PM UTC, original submission:  

If I start Octave release candidate as follows:


$ octave -f --gui --experimental-terminal-widget


the GUI opens with the new command window activated. I just have to type 4 characters to see Octave crash:


free(): invalid pointer
fatal: caught signal Abandon -- stopping myself...
Abandon (core dumped)


I marked this bug as a "blocker" in the sense that I think Octave 8 cannot be released with a nonfunctional (even if announced "experimental") terminal widget.

I am pretty sure this used to work so it would be a regression from a few month ago, when I tested during the Octave 8 development period.

Pantxo Diribarne <pantxo>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #55624:  fix_crash_exit_expterm.patch added by ttl (902B - text/x-patch)
file #54316:  bug63752_backtrace.txt added by pantxo (24KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arungiridhar (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by pantxo (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-04 rik5 Carbon-CopyRemoved 72865 -
    2024-02-03 ttl StatusNone Need Info
    2024-01-27 ttl Attached File- Added fix_crash_exit_expterm.patch, #55624
    2023-02-05 pantxo Attached File- Added bug63752_backtrace.txt, #54316

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code