bugGNU Octave - Bugs: bug #40666, bug-38691.tst failing only on MinGW

 
 

bug #40666: bug-38691.tst failing only on MinGW

Submitter:  Rik <rik5>
Submitted:  Thu 21 Nov 2013 10:40:31 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 18 Jan 2014 02:34:30 AM UTC, comment #8: 

The problem is the low resolution timers that Windows provides.  It has bitten us before in the tests for speed.m.  In this case, the addpath calls in the test come so close together that Windows doesn't see that any changes to func1 have occurred.  I pushed a changeset that deals with this here (http://hg.savannah.gnu.org/hgweb/octave/rev/515187b51411).

Rik <rik5>
Group administrator
Sat 11 Jan 2014 09:07:55 PM UTC, comment #7: 

Confirmed, still failing intermittently on an MXE 3.8.0 build in a VM running XP.

Mike Miller <mtmiller>
Group Member
Fri 22 Nov 2013 05:36:57 PM UTC, comment #6: 

Oh great, you can reproduce this bug :(

For the record, I am using a virtual machine configured with a single processor and Windows XP.  The CLI version definitely seems to have more problems.  I'm CC'ing jwe because he produced the fix for bug #38691 in the first place and he might have an idea why a 'rehash' is occasionally necessary.

I think it could be a timing issue.  I also notice that if I use keyboard() to bring about a prompt in the %!test then it always succeeds as well.  So it could be something about the %!test environment which is run deep inside unwind_protect blocks and eval'ed command line functions.

Rik <rik5>
Group administrator
Fri 22 Nov 2013 04:58:50 PM UTC, comment #5: 

Cross compiled from id 96a4ac0dc01f on a Fedora 19 machine and running on Windows 7 Prof, 64bit, Intel i7-2640M (installed via the mxe-octave NSIS installer)

I was running the GUI.

In --no-gui, it acts completely different:
octave-gui.exe:2> test ("bug-38691.tst")
  ***** test
 unwind_protect
   addpath dir1;
   [d1_r, d1_f1, d1_f2, d1_f3] = func1 (0);
   addpath dir2;
   [d2_r, d2_f1, d2_f2, d2_f3] = func1 (0);
   assert (d1_r, 0);
   assert (d2_r, 1);
   assert (d1_f1, "dir1/func1");
   assert (d1_f2, "dir1/func2");
   assert (d1_f3, "dir1/func3");
   assert (d2_f1, "dir2/func1");
   assert (d2_f2, "dir2/func2");
   assert (d2_f3, "dir2/func3");
 unwind_protect_cleanup
   rmpath dir1;
   rmpath dir2;
 end_unwind_protect
!!!!! test failed
ASSERT errors for:  assert (d2_r,1)

  Location  |  Observed  |  Expected  |  Reason
     ()           0            1         Abs err 1 exceeds tol 0
octave-gui.exe:3>


John Donoghue <lostbard>
Group Member
Fri 22 Nov 2013 04:29:14 PM UTC, comment #4: 

I suppose that's good that the bug might be related only to my system.  What version of Windows are you running?  Is your CPU single core or something else?  And were you running in the GUI or the CLI?  I find that the number of failures is higher in the CLI than in the GUI.

Rik <rik5>
Group administrator
Fri 22 Nov 2013 03:27:20 PM UTC, comment #3: 

I did the same loop as you for 100x and it passed each time.

>> pwd
ans = C:\octave-2013-11-22-05-43\share\octave\3.7.7+\etc\tests\fixed\bug-38691
>> for i = 1:100
bm(i) = test ("bug-38691.tst");
endfor
>> sum(bm)
ans =  100
>> for i = 1:1000
bm(i) = test ("bug-38691.tst");
endfor
>> sum(bm)
ans =  1000
>>


John Donoghue <lostbard>
Group Member
Fri 22 Nov 2013 02:52:40 PM UTC, comment #2: 

bug #38236 is a known failure on all platforms.  Bug 38691 is an occasional failure.  If you are using _run_test_suite_() it may or may not fail on that particular run, but that is only a single test instance.

If you cd to the bug-38691 test directory and run the test repeatedly, does it always pass?

Rik <rik5>
Group administrator
Fri 22 Nov 2013 02:30:13 PM UTC, comment #1: 

For me its the test before it that fails:

>>>>> processing bug-38236.tst
  ***** test
 u_vr
!!!!! test failed
'vr' undefined near line 1 column 36


John Donoghue <lostbard>
Group Member
Thu 21 Nov 2013 10:40:31 PM UTC, original submission:  

The fixed tests in the test directory include a test for bug #38691 where Octave's loadpath is not correctly updated after using addpath.

The bug was fixed for Linux, but on MinGW it continues to fail in a probabilistic manner.  Using the following code,


for i = 1:100
  bm(i) = test ("bug-38691.tst");
endfor
sum (bm)


I see 68 successes instead of 100 successes.

If I alter the .tst script to update the cache with rehash


%!   addpath dir2;
%!   rehash;


then I get 100 passing tests.

Rik <rik5>
Group administrator

 

(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 mtmiller (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by rik5 (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-18 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2014-01-11 mtmiller CategoryNone Interpreter
        Item GroupOther Incorrect Result
        StatusNone Confirmed
    2013-11-22 rik5 Carbon-Copy- Added jwe

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code