bugGNU Octave - Bugs: bug #37469, crash when making a large cell...

 
 

bug #37469: crash when making a large cell array

Submitted by:  Doug Stewart <dastew>
Submitted on:  Sun 30 Sep 2012 02:04:10 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: Wont FixAssigned to: None
Originator Name: Doug StewartOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 12 Oct 2012 03:16:24 PM UTC, comment #3:

From testing, this seems to be an operating system issue (how much stack space is reserved for program use) rather than an Octave issue. Closing report.

Rik <rik5>
Project Administrator
Sun 30 Sep 2012 05:29:10 AM UTC, comment #2:

Here is a bit more information. The problem is not in the construction of the large nested cell array. Rather the segfault results from the 'whos' command. Apparently while trying to calculate the size of the variable 'a' Octave repeatedly calls byte_size on each element. This leads to a call stack that is on the order of 2.4e5.

So, one way to test things is to increase the size of the stack. I find that if I increase the size of the stack to 64MB then everything works correctly. You might try increasing the size of the stack at the shell prompt and then trying 'run-octave' and see if everything works. It does for me. If that is the case then this is not an Octave issue and I will close this report.

Rik <rik5>
Project Administrator
Sun 30 Sep 2012 04:45:39 AM UTC, comment #1:

Confirmed on hg id 2fa06d83263a. I changed the summary to reflect that this happens with a cell array, not a struct array. I've also uploaded a script to demonstrate the problem (mk_lg_cell.m).

Note that the problem is with nesting, not with ordinary cell arrays that contain a large number of elements. I reduced the loop to just for i = 1:5 to get an idea of what the variable 'a' would look like. See the output below.

(file #26666)

Rik <rik5>
Project Administrator
Sun 30 Sep 2012 02:04:10 AM UTC, original submission:

hg id
219479b461b8 tip

If I run the script at
http://agora.octave.org/snippet/JVWZ/
Octave crashes (disappears)

I also tested some older versions and they also crashed.

I don't think this is a high priority item: but thought it should be mentioned.

Doug Stewart <dastew>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #26666:  mk_lg_cell.m added by rik5 (128B - text/x-octave)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Updated the item)
  • -unavailable- added by dastew (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 12 Oct 2012 03:16:24 PM UTCrik5CategoryGUI=>Interpreter
      StatusConfirmed=>Wont Fix
      Open/ClosedOpen=>Closed
    Sun 30 Sep 2012 04:45:39 AM UTCrik5Attached File-=>Added mk_lg_cell.m, #26666
      StatusNone=>Confirmed
      Summarycrash when making a large struct array=>crash when making a large cell array

    Back to the top


    Powered by Savane 3.1-cleanup1