[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#769169: marked as done (unblock: vorbis-tools/1.4.0-5 (fix non-RC hang bug in ogg123))



Your message dated Wed, 12 Nov 2014 07:20:13 +0100
with message-id <5462FC1D.9090105@thykier.net>
and subject line Re: Bug#769169: unblock: vorbis-tools/1.4.0-5 (fix non-RC hang bug in ogg123)
has caused the Debian Bug report #769169,
regarding unblock: vorbis-tools/1.4.0-5 (fix non-RC hang bug in ogg123)
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 owner@bugs.debian.org
immediately.)


-- 
769169: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769169
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
User: release.debian.org@packages.debian.org
Usertags: unblock
Severity: normal

Please unblock package vorbis-tools version 1.4.0-5 to fix a hang bug in
the ogg123 command line tool.  As we already was doing an update, we
also included a patch to clarify the documentation on command line
options -f and -d and improve the error message when they are used
incorrectly.

This is the source code changes since the version in testing.

diff --git a/debian/changelog b/debian/changelog
index 1c39385..8c41b6f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+vorbis-tools (1.4.0-5) unstable; urgency=low
+
+  [ Martin Steghöfer ]
+  * Fix ogg123 freeze when interrupting  at End-Of-Stream
+    (Closes: #307325).
+  * Make it clear in the ogg123 manual page and error message that -f
+    needs a previous -d (Closes: #359948).
+
+ -- Petter Reinholdtsen <pere@debian.org>  Tue, 11 Nov 2014 21:44:40 +0100
+
 vorbis-tools (1.4.0-4) unstable; urgency=low
 
   * Make sure vorbistagedit quote command line arguments when
diff --git a/debian/patches/series b/debian/patches/series
index 9b6fad0..34c6b26 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,5 @@ dont-corrupt-stdout.patch
 quality-check-first-scale-next.patch
 format-security.patch
 fix_xiph_url.diff
+fix-ogg123-freeze-when-interrupting-at-end-of-stream.patch
+documentation-of-link-between-f-and-d-flag.patch
diff --git a/debian/patches/documentation-of-link-between-f-and-d-flag.patch b/debian/patches/documentation-of-link-between-f-and-d-flag.patch
new file mode 100644
index 0000000..d2b2ff7
--- /dev/null
+++ b/debian/patches/documentation-of-link-between-f-and-d-flag.patch
@@ -0,0 +1,40 @@
+From: =?utf-8?q?Martin_Stegh=C3=B6fer?= <martin@steghoefer.eu>
+Date: Wed, 29 Oct 2014 20:06:34 +0100
+Subject: Make it clear in documentation that -f needs a previous -d.
+
+Bug-Debian: https://bugs.debian.org/359948
+Forwarded: https://trac.xiph.org/ticket/1679
+
+The -f option to specify an output file name works only if a file device has previously been specified using the -d option. Some parts of the documentation don't make it very explicit that -f needs -d and that the -d option has to precede the -f option.
+---
+ ogg123/cmdline_options.c | 2 +-
+ ogg123/ogg123.1          | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/ogg123/cmdline_options.c b/ogg123/cmdline_options.c
+index d663cc6..619b4f5 100644
+--- a/ogg123/cmdline_options.c
++++ b/ogg123/cmdline_options.c
+@@ -140,7 +140,7 @@ int parse_cmdline_options (int argc, char **argv,
+ 	    exit(1);
+ 	  }
+ 	} else {
+-	  status_error(_("=== Cannot specify output file without specifying a driver.\n"));
++	  status_error(_("=== Cannot specify output file without previously specifying a driver.\n"));
+ 	  exit (1);
+ 	}
+ 	break;
+diff --git a/ogg123/ogg123.1 b/ogg123/ogg123.1
+index 160a876..7b434c6 100644
+--- a/ogg123/ogg123.1
++++ b/ogg123/ogg123.1
+@@ -69,7 +69,8 @@ Specify output device.  See
+ .B DEVICES
+ section for a list of devices.  Any number of devices may be specified.
+ .IP "-f filename, --file filename"
+-Specify output file for file devices.  The filename "-" writes to standard
++Specify output file for a file device previously specified with
++--device.  The filename "-" writes to standard
+ out.  If the file already exists,
+ .B ogg123
+ will overwrite it.
diff --git a/debian/patches/fix-ogg123-freeze-when-interrupting-at-end-of-stream.patch b/debian/patches/fix-ogg123-freeze-when-interrupting-at-end-of-stream.patch
new file mode 100644
index 0000000..482f2a2
--- /dev/null
+++ b/debian/patches/fix-ogg123-freeze-when-interrupting-at-end-of-stream.patch
@@ -0,0 +1,76 @@
+From: =?utf-8?q?Martin_Stegh=C3=B6fer?= <martin@steghoefer.eu>
+Date: Tue, 28 Oct 2014 23:04:19 +0100
+Subject: Fix ogg123 freeze when interrupting at End-Of-Stream.
+
+Bug-Debian: https://bugs.debian.org/307325
+
+When arriving at the end of the input file, the main thread waits for
+the output thread to finish up the current buffer. If a cancellation
+signal arrives at that stage, this signal of an empty buffer never
+arrives because the output thread bails out before actually emptying
+the buffer.
+
+Fix:
+1.) Make sure the output thread wakes up the main thread when bailing
+out, so the main thread can go on, too.
+2.) When the main thread wakes up while waiting for an empty buffer,
+make sure it understands the situation (that there won't be an empty
+buffer because the replay has been cancelled) and doesn't go back to
+sleep.
+---
+ ogg123/buffer.c | 26 +++++++++++++++++++++++---
+ 1 file changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/ogg123/buffer.c b/ogg123/buffer.c
+index b09c9c9..73290e2 100644
+--- a/ogg123/buffer.c
++++ b/ogg123/buffer.c
+@@ -209,8 +209,18 @@ void *buffer_thread_func (void *arg)
+      never be unset. */
+   while ( !(buf->eos && buf->curfill == 0) && !buf->abort_write) {
+ 
+-    if (buf->cancel_flag || sig_request.cancel)
++    if (buf->cancel_flag || sig_request.cancel) {
++      /* signal empty buffer space, so the main
++         thread can wake up to die in peace */
++
++      DEBUG("Abort: Wake up the writer thread");
++      LOCK_MUTEX(buf->mutex);
++      COND_SIGNAL(buf->write_cond);
++      UNLOCK_MUTEX(buf->mutex);
++
++      /* abort this thread, too */
+       break;
++    }
+ 
+     DEBUG("Check for something to play");
+     /* Block until we can play something */
+@@ -227,8 +237,18 @@ void *buffer_thread_func (void *arg)
+ 
+     UNLOCK_MUTEX(buf->mutex);
+ 
+-    if (buf->cancel_flag || sig_request.cancel)
++    if (buf->cancel_flag || sig_request.cancel) {
++      /* signal empty buffer space, so the main
++         thread can wake up to die in peace */
++
++      DEBUG("Abort: Wake up the writer thread");
++      LOCK_MUTEX(buf->mutex);
++      COND_SIGNAL(buf->write_cond);
++      UNLOCK_MUTEX(buf->mutex);
++
++      /* abort this thread, too */
+       break;
++    }
+ 
+     /* Don't need to lock buffer while running actions since position
+        won't change.  We clear out any actions before we compute the
+@@ -756,7 +776,7 @@ void buffer_wait_for_empty (buf_t *buf)
+   pthread_cleanup_push(buffer_mutex_unlock, buf);
+ 
+   LOCK_MUTEX(buf->mutex);
+-  while (!empty && !buf->abort_write) {
++  while (!empty && !buf->abort_write && !buf->cancel_flag && !sig_request.cancel) {
+ 
+     if (buf->curfill > 0) {
+       DEBUG1("Buffer curfill = %ld, going back to sleep.", buf->curfill);

unblock vorbis-tools/1.4.0-5

-- System Information:
Debian Release: 7.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

--- End Message ---
--- Begin Message ---
On 2014-11-11 21:57, Petter Reinholdtsen wrote:
> 
> Package: release.debian.org
> User: release.debian.org@packages.debian.org
> Usertags: unblock
> Severity: normal
> 
> Please unblock package vorbis-tools version 1.4.0-5 to fix a hang bug in
> the ogg123 command line tool.  As we already was doing an update, we
> also included a patch to clarify the documentation on command line
> options -f and -d and improve the error message when they are used
> incorrectly.
> 
> [...]
> 

Unblocked, thanks.

~Niels

--- End Message ---

Reply to: