transcode freezes at 99%

Bug #528875 reported by Radu Cristescu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
transcode (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: transcode

I installed dvd::rip today, which uses transcode to create the AVI files. I'm using 2-pass encoding, and quite a lot of the time transcode freezes at 99% on the first pass.

gdb shows three threads when transcode is in this state: two threads are in conditional waits, and the third one is in a "pause()" call.

Looking around the web, I found this:

http://www.transcoding.org/transcode?Transcode_FAQ

<blockquote>
If your problem is that transcode "hangs" immediately, or even after some time, you may be experiencing the venerable old thread-version problem.

If running transcode this way: "env LD_ASSUME_KERNEL=2.4.0 transcode ..." fixes the problem, then it's thread version issues, not transcode, that's at fault.

See: http://people.redhat.com/drepper/assumekernel.html
</blockquote>

The suggested solution doesn't work on my installation. I also don't see the link between NPTL and the hang. I haven't looked in the source code yet.

Description: Ubuntu 9.10
Release: 9.10
Package: transcode
Version: 3:1.1.4-0.0ubuntu4
Architecture: i386

Revision history for this message
Radu Cristescu (radu.c) wrote :

Thread 2 (Thread 0xa479eb70 (LWP 17259)):
#0 0x00c46422 in __kernel_vsyscall ()
#1 0x003a8e15 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x08060a8c in aframe_reserve ()
#3 0x0805f9b7 in ?? ()
#4 0x003a480e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5 0x004bb8de in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb77c2ae0 (LWP 17252)):
#0 0x00c46422 in __kernel_vsyscall ()
#1 0x003a8e15 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x08060d0c in aframe_retrieve ()
#3 0x0805e5b4 in ?? ()
#4 0x0805d5cb in tc_encoder_loop ()
#5 0x080540ca in main ()

the third thread is just in tc_socket_wait

Revision history for this message
Radu Cristescu (radu.c) wrote :

Stack trace with unstripped symbols and -O0

Thread 3 (Thread 0xa5768b70 (LWP 15603)):
#0 0x00e94422 in __kernel_vsyscall ()
#1 0x00e55611 in pause () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x0807089b in tc_socket_wait () at socket.c:842
#3 0x0804fcee in event_thread (blocked_=0xbf7fe490) at transcode.c:276
#4 0x00e4d80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5 0x0032a8de in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xa4766b70 (LWP 15605)):
#0 0x00e94422 in __kernel_vsyscall ()
#1 0x00e51e15 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x08068077 in aframe_reserve () at framebuffer.c:1048
#3 0x08066514 in process_audio_frame (_vob=0x882a008) at frame_threads.c:235
#4 0x00e4d80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5 0x0032a8de in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb778aae0 (LWP 15598)):
#0 0x00e94422 in __kernel_vsyscall ()
#1 0x00e51e15 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x08067cd0 in aframe_retrieve () at framebuffer.c:889
#3 0x08064f16 in encoder_acquire_aframe (buf=0x80c5574, vob=0x882a008) at encoder-buffer.c:274
#4 0x080644df in tc_encoder_loop (vob=0x882a008, frame_first=0, frame_last=2147483647) at encoder.c:1374
#5 0x08050161 in transcode_mode_default (vob=0x882a008) at transcode.c:466
#6 0x08057464 in main (argc=32, argv=0xbf7fe704) at transcode.c:2740

Revision history for this message
Radu Cristescu (radu.c) wrote :

From the log:

[framebuffer.c] (V|retrieve) requesting a new video frame
[framebuffer.c] got a new video frame reference: 0x9790f18
[encoder-buffer.c] got frame 0x9790f18 (id=1251)
[framebuffer.c] (A|retrieve) requesting a new audio frame
[framebuffer.c] (A|retrieve) audio frame not ready, waiting
[framebuffer.c] retrieve: null=10 empty=0 wait=0 locked=0 ready=0
[transcode] (sighandler) SIGTERM received
[framebuffer.c] (A|reserve) audio wait just ended
[frame_threads.c] audio interrupted: exiting!
[frame_threads.c] audio stream end: got, so exiting!
[framebuffer.c] (A|retrieve) audio wait just ended
[encoder.c] warning: failed to acquire next raw audio frame
[encoder.c] export terminated - buffer(s) empty
[transcode] flushing 1358 audio bytes
[encoder.c] encoder closed
[decoder.c] cancelling the import threads
[decoder.c] video thread exit (ret_code=0) (status_code=0)
[decoder.c] audio thread exit (ret_code=0) (status_code=-1)

Revision history for this message
Radu Cristescu (radu.c) wrote :

That SIGTERM is mine. I sent it.

Revision history for this message
Alessio Treglia (quadrispro) wrote :

Hi,

thanks for the report.

Could you try to reproduce this with the latest upstream release available in Quantal?

Changed in transcode (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for transcode (Ubuntu) because there has been no activity for 60 days.]

Changed in transcode (Ubuntu):
status: Incomplete → Expired
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.