bugGNU Octave - Bugs: bug #54656, Crash with signal 11 (segfault)

 
 

bug #54656: Crash with signal 11 (segfault)

Submitted by:  Olaf Bousche <olaf789>
Submitted on:  Thu 13 Sep 2018 01:10:59 PM UTC  
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Duplicate Assigned to:  None
Originator Name:  Olaf789 Open/Closed:  Closed
Release:  4.4.1 Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

( Jump to the original submission)

Thu 13 Sep 2018 09:08:28 PM UTC, comment #10:

First of all thanks everyone for confirming that I was not crazy. I did not expect this to be picked so fast or I would have responded earlier.

I'll stick with the CLI version for crashing programs with clear statements. I hope it gets fixed in the next release.

Olaf Bousche <olaf789>
Thu 13 Sep 2018 07:36:15 PM UTC, comment #9:

With that, I think this is probably identical to bug #54431. Either that one or this one can be closed as duplicate, but all test cases should be looked at when fixing to make sure it's the same thing. The other bug had to do with user-defined objects, so I thought maybe there is an extra wrinkle with the workspace view having to eval a user-defined disp function to get the string representation of the object.

Mike Miller <mtmiller>
Project Administrator
Thu 13 Sep 2018 07:32:28 PM UTC, comment #8:

Thanks. With the data file I can confirm that the script crashes in 4.4.1 but does not crash in 5, so I believe it is the 'clear' commands that are triggering it just like the other bug report.

See bug #54443 for the report about 'clear' causing a workspace view refresh which has been fixed on the default branch, which avoids this crash.

Mike Miller <mtmiller>
Project Administrator
Thu 13 Sep 2018 07:31:20 PM UTC, comment #7:

I tested with 4.4.1. Yes, it seems related to clearing symbols while a script is executing. I can trigger the crash with this script:

Doesn't crash with the dev version, but you are right that it doesn't mean that the issue is really fixed. Probably we are just avoiding it. I'm guessing the real problem is that the GUI might access the contents of a symbol_scope object while it is being modified. So we may need some locking, or a copy-on-write mechanism for this use case(?), or we need to avoid passing symbol scope objects directly to the interpreter and only pass summary info about them.

John W. Eaton <jwe>
Project Administrator
Thu 13 Sep 2018 07:17:59 PM UTC, comment #6:

Trying to attach the file again. I didn't notice any messages about size limits. It's 680k.

(file #45001)

John W. Eaton <jwe>
Project Administrator
Thu 13 Sep 2018 07:11:08 PM UTC, comment #5:

Also the Currency2.txt file is still not attached to this bug report, was it over the attachment file size limit?

Mike Miller <mtmiller>
Project Administrator
Thu 13 Sep 2018 07:09:35 PM UTC, comment #4:

This looks very similar to the crash reported in bug #54431. The bug there looks like a simultaneous access to the symbol table while a script is running and the workspace view is being updated.

jwe - did you test with 4.4.1 or 5? Because a recent change on the default branch made it so that the workspace view is not updated when a script calls the 'clear' command. That might be what is triggering the crash in this script. It would be useful to see if the script crashes in 4.4.1 but not in 5 because of that.

But that doesn't mean the underlying bug is fixed. As I posted on bug #54431, the crash can still be triggered by entering debug mode and rapidly stepping through the script by holding down Enter, which does cause a workspace view refresh on every prompt.

Mike Miller <mtmiller>
Project Administrator
Thu 13 Sep 2018 02:06:27 PM UTC, comment #3:

I can confirm the crash. After attaching gdb to the octave-gui process, it stops with

Interesting bits from "thread apply all bt":

and the thread where the crash happens:

So, it looks like a threading problem with accessing the symbol table when the GUI tries to update the data displayed in the workspace widget.

John W. Eaton <jwe>
Project Administrator
Thu 13 Sep 2018 02:01:42 PM UTC, comment #2:

I'm attaching the Currentcy2.txt data file, extracted from the file http://roland65.free.fr/benchmarks/benchmarks-0.2.tar.gz

John W. Eaton <jwe>
Project Administrator
Thu 13 Sep 2018 01:48:50 PM UTC, comment #1:

Hi,

You did not include "Currency2.txt" so I am unable to run the script.

Pantxo Diribarne <pantxo>
Project Member
Thu 13 Sep 2018 01:10:59 PM UTC, original submission:

I have the following weird problem

When I run the file I have added below (ncrunch.m) the gui version octave crashes under Windows 10. The gui version I build under Linux Mint Mate Tara also crashes. The CLI versions do not crash.

When I stop the code after every test the code crashes when I stop (add a return) after the FFT test. But the code also crashes when I comment out the FFT section.

I am at a loss here. I do remember something from the olden (windows 95) days though in code I was working with. If fortran code contains output (warning, error, etc) statements to stdout or null this can crash gui's but not CLI applications. At this moment I am too inexperienced with the octave code and build environment to hunt for something like that. The strange thing is that it happens both under Linux and Windows.

The other possibility is a hardware error. I have only one system here. Can someone please try this on another computer?

P.S.

The ncrunch.m file is a slightly modified version I took from http://roland65.free.fr/benchmarks/. The original shows the same problem. Under Matlab, there is no crash.

Olaf Bousche <olaf789>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45001:  Currency2.txt added by jwe (679KiB - text/plain)
file #44999:  ncrunch.m added by olaf789 (4KiB - text/x-objcsrc)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by olaf789 (Submitted the item)
  •  

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

    Only project members can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-09-17 mtmiller StatusConfirmed => Duplicate
        Open/ClosedOpen => Closed
        Dependencies- => Depends on bugs #54431
    2018-09-13 jwe Attached File- => Added Currency2.txt, #45001
    2018-09-13 jwe StatusNone => Confirmed
    2018-09-13 olaf789 Attached File- => Added ncrunch.m, #44999

    Back to the top


    Powered by Savane 3.3