bugGNU Octave - Bugs: bug #39586, Assertion failure with profexplore...

 
 

bug #39586: Assertion failure with profexplore valid use: Assertion `fcn_id == fcn' failed.

Submitter:  Philipp Kutin <pkutin>
Submitted:  Sun 28 Jul 2013 07:54:36 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal 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

Wed 14 May 2014 09:04:15 PM UTC, comment #10: 

This should be fixed by this changeset on the development branch (http://hg.savannah.gnu.org/hgweb/octave/rev/b45d975aa38f).  The "problem" is that the assert statements were written with the assumption that profile would always be called from the top-level command line.  If profile() is used within an m-file to enable/disable profiling then the asserts would fire and cause the crash.  My solution was simply to comment out the incorrect assert statements in the code.

Rik <rik5>
Group administrator
Wed 27 Nov 2013 08:08:10 PM UTC, comment #9: 

Confirmed, for what it's worth it does not happen with qt graphics toolkit.

Pantxo Diribarne <pantxo>
Group Member
Wed 27 Nov 2013 08:06:23 PM UTC, comment #8: 

Oops, "graphics_toolkit fltk" is precisely what my .octaverc contains at the top. Sorry for failing to provide that crucial piece of information, as it turned out now!

(Oh, and in passing, thanks to whomever fixed the awful ~0.5-second delays when pressing the prompt history up/down keys after loading FLTK.)

Philipp Kutin <pkutin>
Wed 27 Nov 2013 04:59:52 PM UTC, comment #7: 

Even simpler series of commands now to reproduce the bug.


run-octave -f
graphics_toolkit fltk;
prof_test (1);
profexplore (profile ('info'))
profexplore> 1
corefcn/profiler.cc:108: profile_data_accumulator::tree_node* profile_data_accumulator::tree_node::exit(octave_idx_type): Assertion `fcn_id == fcn' failed.
Abort


Rik <rik5>
Group administrator
Wed 27 Nov 2013 05:01:24 AM UTC, comment #6: 

I found a situation that fails for me.  If the .octaverc file contains


graphics_toolkit fltk;


then running


prof_test(1)
profexplore (profile ('info'))
Top
  1) zeros: 1 calls, 0.014 total, 0.014 self
  2) binary -: 1000 calls, 0.003 total, 0.003 self
  3) binary +: 1000 calls, 0.002 total, 0.002 self
  4) profile: 1 calls, 0.000 total, 0.000 self
  5) binary ==: 1 calls, 0.000 total, 0.000 self

profexplore> 1
�: corefcn/profiler.cc:108: profile_data_accumulator::tree_node* profile_data_accumulator::tree_node::exit(octave_idx_type): Assertion `fcn_id == fcn' failed.
panic: Aborted -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
Abort


If there is no such line in the .octaverc or I call "run-octave -f" which does not read initialization scripts then it works.

Rik <rik5>
Group administrator
Sun 13 Oct 2013 05:33:17 PM UTC, comment #5: 

I am now at (hg summary)

parent: 17646:993ea21b7e03 tip
 graphics.in.h: Text "edgecolor" property should default to "none".
branch: default
bookmarks: @
commit: (clean)
update: (current)
mq:     (empty queue)

and the test works for me even if I don't do anything before in a session (gui or not). My configure command is:


../octave/configure --prefix=/home/pantxo/dev/octavebuild/local --with-java-homedir=/usr/lib/jvm/java-6-openjdk-amd64 CXXFLAGS='-g -O0'


I use gcc 4.7.2 on linux mint 14.



Pantxo Diribarne <pantxo>
Group Member
Fri 11 Oct 2013 04:48:57 PM UTC, comment #4: 

Using this tip (hg id 382aaf2d533a) I still get a segfault.  Moreover, I get a different result from profile.


octave:1> prof_test(1)
octave:2> profexplore (profile ('info'))

Top
  1) : 1 calls, 11.872 total, 0.100 self
  2) zeros: 1 calls, 0.013 total, 0.013 self
  3) binary ==: 1 calls, 0.000 total, 0.000 self


There is no call to 'binary +' for example.  So, this might have to do with compilation options.  Also, I was executing the two commands as the very first thing in an Octave session, perhaps things need to be initialized to work properly.

Rik <rik5>
Group administrator
Fri 11 Oct 2013 03:56:55 PM UTC, comment #3: 

Can't confirm with up to date dev.


>> prof_test(1)
>> profexplore(profile("info"))

Top
  1) zeros: 1 calls, 0.002 total, 0.002 self
  2) binary -: 1000 calls, 0.001 total, 0.001 self
  3) binary +: 1000 calls, 0.001 total, 0.001 self
  4) profile: 1 calls, 0.000 total, 0.000 self
  5) binary ==: 1 calls, 0.000 total, 0.000 self

profexplore> 1

Top
  zeros: 1 calls, 0.002 total, 0.002 self

profexplore> exit
>>


It may have been fixed at the same time as this one https://savannah.gnu.org/bugs/index.php?39524

Pantxo Diribarne <pantxo>
Group Member
Thu 08 Aug 2013 12:56:36 AM UTC, comment #2: 

Confirmed on a recent tip.  The profiler has ceased to function well since moving to the new parser.

Rik <rik5>
Group administrator
Sun 28 Jul 2013 07:55:50 AM UTC, comment #1: 

[Oops, the rest of my initial report was eaten.]

octave:2> prof_test(1)
octave:3> profexplore(profile("info"))

Top
  1) : 1 calls, 12.241 total, 0.100 self
  2) zeros: 1 calls, 0.005 total, 0.005 self
  3) binary -: 1000 calls, 0.001 total, 0.001 self
  4) binary +: 1000 calls, 0.000 total, 0.000 self
  5) binary ==: 1 calls, 0.000 total, 0.000 self

profexplore> 1
../../libinterp/corefcn/profiler.cc:108: profile_data_accumulator::tree_node* profile_data_accumulator::tree_node::exit(octave_idx_type): Assertion `fcn_id == fcn' failed.
panic: Aborted -- stopping myself...

Philipp Kutin <pkutin>
Sun 28 Jul 2013 07:54:36 AM UTC, original submission:  

To reproduce on the default branch,


octave:2> prof_test(1)  % attached
octave:3> profexplore(profile("info"))

Top
  1) : 1 calls, 12.241 total, 0.100 self
  2) zeros: 1 calls, 0.005 total, 0.005 self
  3) binary -: 1000 calls, 0.001 total, 0.001 self
  4) binary +: 1000 calls, 0.000 total, 0.000 self
  5) binary ==: 1 calls, 0.000 total, 0.000 self

profexplore> 1
../../libinterp/corefcn/profiler.cc:108: profile_data_accumulator::tree_node* profile_data_accumulator::tree_node::exit(octave_idx_type): Assertion `fcn_id == fcn' failed.
panic: Aborted -- stopping myself...
+verbatim+

Philipp Kutin <pkutin>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #28677:  prof_test.m added by pkutin (358B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by efferre79
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by pkutin (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 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-05-16 rik5 DependenciesRemoved dependency from bugs #41780 -
    2014-05-14 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2014-03-14 efferre79 Carbon-Copy- Added efferre79
    2014-03-14 rik5 Dependencies- bugs #41780 is dependent
    2013-10-17 rik5 Severity4 - Important 3 - Normal
        Priority7 - High 5 - Normal
    2013-08-08 rik5 Severity3 - Normal 4 - Important
        Priority5 - Normal 7 - High
        StatusNone Confirmed
    2013-07-28 pkutin Attached File- Added prof_test.m, #28677

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code