Bug#601171: libgnome-speech7: 100% cpu usage

Samuel Thibault sthibault at debian.org
Sun Oct 24 00:02:56 UTC 2010


Package: libgnome-speech7
Version: 1:0.4.25-2
Severity: important
Tags: patch

festival-synthesis-driver keeps eating cpu in some conditions due to a
closed socket:

poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN|POLLPRI}, {fd=10, events=POLLIN|POLLPRI}, {fd=9, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN}, {fd=13, events=POLLIN}], 7, 44) = 1 ([{fd=15, revents=POLLHUP}])
poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN|POLLPRI}, {fd=10, events=POLLIN|POLLPRI}, {fd=9, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN}, {fd=13, events=POLLIN}], 7, 44) = 1 ([{fd=15, revents=POLLHUP}])
poll([{fd=5, events=POLLIN}, {fd=7, events=POLLIN|POLLPRI}, {fd=10, events=POLLIN|POLLPRI}, {fd=9, events=POLLIN|POLLPRI}, {fd=11, events=POLLIN|POLLPRI}, {fd=15, events=POLLIN}, {fd=13, events=POLLIN}], 7, 44) = 1 ([{fd=15, revents=POLLHUP}])
etc.

it doesn't handle the EOF case of its sockets, see attached patchs.

Samuel

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.36 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libgnome-speech7 depends on:
ii  libbonobo2-0               2.24.3-1      Bonobo CORBA interfaces library
ii  libc6                      2.11.2-6      Embedded GNU C Library: Shared lib
ii  libespeak1                 1.43.03-2     A multi-lingual software speech sy
ii  libglib2.0-0               2.24.2-1      The GLib library of C routines
ii  liborbit2                  1:2.14.18-0.1 libraries for ORBit2 - a CORBA ORB

Versions of packages libgnome-speech7 recommends:
ii  festival                 1:2.0.95~beta-2 General multi-lingual speech synth

libgnome-speech7 suggests no packages.

-- no debconf information

-- 
Samuel Thibault <samuel.thibault at fnac.net>
"...[Linux's] capacity to talk via any medium except smoke signals."
(By Dr. Greg Wettstein, Roger Maris Cancer Center)
-------------- next part --------------
--- ./drivers/festival/festivalsynthesisdriver.c.original	2010-10-24 01:53:20.000000000 +0200
+++ ./drivers/festival/festivalsynthesisdriver.c	2010-10-24 01:57:12.000000000 +0200
@@ -928,7 +928,8 @@
 {
         g_assert (IS_FESTIVAL_SYNTHESIS_DRIVER (d) && ack && d->channel_sock);
 
-	g_io_channel_read_line (d->channel_sock, ack, NULL, NULL, NULL);
+	if (g_io_channel_read_line (d->channel_sock, ack, NULL, NULL, NULL) == G_IO_STATUS_EOF)
+		festival_synthesis_driver_stop (d);
 }
 
 
@@ -938,7 +939,8 @@
 {
         g_assert (IS_FESTIVAL_SYNTHESIS_DRIVER (d) && ack && d->channel_pipe);
 
-	g_io_channel_read_line (d->channel_pipe, ack, NULL, NULL, NULL);
+	if (g_io_channel_read_line (d->channel_pipe, ack, NULL, NULL, NULL) == G_IO_STATUS_EOF)
+		festival_synthesis_driver_stop (d);
 }
 
 


More information about the pkg-gnome-maintainers mailing list