octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #60042] [octave forge] (sparsersb) Crash while


From: Dmitri A. Sergatskov
Subject: [Octave-bug-tracker] [bug #60042] [octave forge] (sparsersb) Crash while "pkg test sparsersb"
Date: Thu, 11 Feb 2021 17:27:09 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #3, bug #60042 (project octave):

Not sure if this is related:


ASAN_OPTIONS="leak_check_at_exit=0" ./rsbench -B
Beginning large binary search test.
Detected 33445613568 bytes of memory, comprehensive of 20588650496 of free
memory.
On this system, maximal array of coordinates can have 2147483137 elements and
occupy 8589932548 bytes.
Will perform the test using less memory (17592186042758 MB) than on the
maximal coordinate indices array (18446744071971170304) allows.
Skipping test: too little memory.
Skipping large binary search test.
REGRESSION TEST: BEGIN
REGRESSION TEST: END
MATRIX SUMS TEST: BEGIN
MATRIX SUMS TEST: END
BASIC SPARSE BLAS TEST: BEGIN
INIT INTERFACE TEST: BEGIN
got RSB_IO_WANT_EXTRA_VERBOSE_INTERFACE: 0
got RSB_IO_WANT_IS_INITIALIZED_MARKER: 1
INIT INTERFACE TEST: END (SUCCESS)
PRINT TEST: BEGIN
%%MatrixMarket matrix coordinate real general
4 4 4
1       1       0
2       2       11
3       3       22
4       4       33
         vectors diff :
0 : 0 11
1 : 11 22
2 : 22 33
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: librsb 1.2.0.9
%%Title: matrix spy plot (originally 4 x 4 / 4, here 100 x 100/4)
%%CreationDate: 
%%DocumentData: Clean7Bit
%%Origin: 0 0
%%BoundingBox: 0 0 100 100
%%LanguageLevel: 2
%%Pages: 1
%%Page: 1 1
save /$LIBRSB_DICT 3 dict def $LIBRSB_DICT begin /M {moveto} bind def /Z
{gsave currentpoint lineto 25 setlinewidth 1 setlinecap stroke grestore} bind
def /D {M Z} bind def /K {0.5 0.5 setrgbcolor} bind def
/R {rlineto} bind def
/N {newpath} bind def
/L {lineto} bind def
/C {closepath} bind def
/SLW {setlinewidth} bind def
/SRGB {setrgbcolor} bind def
/SCF {scalefont} bind def
/SF {setfont} bind def
stroke
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: librsb 1.2.0.9
%%Title: matrix plot
%%CreationDate: 
%%DocumentData: Clean7Bit
%%Origin: 0 0
%%BoundingBox: 0 0 100 100
%%LanguageLevel: 2 
%%Pages: 1
%%Page: 1 1

/csquare {
        newpath
        0 0 moveto
        0 -25 rlineto
        25 0 rlineto
        0 25 rlineto
        closepath
       setrgbcolor
        fill
} def

0 0 moveto

save /$LIBRSB_DICT 3 dict def $LIBRSB_DICT begin /M {moveto} bind def /Z
{gsave currentpoint lineto 1 setlinewidth 1 setlinecap stroke grestore} bind
def /D {M Z} bind def /K {0.5 0.5 setrgbcolor} bind def
/R {rlineto} bind def
/N {newpath} bind def
/L {lineto} bind def
/C {closepath} bind def
/SLW {setlinewidth} bind def
/SRGB {setrgbcolor} bind def
/SCF {scalefont} bind def
/SF {setfont} bind def
%% (4 x 4)[0x624000002100]{S} @ (0(0..0),0(0..0)) (4 nnz, 1 nnz/r) flags
0x2046186 (coo:1, csr:1, hw:1, ic:1), storage: 40, subm: 2, symflags:''
%% ect: 0.00e+00  est: 9.06e-06  sat: 1.91e-05  eit: 1.19e-05  cpt: 0.00e+00
%%
RSB(@:3/2;100.0%diagnz;100.0%diagblk)-R/RowMajor/General/-HalfwordCsr:(0~2)-FullwordCsr:(0~2)-HalfwordCoo:(2~2)-FullwordCoo:(0~2)/float/cores:32/gcc-8.3//sizeof(nnz_idx_t):4,sizeof(coo_idx_t):4,sizeof(blk_idx_t):4/idx_storage:16-idx_storage_in_csr:36-idx_storage_in_coo:32/version:1.2.0.9/memhinfo:[L3:16/64/16M,L2:8/64/512K,L1:8/64/32K]/ryzen
%% sparse blocks dump
% matrix at 0 0, level 0
% matrix at 0 0, level 1
% terminal matrix at 0 0
newpath
0 100 M
50 0 R
0 -50 R
-50 0 R
0 0 R
C
0.0625 0.0625 0.0625 SRGB
1 SLW
stroke

% matrix at 2 2, level 1
% terminal matrix at 2 2
newpath
50 50 M
50 0 R
0 -50 R
-50 0 R
0 0 R
C
0.0625 0.0625 0.0625 SRGB
1 SLW
stroke

%% z dump
newpath
% matrix at 0 0, level 1, xs 25, ys 25, orows 4
25 75 M
% matrix at 2 2, level 1, xs 25, ys 25, orows 4
75 25 L
0 0  1 setrgbcolor
1 setlinewidth
stroke

% rendering time ~ 0.000144005 s
PRINT TEST: END (SUCCESS)
BASIC SPARSE BLAS TEST: END (SUCCESS)
STRESS SPARSE BLAS TEST: BEGIN
STRESS SPARSE BLAS TEST: END (SUCCESS)
SPARSE BLAS TESTS: END (SUCCESS)
BASIC PRIMITIVES TEST: BEGIN
BASIC PRIMITIVES TEST: END (SUCCESS)
ADVANCED SPARSE BLAS TEST: BEGIN
=================================================================
==1352633==ERROR: AddressSanitizer: heap-use-after-free on address
0x624000b4a118 at pc 0x0000004aae23 bp 0x7ffec60f8040 sp 0x7ffec60f8030
READ of size 4 at 0x624000b4a118 thread T0
    #0 0x4aae22 in rsb_blas_bigger_matrices_tester
/home/dima/src/librsb-1.2.0.9/rsb_libspblas_tests.c:1527
    #1 0x40bdbe in main /home/dima/src/librsb-1.2.0.9/rsbench.c:642
    #2 0x7fa63fcd57b2 in __libc_start_main (/lib64/libc.so.6+0x237b2)
    #3 0x40712d in _start
(/home/dima/src/librsb-1.2.0.9/.libs/lt-rsbench+0x40712d)

0x624000b4a118 is located 24 bytes inside of 7840-byte region
[0x624000b4a100,0x624000b4bfa0)
freed by thread T0 here:
    #0 0x7fa641f2d7e0 in __interceptor_free (/lib64/libasan.so.5+0xef7e0)
    #1 0x7fa640e5474e in rsb__free
/home/dima/src/librsb-1.2.0.9/rsb_sys.c:389
    #2 0x7fa640e87814 in rsb__destroy_inner
/home/dima/src/librsb-1.2.0.9/rsb_internals.c:405
    #3 0x7fa640ee84c6 in
rsb__do_switch_recursive_in_place_matrix_to_in_place_coo_unsorted
/home/dima/src/librsb-1.2.0.9/rsb_rec2coo.c:303
    #4 0x7fa640e844de in rsb__do_switch_rsb_mtx_to_coo_unsorted
/home/dima/src/librsb-1.2.0.9/rsb_do.c:1040
    #5 0x7fa640e84d45 in rsb__do_switch_rsb_mtx_to_coo
/home/dima/src/librsb-1.2.0.9/rsb_do.c:1102
    #6 0x4aad57 in rsb_blas_bigger_matrices_tester
/home/dima/src/librsb-1.2.0.9/rsb_libspblas_tests.c:1526
    #7 0x40bdbe in main /home/dima/src/librsb-1.2.0.9/rsbench.c:642
    #8 0x7fa63fcd57b2 in __libc_start_main (/lib64/libc.so.6+0x237b2)

previously allocated by thread T0 here:
    #0 0x7fa641f2e9c0 in __interceptor_posix_memalign
(/lib64/libasan.so.5+0xf09c0)
    #1 0x7fa640e5468b in rsb__aligned_malloc
/home/dima/src/librsb-1.2.0.9/rsb_sys.c:364
    #2 0x7fa640e54786 in rsb__malloc
/home/dima/src/librsb-1.2.0.9/rsb_sys.c:417
    #3 0x7fa640e54a69 in rsb__calloc
/home/dima/src/librsb-1.2.0.9/rsb_sys.c:711
    #4 0x7fa640edc620 in
rsb__allocate_recursive_sparse_matrix_from_row_major_coo
/home/dima/src/librsb-1.2.0.9/rsb_coo2rec.c:2661
    #5 0x7fa640ed2dac in rsb__mtx_alloc_inner
/home/dima/src/librsb-1.2.0.9/rsb_asm.c:88
    #6 0x7fa640e9c240 in rsb__do_mtx_alloc_from_coo_inplace
/home/dima/src/librsb-1.2.0.9/rsb_internals.c:3833
    #7 0x7fa640e8577b in rsb__do_mtx_alloc_from_csr_inplace
/home/dima/src/librsb-1.2.0.9/rsb_do.c:1258
    #8 0x4aa98c in rsb_blas_bigger_matrices_tester
/home/dima/src/librsb-1.2.0.9/rsb_libspblas_tests.c:1500
    #9 0x40bdbe in main /home/dima/src/librsb-1.2.0.9/rsbench.c:642
    #10 0x7fa63fcd57b2 in __libc_start_main (/lib64/libc.so.6+0x237b2)

SUMMARY: AddressSanitizer: heap-use-after-free
/home/dima/src/librsb-1.2.0.9/rsb_libspblas_tests.c:1527 in
rsb_blas_bigger_matrices_tester
Shadow bytes around the buggy address:
  0x0c48801613d0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c48801613e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c48801613f0: fd fd fd fd fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4880161400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c4880161410: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c4880161420: fd fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4880161430: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4880161440: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4880161450: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4880161460: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c4880161470: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==1352633==ABORTING


Dmitri.
-- 


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60042>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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