oggenc crashes with --resample option (amd64)

Bug #334056 reported by ezekiel000
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
vorbis-tools
Invalid
Unknown
vorbis-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: vorbis-tools

I'm running Ubuntu 8.10 (amd64) and vorbis-tools 1.2.0.
I have a directory of wav files to convert but if I try to batch re-sample them to 32000Hz (from 22050Hz and 44100Hz) I get this:
oggenc -b 64 --resample 32000 --downmix *.wav
Opening with wav module: WAV file reader
Resampling input from 22050 Hz to 32000 Hz
WARNING: Can't downmix except from stereo to mono
Encoding "0005.wav" to
"0005.ogg"
at approximate bitrate 64 kbps (VBR encoding enabled)
[ 73.9%] [ 0m00s remaining] -

Done encoding file "0005.ogg"

File length: 0m 02.0s
Elapsed time: 0m 00.1s
Rate: 24.6719
Average bitrate: 47.9 kb/s

*** glibc detected *** oggenc: munmap_chunk(): invalid pointer: 0x0000000000405540 ***
======= Backtrace: =========
/lib/libc.so.6[0x7fa4c94d7a58]
oggenc[0x404fad]
oggenc[0x404357]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7fa4c947c466]
oggenc[0x402699]
======= Memory map: ========
00400000-0040f000 r-xp 00000000 08:01 52719 /usr/bin/oggenc
0060e000-0060f000 r--p 0000e000 08:01 52719 /usr/bin/oggenc
0060f000-00610000 rw-p 0000f000 08:01 52719 /usr/bin/oggenc
0213e000-02189000 rw-p 0213e000 00:00 0 [heap]
7fa4c9246000-7fa4c925c000 r-xp 00000000 08:01 73471 /lib/libgcc_s.so.1
7fa4c925c000-7fa4c945c000 ---p 00016000 08:01 73471 /lib/libgcc_s.so.1
7fa4c945c000-7fa4c945d000 r--p 00016000 08:01 73471 /lib/libgcc_s.so.1
7fa4c945d000-7fa4c945e000 rw-p 00017000 08:01 73471 /lib/libgcc_s.so.1
7fa4c945e000-7fa4c95c7000 r-xp 00000000 08:01 7770 /lib/libc-2.8.90.so
7fa4c95c7000-7fa4c97c6000 ---p 00169000 08:01 7770 /lib/libc-2.8.90.so
7fa4c97c6000-7fa4c97ca000 r--p 00168000 08:01 7770 /lib/libc-2.8.90.so
7fa4c97ca000-7fa4c97cb000 rw-p 0016c000 08:01 7770 /lib/libc-2.8.90.so
7fa4c97cb000-7fa4c97d0000 rw-p 7fa4c97cb000 00:00 0
7fa4c97d0000-7fa4c97d5000 r-xp 00000000 08:01 9604 /usr/lib/libogg.so.0.5.3
7fa4c97d5000-7fa4c99d4000 ---p 00005000 08:01 9604 /usr/lib/libogg.so.0.5.3
7fa4c99d4000-7fa4c99d5000 r--p 00004000 08:01 9604 /usr/lib/libogg.so.0.5.3
7fa4c99d5000-7fa4c99d6000 rw-p 00005000 08:01 9604 /usr/lib/libogg.so.0.5.3
7fa4c99d6000-7fa4c9a5a000 r-xp 00000000 08:01 7774 /lib/libm-2.8.90.so
7fa4c9a5a000-7fa4c9c59000 ---p 00084000 08:01 7774 /lib/libm-2.8.90.so
7fa4c9c59000-7fa4c9c5a000 r--p 00083000 08:01 7774 /lib/libm-2.8.90.so
7fa4c9c5a000-7fa4c9c5b000 rw-p 00084000 08:01 7774 /lib/libm-2.8.90.so
7fa4c9c5b000-7fa4c9ca3000 r-xp 00000000 08:01 8862 /usr/lib/libFLAC.so.8.2.0
7fa4c9ca3000-7fa4c9ea3000 ---p 00048000 08:01 8862 /usr/lib/libFLAC.so.8.2.0
7fa4c9ea3000-7fa4c9ea4000 r--p 00048000 08:01 8862 /usr/lib/libFLAC.so.8.2.0
7fa4c9ea4000-7fa4c9ea5000 rw-p 00049000 08:01 8862 /usr/lib/libFLAC.so.8.2.0
7fa4c9ea5000-7fa4c9ec4000 r-xp 00000000 08:01 9822 /usr/lib/libvorbis.so.0.4.0
7fa4c9ec4000-7fa4ca0c3000 ---p 0001f000 08:01 9822 /usr/lib/libvorbis.so.0.4.0
7fa4ca0c3000-7fa4ca0c4000 r--p 0001e000 08:01 9822 /usr/lib/libvorbis.so.0.4.0
7fa4ca0c4000-7fa4ca0d2000 rw-p 0001f000 08:01 9822 /usr/lib/libvorbis.so.0.4.0
7fa4ca0d2000-7fa4ca0ec000 r-xp 00000000 08:01 9824 /usr/lib/libvorbisenc.so.2.0.3
7fa4ca0ec000-7fa4ca2eb000 ---p 0001a000 08:01 9824 /usr/lib/libvorbisenc.so.2.0.3
7fa4ca2eb000-7fa4ca2ec000 r--p 00019000 08:01 9824 /usr/lib/libvorbisenc.so.2.0.3
7fa4ca2ec000-7fa4ca4ab000 rw-p 0001a000 08:01 9824 /usr/lib/libvorbisenc.so.2.0.3
7fa4ca4ab000-7fa4ca4ca000 r-xp 00000000 08:01 7767 /lib/ld-2.8.90.so
7fa4ca58b000-7fa4ca58c000 rw-p 7fa4ca58b000 00:00 0
7fa4ca58c000-7fa4ca58d000 r--p 00000000 08:01 61933 /usr/share/locale-langpack/en_GB/LC_MESSAGES/vorbis-tools.mo
7fa4ca58d000-7fa4ca58e000 rw-p 7fa4ca58d000 00:00 0
7fa4ca58e000-7fa4ca5cd000 r--p 00000000 08:01 12898 /usr/lib/locale/en_GB.utf8/LC_CTYPE
7fa4ca5cd000-7fa4ca6ae000 r--p 00000000 08:01 12897 /usr/lib/locale/en_GB.utf8/LC_COLLATE
7fa4ca6ae000-7fa4ca6b1000 rw-p 7fa4ca6ae000 00:00 0
7fa4ca6b5000-7fa4ca6b6000 r--p 00000000 08:01 12942 /usr/lib/locale/en_GB.utf8/LC_NUMERIC
7fa4ca6b6000-7fa4ca6b7000 r--p 00000000 08:01 12793 /usr/lib/locale/en_GB.utf8/LC_TIME
7fa4ca6b7000-7fa4ca6b8000 r--p 00000000 08:01 12794 /usr/lib/locale/en_GB.utf8/LC_MONETARY
7fa4ca6b8000-7fa4ca6b9000 r--p 00000000 08:01 12920 /usr/lib/locale/en_GB.utf8/LC_MESSAGES/SYS_LC_MESSAGES
7fa4ca6b9000-7fa4ca6ba000 r--p 00000000 08:01 12904 /usr/lib/locale/en_GB.utf8/LC_PAPER
7fa4ca6ba000-7fa4ca6bb000 r--p 00000000 08:01 12915 /usr/lib/locale/en_GB.utf8/LC_NAME
7fa4ca6bb000-7fa4ca6bc000 r--p 00000000 08:01 12795 /usr/lib/locale/en_GB.utf8/LC_ADDRESS
7fa4ca6bc000-7fa4ca6bd000 r--p 00000000 08:01 12796 /usr/lib/locale/en_GB.utf8/LC_TELEPHONE
7fa4ca6bd000-7fa4ca6be000 r--p 00000000 08:01 12900 /usr/lib/locale/en_GB.utf8/LC_MEASUREMENT
7fa4ca6be000-7fa4ca6c5000 r--s 00000000 08:01 7563 /usr/lib/gconv/gconv-modules.cache
7fa4ca6c5000-7fa4ca6c6000 r--p 00000000 08:01 12797 /usr/lib/locale/en_GB.utf8/LC_IDENTIFICATION
7fa4ca6c6000-7fa4ca6c9000 rw-p 7fa4ca6c6000 00:00 0
7fa4ca6c9000-7fa4ca6ca000 r--p 0001e000 08:01 7767 /lib/ld-2.8.90.so
7fa4ca6ca000-7fa4ca6cb000 rw-p 0001f000 08:01 7767 /lib/ld-2.8.90.so
7fffd26aa000-7fffd26ca000 rw-p 7ffffffdf000 00:00 0 [stack]
7fffd27f4000-7fffd27f5000 r-xp 7fffd27f4000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Aborted

It still seems to output the correctly encoded file but I can't batch encode as it crashes after the first.

Tags: amd64
Revision history for this message
Ted (tedks) wrote :

Running the same command on any WAV file gives me a duplicate result.

Changed in vorbis-tools:
status: New → Confirmed
Revision history for this message
Adam Buchbinder (adam-buchbinder) wrote :

There's already an upstream ticket open, but it hasn't yet been confirmed on current trunk. (I can't do it, because I don't have a 64-bit system.) Detailed instructions for building a current version of the vorbis libraries as well as vorbis-tools are there as well, if anyone wants to have a go at it.

Changed in vorbis-tools:
status: Unknown → New
Revision history for this message
ezekiel000 (ezekiel000) wrote :

I built the current version like Adam described and I got no errors.

Changed in vorbis-tools:
status: New → Invalid
Revision history for this message
ezekiel000 (ezekiel000) wrote :

This is still a problem in Ubuntu 9.04.

Revision history for this message
Brian Parma (bj0) wrote :

I am still getting this problem in 9.10 (amd64)

Revision history for this message
Dominik Stadler (dominik-stadler) wrote :

Backporting libvorbis-1.2.3 from Lucid to Karmic did not solve this problem.

Revision history for this message
Dominik Stadler (dominik-stadler) wrote :

Using latest from SVN for libvorbis, but 1.2.0 for oggenc still crashes. Only using oggenc from latest from SVN makes it work.

This means the problem is solved by a newer version of oggenc, however there is not yet a newer vorbis-tools release available and the changes between 1.2.0 and SVN-latest are quite big, so it is not easy to extract a single patch for this problem...

tags: added: amd64
Revision history for this message
Dominik Stadler (dominik-stadler) wrote :

This is also reported for Gentoo at http://bugs.gentoo.org/236236, there they list https://trac.xiph.org/ticket/1316 as related. This one has a patch that seems to work, it is available at https://trac.xiph.org/attachment/ticket/1316/vorbis-tools-oggenc-resample-call-fix.patch and it is very simple, only one line.

Revision history for this message
Aapo Rantalainen (aapo-rantalainen) wrote :

Ubuntu 9.10 amd64, crashing when using --resample.
After patching it work.

apt-get source vorbis-tools
sudo apt-get build-dep vorbis-tools
cd vorbis-tools-1.2.0/
wget https://trac.xiph.org/raw-attachment/ticket/1316/vorbis-tools-oggenc-resample-call-fix.patch
patch -p0 < vorbis-tools-oggenc-resample-call-fix.patch
dpkg-buildpackage -rfakeroot -d -b
sudo dpkg -i ../vorbis-tools_1.2.0-6_amd64.deb

But using 'silly' values, it is still Aborting/SegFaulting

--resample 8
(Did you mean 8000 Hz?)
BUG: Got zero samples from resampler: your file will be truncated. Please report this.
Segmentation fault

--resample 80 (or 800)
(Did you mean 80000 Hz?)
BUG: Got zero samples from resampler: your file will be truncated. Please report this.
oggenc: malloc.c:3074: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
Aborted

Revision history for this message
Dominik Stadler (dominik-stadler) wrote :

As far as I see this patch is incorporated in version 1.4.0 of vorbis-tools which is available as part of Ubuntu 12.04, so I think this is fixed for now, please reopen if this is still a problem for you with this vorbis-tools 1.4.0.

Changed in vorbis-tools (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.