Your message dated Sat, 31 May 2008 14:47:07 +0000 with message-id <[EMAIL PROTECTED]> and subject line Bug#478991: fixed in vorbis-tools 1.2.0-4 has caused the Debian Bug report #478991, regarding vorbis-tools: ogg123 hangs and takes 100% of the cpu when outputting to a pipe that has been closed. to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [EMAIL PROTECTED] immediately.) -- 478991: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=478991 Debian Bug Tracking System Contact [EMAIL PROTECTED] with problems
--- Begin Message ---Package: vorbis-tools Version: 1.2.0-1 Severity: normal Tags: patch My test is: ./ogg123 -d wav -f - test.ogg | less then press q to quit less. Ogg123 will hang and start taking 100% of the CPU. The only way to stop it is "kill -9". I have 2 patches that fix the problem: Patch #1: stop-eating-my-cpu.patch: This fixes the main hanging/cpu spinning problem. Patch #2: dont-decode-after-pipe-closes.patch: This adds a return value to buffer_submit_data() so that ogg123 knows when the buffer has shut down due to an error. Without this it doesn't hang, but it continues to decode the input even though there's no place to write it to. I have attempted to submit these patches to the upstream mailing list. We'll see if they go through. -David -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.24-1-686 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/bash Versions of packages vorbis-tools depends on: ii libao2 0.8.8-4 Cross Platform Audio Output Librar ii libc6 2.7-10 GNU C Library: Shared libraries ii libcurl3-gnutls 7.18.0-1+b1 Multi-protocol file transfer libra ii libflac8 1.2.1-1.2 Free Lossless Audio Codec - runtim ii libkrb53 1.6.dfsg.3~beta1-4 MIT Kerberos runtime libraries ii libogg0 1.1.3-3 Ogg Bitstream Library ii libspeex1 1.1.12-3 The Speex Speech Codec ii libvorbis0a 1.2.0.dfsg-3 The Vorbis General Audio Compressi ii libvorbisenc2 1.2.0.dfsg-3 The Vorbis General Audio Compressi ii libvorbisfile3 1.2.0.dfsg-3 The Vorbis General Audio Compressi vorbis-tools recommends no packages. -- no debconf informationIndex: ogg123/buffer.c =================================================================== --- ogg123.orig/buffer.c 2008-05-01 19:21:12.000000000 -0700 +++ ogg123/buffer.c 2008-05-01 19:32:16.000000000 -0700 @@ -207,7 +207,7 @@ /* This test is safe since curfill will never decrease and eos will never be unset. */ - while ( !(buf->eos && buf->curfill == 0)) { + while ( !(buf->eos && buf->curfill == 0) && !buf->abort_write) { if (buf->cancel_flag || sig_request.cancel) break; @@ -251,6 +251,11 @@ write_amount == buf->curfill ? buf->eos : 0, buf->write_arg); + if (!write_amount) { + DEBUG("Error writing to the audio device. Aborting."); + buffer_abort_write(buf); + } + LOCK_MUTEX(buf->mutex); buf->curfill -= write_amount; @@ -746,7 +751,7 @@ pthread_cleanup_push(buffer_mutex_unlock, buf); LOCK_MUTEX(buf->mutex); - while (!empty) { + while (!empty && !buf->abort_write) { if (buf->curfill > 0) { DEBUG1("Buffer curfill = %ld, going back to sleep.", buf->curfill);Index: ogg123/buffer.c =================================================================== --- ogg123.orig/buffer.c 2008-05-01 19:32:16.000000000 -0700 +++ ogg123/buffer.c 2008-05-01 19:32:34.000000000 -0700 @@ -283,7 +283,7 @@ } -void submit_data_chunk (buf_t *buf, char *data, size_t size) +int submit_data_chunk (buf_t *buf, char *data, size_t size) { long buf_write_pos; /* offset of first available write location */ size_t write_size; @@ -346,6 +346,7 @@ pthread_cleanup_pop(0); DEBUG("Exit submit_data_chunk"); + return !buf->abort_write; } @@ -520,8 +521,8 @@ /* --- Data buffering functions --- */ -void buffer_submit_data (buf_t *buf, char *data, long nbytes) { - submit_data_chunk (buf, data, nbytes); +int buffer_submit_data (buf_t *buf, char *data, long nbytes) { + return submit_data_chunk (buf, data, nbytes); } size_t buffer_get_data (buf_t *buf, char *data, long nbytes) Index: ogg123/buffer.h =================================================================== --- ogg123.orig/buffer.h 2008-05-01 19:30:59.000000000 -0700 +++ ogg123/buffer.h 2008-05-01 19:32:34.000000000 -0700 @@ -110,7 +110,7 @@ void buffer_thread_kill (buf_t *buf); /* --- Data buffering functions --- */ -void buffer_submit_data (buf_t *buf, char *data, long nbytes); +int buffer_submit_data (buf_t *buf, char *data, long nbytes); size_t buffer_get_data (buf_t *buf, char *data, long nbytes); void buffer_mark_eos (buf_t *buf); Index: ogg123/http_transport.c =================================================================== --- ogg123.orig/http_transport.c 2008-05-01 19:30:59.000000000 -0700 +++ ogg123/http_transport.c 2008-05-01 19:32:34.000000000 -0700 @@ -68,7 +68,8 @@ if (myarg->cancel_flag || sig_request.cancel) return 0; - buffer_submit_data(myarg->buf, ptr, size*nmemb); + if (!buffer_submit_data(myarg->buf, ptr, size*nmemb)) + return 0; if (myarg->cancel_flag || sig_request.cancel) return 0; Index: ogg123/ogg123.c =================================================================== --- ogg123.orig/ogg123.c 2008-05-01 19:30:59.000000000 -0700 +++ ogg123/ogg123.c 2008-05-01 19:35:12.000000000 -0700 @@ -702,9 +702,13 @@ do { if (nthc-- == 0) { - if (audio_buffer) - buffer_submit_data(audio_buffer, convbuffer, ret); - else + if (audio_buffer) { + if (!buffer_submit_data(audio_buffer, convbuffer, ret)) { + status_error(_("Error: buffer write failed.\n")); + eof = eos = 1; + break; + } + } else audio_play_callback(convbuffer, ret, eos, &audio_play_arg); nthc = options.nth - 1;
--- End Message ---
--- Begin Message ---Source: vorbis-tools Source-Version: 1.2.0-4 We believe that the bug you reported is fixed in the latest version of vorbis-tools, which is due to be installed in the Debian FTP archive: vorbis-tools_1.2.0-4.diff.gz to pool/main/v/vorbis-tools/vorbis-tools_1.2.0-4.diff.gz vorbis-tools_1.2.0-4.dsc to pool/main/v/vorbis-tools/vorbis-tools_1.2.0-4.dsc vorbis-tools_1.2.0-4_i386.deb to pool/main/v/vorbis-tools/vorbis-tools_1.2.0-4_i386.deb A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [EMAIL PROTECTED], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Clint Adams <[EMAIL PROTECTED]> (supplier of updated vorbis-tools package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [EMAIL PROTECTED]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.8 Date: Sat, 31 May 2008 10:23:45 -0400 Source: vorbis-tools Binary: vorbis-tools Architecture: source i386 Version: 1.2.0-4 Distribution: unstable Urgency: medium Maintainer: Debian Xiph.org Maintainers <[EMAIL PROTECTED]> Changed-By: Clint Adams <[EMAIL PROTECTED]> Description: vorbis-tools - several Ogg Vorbis tools Closes: 288687 478991 Changes: vorbis-tools (1.2.0-4) unstable; urgency=medium . * Add upstream_r14957-ogg123_stop_decode_on_closed_buffer.diff. closes: #478991. * Add upstream_r14982-ogg123_man_page_http_only.diff to clarify that -b option is for HTTP streams only. closes: #288687. Checksums-Sha1: 3fe04ab69b2925101f25427ccce21e141c5cad1a 1298 vorbis-tools_1.2.0-4.dsc ffe4ecbd9a80c99f4089f0f56e17a08e3d30ed7d 34965 vorbis-tools_1.2.0-4.diff.gz 962848a31d27871ba71c38968da29ada8dc28645 189374 vorbis-tools_1.2.0-4_i386.deb Checksums-Sha256: f8dea1f8603ba7befefa4d5543a43413739732e53d8b6ef4910133bf65b67248 1298 vorbis-tools_1.2.0-4.dsc e708a80719f51ac6a7a400f83c1b4bac59b216975b43f0e2204479d412d4d7a0 34965 vorbis-tools_1.2.0-4.diff.gz 1ab184ead44ac3cd166f46d008f97b8c978ce572ec2599f2c04997eb0f29ec0b 189374 vorbis-tools_1.2.0-4_i386.deb Files: e0b1761c3b31742c0e9ff0eee9ada87c 1298 sound optional vorbis-tools_1.2.0-4.dsc 82cf1ee1c7d4effe091a1713a74d5df3 34965 sound optional vorbis-tools_1.2.0-4.diff.gz 2d48499af85ca8e05dc5ae0a9c0f3042 189374 sound optional vorbis-tools_1.2.0-4_i386.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Debian! iD8DBQFIQWH25m0u66uWM3ARAuy3AJ9hMemAuhrBN+nCj3vBlXVvgmD9WQCgq/8R hv6PFmJ2gWTv5WYIe0AbED0= =CLEB -----END PGP SIGNATURE-----
--- End Message ---

