bugGNU Octave - Bugs: bug #37205, running JIT tests with valgrind:...

 
 

bug #37205: running JIT tests with valgrind: possible memory issues and segfault

Submitter:  John W. Eaton <jwe>
Submitted:  Mon 27 Aug 2012 01:41:55 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  1 - Later Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 02 Feb 2015 04:36:12 AM UTC, comment #7: 

Somewhere in the space of a year and a half this seems to have fixed itself.  I no longer get a segfault when running JIT under valgrind.  Closing report.

Rik <rik5>
Group administrator
Thu 10 Oct 2013 10:04:57 PM UTC, comment #6: 

This issue is still with us (10/10/13).  Again, it seems to exist only in the valgrind environment so perhaps this isn't desperate to fix.

I can run Octave, but when I try to run the jit.tst file I get a segmentation fault.

Rik <rik5>
Group administrator
Thu 14 Mar 2013 09:53:05 PM UTC, comment #5: 

I compiled recently and I have a few more datapoints.  The tests pass if JIT is disabled in configure.  They also pass if Java is disabled.  So it appears that JIT and Java may be competing over the CPU flags.  Or maybe they only compete when valgrind is also in the mix.

I'm at revision 16303:085976d9ef08 which is after Mike's cset that restores the Floating Point flags after every Java call.  It may be that more flags, such as the SSE-associated stuff, needs to be restored.

Rik <rik5>
Group administrator
Mon 27 Aug 2012 06:00:54 PM UTC, comment #4: 

As another datapoint, I do not compile with LLVM because my version is too old, and I can run the test suite under valgrind.  This sure looks like a problem in pt-jit.cc.

Rik <rik5>
Group administrator
Mon 27 Aug 2012 04:18:04 PM UTC, comment #3: 

Right, I use tcsh and setenv...
works.

Thanks

Michael Godfrey <godfrey>
Group Member
Mon 27 Aug 2012 04:13:09 PM UTC, comment #2: 

That's Bourne shell syntax, so it should work in bash.

Do you use a C-shell derivative?  If so, then you'd need to write something like


setenv driver "valgrind --tool=memcheck"
make check


Or, is the missing command valgrind itself?  Do you have that installed on your system?

John W. Eaton <jwe>
Group administrator
Mon 27 Aug 2012 03:38:14 PM UTC, comment #1: 

John,

I tried the command below, but got
"command not found"

What shell or other trick is needed?

Michael Godfrey <godfrey>
Group Member
Mon 27 Aug 2012 01:41:55 PM UTC, original submission:  

Running


driver="valgrind --tool=memcheck" make check


failed with


  libinterp/interp-core/pt-jit.cc ........................==12086== Warning: client switching stacks?  SP change: 0x7feff9810 --> 0x18214890
==12086==          to suppress, use: --max-stackframe=33938100096 or greater
==12086== Use of uninitialised value of size 8
==12086==    at 0x18D81190: ???
==12086==    by 0x5F9CBF3: jit_info::execute(std::map<std::string, octave_value const*, std::less<std::string>, std::allocator<std::pair<std::string const, octave_value const*> > > const&) const (pt-jit.cc:1669)
==12086==    by 0x5F9C283: tree_jit::execute(tree_simple_for_command&, octave_value const&) (pt-jit.cc:1547)
==12086==    by 0x5E28EAB: tree_evaluator::visit_simple_for_command(tree_simple_for_command&) (pt-eval.cc:313)
==12086==    by 0x5E33E79: tree_simple_for_command::accept(tree_walker&) (pt-loop.cc:125)
==12086==    by 0x5E2A3C8: tree_evaluator::visit_statement(tree_statement&) (pt-eval.cc:717)
==12086==    by 0x5E4B855: tree_statement::accept(tree_walker&) (pt-stmt.cc:151)
==12086==    by 0x5E2A6B3: tree_evaluator::visit_statement_list(tree_statement_list&) (pt-eval.cc:783)
==12086==    by 0x5E4BC07: tree_statement_list::accept(tree_walker&) (pt-stmt.cc:215)
==12086==    by 0x5DBC531: octave_user_function::do_multi_index_op(int, octave_value_list const&, std::list<octave_lvalue, std::allocator<octave_lvalue> > const*) (ov-usr-fcn.cc:479)
==12086==    by 0x5DBBD9F: octave_user_function::subsref(std::string const&, std::list<octave_value_list, std::allocator<octave_value_list> > const&, int, std::list<octave_lvalue, std::allocator<octave_lvalue> > const*) (ov-usr-fcn.cc:329)
==12086==    by 0x5DBBC8D: octave_user_function::subsref(std::string const&, std::list<octave_value_list, std::allocator<octave_value_list> > const&, int) (ov-usr-fcn.cc:312)
==12086==
panic: Segmentation fault -- stopping myself...


This crash doesn't happen when running the tests without valgrind.

Full log is attached.

John W. Eaton <jwe>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #26432:  make-check-log added by jwe (21KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-02 rik5 Priority5 - Normal 1 - Later
        StatusNone Fixed
        Open/ClosedOpen Closed
    2013-10-29 rik5 Summaryrunning tests with valgrind: possible memory issues and segfault running JIT tests with valgrind: possible memory issues and segfault
    2012-08-27 jwe Attached File- Added make-check-log, #26432

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code