bugGNU Octave - Bugs: bug #61393, [octave forge] (sparsersb) Crash...

 
 

bug #61393: [octave forge] (sparsersb) Crash while "pkg test sparsersb"

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Wed 27 Oct 2021 08:45:08 AM UTC
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * other Operating System:  * Microsoft Windows
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Wed 27 Oct 2021 08:45:08 AM UTC, original submission:  

With the release candidate of Octave (version 6.3.90), running `pkg test sparsersb` crashes Octave if the sparsersb package was installed to a read-only directory.

The content that is written to `fntests.log` up to the crash:

>>>>> processing C:\Program Files\GNU Octave\Octave-6.3.90\mingw64\lib\octave\packages\sparsersb-1.0.9\x86_64-w64-mingw32-api-v56\sparsersb.cc-tst
***** test
 s=sparsersb([1]);
 sparsersb(sparsersb([11,0;21,22]),"save","sparsersb_temporary_matrix_file.mtx")
!!!!! test failed
librsb error: An unspecified error occurred.
***** test
 [S, NROWS, NCOLS, NNZ, REPINFO, FIELD, SYMMETRY] = sparsersb("sparsersb_temporary_matrix_file.mtx"     );
 assert(NROWS==2)
 assert(NCOLS==2)
 assert(NNZ==3)
 assert(FIELD=="real");
 assert(SYMMETRY=='U');
!!!!! test failed
element number 1 undefined in return list
***** test
 [S, NROWS, NCOLS, NNZ, REPINFO, FIELD, SYMMETRY] = sparsersb("sparsersb_temporary_matrix_file.mtx", "Z");
 assert(NROWS==2);
 assert(NCOLS==2);
 assert(NNZ==3);
 assert(FIELD=="complex");
 assert(SYMMETRY=='U');
!!!!! test failed
element number 1 undefined in return list
***** test
 [S, NROWS, NCOLS, NNZ, REPINFO, FIELD] = sparsersb("sparsersb_temporary_matrix_file.mtx", "D");
 assert(NROWS==2);
 assert(NCOLS==2);
 assert(NNZ==3);
 assert(FIELD=="real");
!!!!! test failed
element number 1 undefined in return list
***** test
 [S, NROWS, NCOLS, NNZ, REPINFO] = sparsersb("sparsersb_temporary_matrix_file.mtx", "D");
 assert(NROWS==2);
 assert(NCOLS==2);
 assert(NNZ==3);
!!!!! test failed
element number 1 undefined in return list
***** test
 [S, NROWS, NCOLS] = sparsersb("sparsersb_temporary_matrix_file.mtx", "D");
 assert(NROWS==2);
 assert(NCOLS==2);
!!!!! test failed
element number 1 undefined in return list
***** test
 [S, NROWS] = sparsersb("sparsersb_temporary_matrix_file.mtx", "D");
 assert(NROWS==2);
!!!!! test failed
element number 1 undefined in return list

The current directory during the tests is the path where the tests are installed. That is a read-only directory by default for the bundled version (global package) of sparsersb on Windows.
The original error seems to be that the file "sparsersb_temporary_matrix_file.mtx" cannot be created in the read-only directory.

A possible fix for that issue might be to create the file in the TEMP directory. The command that writes the file could be changed to e.g.:

sparsersb(sparsersb([11,0;21,22]),"save",fullfile(tempdir(),"sparsersb_temporary_matrix_file.mtx"))

The tests that access that file would need to be adapted accordingly.

Additionally, `sparsersb` probably shouldn't cause a crash if the file it tries to open doesn't exist.

I set the OS to "MS Windows" because that is where I noticed the error. But something similar would probably also occur on other platforms.

Markus Mützel <mmuetzel>
Project Member

 

(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 mmuetzel (Submitted the item)
  • -email is unavailable- added by mmuetzel
  •  

    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 project members can vote.

     

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-10-27 mmuetzel Carbon-Copy- => Added dezperado

    Back to the top


    Powered by Savane 3.9