bugGNU Octave - Bugs: bug #54280, audiowrite crash for some long...

 
 

bug #54280: audiowrite crash for some long data for mono OGG

Submitted by:  None
Submitted on:  Tue 10 Jul 2018 12:20:58 PM UTC  
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.4.0
Operating System:  Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Tue 10 Jul 2018 08:50:46 PM UTC, comment #8:

I shortened the URL and checked the patch in. Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Tue 10 Jul 2018 05:53:21 PM UTC, comment #7:

Looks good, works for me.

I would prefer the short URL https://bugs.debian.org/760898 in the comment, other than that nit, seems like a solid fix.

Mike Miller <mtmiller>
Project Administrator
Tue 10 Jul 2018 05:28:01 PM UTC, comment #6:

Attached is a patch that reduces the chunk size in Octave from 2^21 to 2^20. It allows the examples in this report to work.

(file #44537)

Rik <rik5>
Project Administrator
Tue 10 Jul 2018 04:28:44 PM UTC, comment #5:

updated libvorbis 1.3.6 has a some ogg changes according to the change log, however still crashes when I used it.

Looking in octave audioread.cc, theres a FIXME:

So it sounds like its a known issue

John Donoghue <lostbard>
Project Member
Tue 10 Jul 2018 03:44:08 PM UTC, comment #4:

I saw a comment that looks related here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760898

I'm also trying a update of libvorbis on my machine just to see if that fixes the issue.

John Donoghue <lostbard>
Project Member
Tue 10 Jul 2018 03:31:03 PM UTC, comment #3:

Here is a relevant backtrace. The segfault is in an external library.

In the debugger, the only problematic value looks like chunk_size which seems to be the original 2100000 - 2850 header.

#5 0x00007fffc6bbb30d in Faudiowrite (args=...) at libinterp/dldfcn/audioread.cc:457
457 sf_count_t items_written = sf_write_float (file, data+offset, chunk_size);
(gdb) p chunk_size
$1 = 2097150
(gdb) p offset
$2 = 0

Looking at /usr/include/sndfile.h for the definition of sf_count_t, it is a 64-bit integer and is definitely large enough to handle this.

This sure looks like a problem with the actual libvorbis library or libsndfile library, i.e., an upstream bug.

Maybe use Google to see if someone has reported a bug against one of those libraries. A definitive test would be to write a small C++ program to call libsndfile directly with this large value and see if that too crashes.

Rik <rik5>
Project Administrator
Tue 10 Jul 2018 02:38:59 PM UTC, comment #2:

Trying other formats other than ogg, it seems to be an .ogg only problem.

John Donoghue <lostbard>
Project Member
Tue 10 Jul 2018 02:32:02 PM UTC, comment #1:

Does the same thing in windows in octave 4.4.0 and dev

John Donoghue <lostbard>
Project Member
Tue 10 Jul 2018 12:20:58 PM UTC, original submission:

I accidentally found that when writing to a mono (1 channel) OGG file, if the data is long enough, then Octave will crash with signal 11 (Segfault). For example,

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44537:  audiowrite.cset added by rik5 (1KiB - application/octet-stream)

 

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 (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-10 rik5 StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2018-07-10 rik5 StatusConfirmed => Patch Submitted
    2018-07-10 rik5 Attached File- => Added audiowrite.cset, #44537
    2018-07-10 lostbard StatusNone => Confirmed
        Operating SystemGNU/Linux => Any

    Back to the top


    Powered by Savane 3.3