Bug 526653 - oggenc --resample crashes on invalid free()
Summary: oggenc --resample crashes on invalid free()
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: vorbis-tools
Version: 11
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:ca4078d2914fc598ed24ac81f84...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-01 10:33 UTC by Renich Bon Ciric
Modified: 2009-10-14 01:34 UTC (History)
2 users (show)

Fixed In Version: 1.2.0-5.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-10-14 01:34:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.64 KB, text/plain)
2009-10-01 10:33 UTC, Renich Bon Ciric
no flags Details
valgrind oggenc --quiet --resample 44100 test.wav 2>&1 | tee oggenc.out (1.39 KB, text/plain)
2009-10-06 16:10 UTC, Kamil Dudka
no flags Details

Description Renich Bon Ciric 2009-10-01 10:33:31 UTC
abrt detected a crash.


How to reproduce
-----
1.
2.
3.


Additional information
======


Attached files
----
backtrace

cmdline
-----
oggenc -q 10 --resample 44100 -o master/48kHz_at_24bit//../../ogg/44.1kHz_at_16bit/master/48kHz_at_24bit//introbella - Introducchon (energy) - A japon.ogg master/48kHz_at_24bit//introbella - Introducchon (energy) - A japon.wav 


component
-----
vorbis-tools


executable
-----
/usr/bin/oggenc


kernel
-----
2.6.31.1-56.fc12.x86_64


package
-----
vorbis-tools-1:1.2.0-5.fc12


reason
-----
Process was terminated by signal 6

Comment 1 Renich Bon Ciric 2009-10-01 10:33:33 UTC
Created attachment 363304 [details]
File: backtrace

Comment 2 Kamil Dudka 2009-10-01 10:46:57 UTC
Thanks for the report! Could you please provide some steps to reproduce? Something like a minimal example? I am not able to reproduce the crash myself.

Comment 3 Renich Bon Ciric 2009-10-01 19:33:40 UTC
Ok, sorry!... forgive abrt ;)

Anyway, here's the script I'm using:

# Thu 01 Oct 2009 06:00:07 AM CDT 
# introbella - wav2OggMp3Flac converter
# GPLv3 or >
#
# This script depends on ffmpeg, lame, oggenc and flac in order to work.
# 
# INSTRUCTIONS
# 1. Make a directory and subdirectories with the following layout
# BandName-Album (or BandName/Album... it's up to you)
# |-master
# |--48kHz_at_24bit
# 
# 1.1 Put the songs in WAV format; in 48 kHz @ 24 bit quality in 
#     the masters/48kHz_at_24bit directory
#
# 1.2. I recommend you use a natural songname format for the songs: song 1.wav, 
#      song 2.wav, song 3.wav
#
# 2. Run the script like this: wav2OggMp3Flac 
#    /path/to/BandNmae-Album/master/48kHz_at_24bit
#
# 3. Go get a coca-cola or something.
#
#! /bin/bash

# TODO: Get Album info (band, album, year and calculate name based on fileane. 
#       Clean up if _ or - used.)
# TODO: Add an if file exists verification so it doesn't overwrite the files 
#       every time. Add a size verification (if not zero or something)

for song in "$1"/*.wav;
do
    # separate path from song name
    path="${song%/*}"
    song="${song##*/}"

    # convert to wav in 44.1kHz at 16bit
    pathWav44="$path/../44.1kHz_at_16bit"
    mkdir -p $pathWav44
    ffmpeg -i "$path/$song" -ar 44100 "$pathWav44/$song"
    
    # convert wav to ogg (highest quality)
    pathOgg48="$1/../../ogg/48kHz_at_24bit"
    pathOgg44="$1/../../ogg/44.1kHz_at_16bit"
    mkdir -p $pathOgg44 $pathOgg48
    oggenc -q 10 -o "$pathOgg48/${song%.*}.ogg" "$path/$song";
    oggenc -q 10 --resample 44100 -o "$pathOgg44/${song%.*}.ogg" "$path/$song";

    # convert wav to mp3 (highest quality)
    pathMp348="$path/../../mp3/48kHz_at_24bit"
    pathMp344="$path/../../mp3/44.1kHz_at_16bit"
    mkdir -p $pathMp344 $pathMp348
    lame --resample 48 --bitwidth 24 --replaygain-accurate -q 0 -V 0 --preset insane "$path/$song" "$pathMp348/${song%.*}.mp3";
    lame --resample 44.1 --bitwidth 16 --replaygain-accurate -q 0 -V 0 --preset insane "$path/$song" "$pathMp344/${song%.*}.mp3";

    # convert wav to flac (highest quality)
    pathFlac48="$1/../../flac/48kHz_at_24bit"
    mkdir -p $pathFlac48
    flac -V -f --replay-gain --best --bps=24 --sample-rate=48000 -o "$pathFlac48/${song%.*}.flac" "$path/$song";
done

exit 0

Comment 4 Kamil Dudka 2009-10-01 21:31:58 UTC
Thanks! Now please some steps to reproduce the crash using the enclosed script, best only operating with the files distributed along with Fedora (or created by some available tools). Does it crash all the time or occasionally?

Comment 5 Renich Bon Ciric 2009-10-02 07:00:48 UTC
it's occasional.

You just need to:

1. add some 48 kHz @ 24 bit wav files to the following dir:
./master/48kHz_at_24bit

2. Run the script on it:
/path/to/the/wav2OggMp3Flac ./master/48kHz_at_24bit

The script will create some dirs and start putting files in there.

This is when I get the errors. I always get some (within 10 files) at least 4 or 5.

Comment 6 Kamil Dudka 2009-10-06 16:10:55 UTC
Created attachment 363849 [details]
valgrind oggenc --quiet --resample 44100 test.wav 2>&1 | tee oggenc.out

Thanks! Now I have an easy and 100% reliable reproducer. Enclosed is a bt caught by valgrind.

Comment 7 Kamil Dudka 2009-10-06 18:53:43 UTC
The bug has been already fixed in the Gentoo Linux:

ftp://ftp.sh.cvut.cz/MIRRORS/gentoo-portage/media-sound/vorbis-tools/files/vorbis-tools-1.2.0-oggenc-resample-call-fix.patch

Comment 8 Kamil Dudka 2009-10-06 19:00:13 UTC
... and also fixed upstream:
http://svn.xiph.org/trunk/vorbis-tools/oggenc/oggenc.c

Comment 9 Kamil Dudka 2009-10-06 20:03:18 UTC
Fixed packages are ready:

vorbis-tools-1.2.0-5.fc11
vorbis-tools-1.2.0-6.fc12
vorbis-tools-1.2.0-6.fc13

Please test them ASAP, so that I can request a freeze override for F-12. Thanks in advance!

Comment 10 Renich Bon Ciric 2009-10-06 22:11:53 UTC
how? they aren't in the repos... are they? (I'm using rawhide)

Comment 11 Kamil Dudka 2009-10-07 06:19:30 UTC
(In reply to comment #10)
> how? they aren't in the repos... are they? (I'm using rawhide)  

If not, you can still download them directly from Koji:

http://koji.fedoraproject.org/koji/buildinfo?buildID=135359
http://koji.fedoraproject.org/koji/buildinfo?buildID=135356
http://koji.fedoraproject.org/koji/buildinfo?buildID=135352

Comment 12 Renich Bon Ciric 2009-10-07 21:22:43 UTC
It works fine! How can I send you good karma?

Comment 13 Kamil Dudka 2009-10-07 21:38:00 UTC
Your comment here is IMO sufficient enough to request freeze override, I'll do it ASAP. I am also going to submit an update for F-11. Thanks for testing it!

Comment 14 Renich Bon Ciric 2009-10-07 23:52:34 UTC
thanks for fixing it! ;=)

Comment 15 Kamil Dudka 2009-10-08 08:12:51 UTC
I've just filled a ticket:
https://fedorahosted.org/rel-eng/ticket/2401

Comment 16 Kamil Dudka 2009-10-08 18:43:22 UTC
vorbis-tools-1.2.0-6.fc12 successfully tagged into f12-beta by notting

Comment 17 Fedora Update System 2009-10-08 18:45:45 UTC
vorbis-tools-1.2.0-5.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/vorbis-tools-1.2.0-5.fc11

Comment 18 Fedora Update System 2009-10-14 01:34:22 UTC
vorbis-tools-1.2.0-5.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.