bugGNU Octave - Bugs: bug #35553, Assertion `last_time >= 0.0...

 
 

bug #35553: Assertion `last_time >= 0.0 && last_time <= t' failed

Submitter:  None
Submitted:  Fri 17 Feb 2012 03:15:03 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Need Info Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 14 May 2014 09:08:02 PM UTC, comment #2: 

This report is two years old.  If we could get some sample code from the original reporter that reproduces the problem it might be possible to debug this.  Otherwise, it probably isn't possible since the Octave developers aren't experiencing this issue.

One possibility may be to compile Octave from scratch with the --enable-float-truncate option.  It seems, from the reporter's results, that more than double precision was being used in the subtraction operation.

Rik <rik5>
Group administrator
Thu 08 Mar 2012 11:22:09 PM UTC, comment #1: 

Daniel, do you have any comment on this?

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Fri 17 Feb 2012 03:15:03 PM UTC, original submission:  

Profiler frequently crushes on our private program.


Error message:
octave: profiler.cc:400: void profile_data_accumulator::add_current_time(): Assertion `last_time >= 0.0 && last_time <= t' failed.


We have make some modifications to source code to refine the problem better:


--- src/profiler.cc.orig        2012-02-17 18:48:18.000000000 +0400
+++ src/profiler.cc     2012-02-17 19:02:48.000000000 +0400
@@ -397,6 +397,10 @@
 profile_data_accumulator::add_current_time (void)
 {
   const double t = query_time ();
+  if (last_time > t) {
+       printf("last time %10.16Lf t %10.16Lf delta %.20g\n", (long double)last_time, (long double)t, last_time - t);
+       printf("last time %10.16Lf t %10.16Lf delta %.20g\n", (long double)last_time, (long double)t, last_time - t);
+  }
   assert (last_time >= 0.0 && last_time <= t);

   assert (call_tree && active_fcn != call_tree);


That results in the following output (note that the assertion failure disappeared):


last time 1329491053.8831980228424072 t 1329491053.8831980000250041 delta 2.2817403078079223633e-08
last time 1329491053.8831980228424072 t 1329491053.8831980228424072 delta 0
...
last time 1329491061.6747350692749023 t 1329491061.6747350000077859 delta 6.92671164870262146e-08
last time 1329491061.6747350692749023 t 1329491061.6747350692749023 delta 0


We hope the data above show that the problem is related to long double -> double conversion. Please note that delta has not many 1's in binary representation, which hits that it is related to excess of long double over double precision. Please note that the effective value of t changes after invocation of printf.

Our versions:
octave-3.6.0 (./configure && make && ./run-octave -q our-private-program);
Gentoo Linux 2.6.39-gentoo-r3 i686 Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz GenuineIntel GNU/Linux

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by jordigh
  • -email is unavailable- added by jordigh
  • -email is unavailable- added by None (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
    2014-12-28 rik5 Open/ClosedOpen Closed
    2014-05-14 rik5 StatusNone Need Info
    2013-10-10 rik5 Item GroupSegfault, Bus Error, etc. Other
    2012-03-08 jordigh Carbon-Copy- Added "daniel kraft" <d@domob.eu>
        Carbon-Copy- Added

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code