octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: profiler crash


From: Rik
Subject: Re: profiler crash
Date: Wed, 28 Oct 2015 10:01:50 -0700

On 10/28/2015 09:00 AM, address@hidden wrote:
Subject:
Re: repeatable crash due to profiler?
From:
"John W. Eaton" <address@hidden>
Date:
10/28/2015 08:54 AM
To:
Nicholas Jankowski <address@hidden>
CC:
Octave Maintainers List <address@hidden>
List-Post:
<mailto:address@hidden>
Content-Transfer-Encoding:
7bit
Precedence:
list
MIME-Version:
1.0
References:
<address@hidden> <address@hidden>
In-Reply-To:
<address@hidden>
Message-ID:
<address@hidden>
Content-Type:
text/plain; charset=utf-8; format=flowed
Message:
5

On 10/28/2015 11:46 AM, Nicholas Jankowski wrote:
On Wed, Oct 28, 2015 at 11:32 AM, Nicholas Jankowski
<address@hidden <mailto:address@hidden>> wrote:

    Octave 4.0.0 on Win7
    <snip>
    Making a minimal example for a bug rpt may be a bit difficult as I'm
    starting with quite a bit of a mess.

    <snip>

    Nick J.


i stand corrected. a minimal example was easier than I thought.  I'll
put a bug report together unless it's already out there and I missed it
on the bug tracker.
errtest_script.m calls the profiler, and calls func_with_syntax_error.m
It'll error out the first time, and "A s s e r t i o n f a i l e d !"
the second time. Crashes with or without the gui.

I don't know whether there is a report about this yet but I don't recall one.  Thanks for finding a simple test case and please do add it to the tracker.

jwe

Nick,

Please add this to the bug tracker as jwe suggests.  It is fairly easy to understand what is happening at a macro level.  The profiler records the time when it enters and exits a function and via subtraction is able to figure out how much time was spent in the function.  On entry the profiler records the time and then Octave core determines that the function has not been parsed so it reads it, but fails to parse it because of the syntax error.  This means no valid function is created.  When the code "exits" the function the profiler tries to add the running time to the profiler dataset  but runs into an assert statement in profiler.cc:391 on the development branch

assert (call_tree && active_fcn != call_tree);

So, I understand why this is happening, but I don't have a clear idea how to fix it.  It's not enough simply to remove the assert since there are other functions involved and other asserts.  Somehow, it would be best for the profiler to realize that there was a serious error and just abort collecting statistics on that function.

--Rik


reply via email to

[Prev in Thread] Current Thread [Next in Thread]