Ticket #668 (reopened defect)

Opened 2 years ago

Last modified 2 years ago

problem: fc.11: emacs + eflite does not work.

Reported by: rabbit Owned by: lennart
Milestone: Component: daemon
Keywords: eflite emacspeak flite alsa Cc: rabbitko@…

Description

- just to isolate problem, I decided to run emacs+emacspeak+eflite from console.

- there was no problem running the same version of flite/eflite/emacs/emacspeak in fc9.

- pulseaudio binary works of course.

- problem exists only in (emacs+emacspeak)+(flite+eflite) case. When flite+eflite runs alone from commandline, and reads data let's say from standard input, there is no problem. how to run it to read from stdin?

prompt$ ./eflite q {hallo world} d

#now You should hear "hallo world".

- problem comes from eflite server thread. client keeps on putting data to socket, while server stops on strace:

futex(0x454edf54, FUTEX_WAIT_PRIVATE, 43, NULL

or more detailed gdb (I noticed 2 cases).

gdb: (gdb) bt #1

#0 0x00e91422 in kernel_vsyscall ()

#1 0x008c2fa5 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:122

#2 0x005cb2ed in pa_cond_wait (c=0xb750c988, m=0xb750c930) at pulsecore/mutex-posix.c:139

#3 0x003c1a5e in pa_threaded_mainloop_wait (m=0xb750c838) at pulse/thread-mainloop.c:201

#4 0x00113ae3 in pulse_wait_operation () from /usr/lib/alsa-lib/libasound_module_pcm_pulse.so

#5 0x00112d88 in snd_config_iterator_end () at conf.c:3815

#6 0x03e8f7d9 in snd_pcm_ioplug_drop (pcm=0xb750ef20) at pcm_ioplug.c:464

#7 0x03e45281 in snd_pcm_drop (pcm=0xb750ef20) at pcm.c:1091

#8 0x009896f5 in audio_drain_alsa (ad=0xb7508698) at au_alsa.c:299

#9 0x0098a36d in audio_drain (ad=0xb7508698) at audio.c:213

#10 0x0804be5a in s_clear (s=0x80515e0) at fs.c:884

#11 0x0804cda0 in parse (client=0x8e36bd0, buf=0x8e36ce8 "s") at es.c:590

#12 0x0804d197 in handle (client=0x8e36bd0) at es.c:673

#13 0x0804dc3d in main (argc=1, argv=0xbfdbded4) at es.c:910

(gdb) bt #2

#0 0x00ff0422 in kernel_vsyscall ()

#1 0x008c6936 in pause_nocancel () from /lib/libpthread.so.0

#2 0x008c0ba4 in pthread_mutex_lock_full (mutex=0xb690c930) at pthread_mutex_lock.c:316

#3 0x005cac5a in pa_mutex_lock () from /usr/lib/libpulsecommon-0.9.15.so

#4 0x003c1702 in pa_threaded_mainloop_lock () from /usr/lib/libpulse.so.0

#5 0x00112d16 in snd_config_iterator_end () at conf.c:3815

#6 0x03e8f7d9 in snd_pcm_ioplug_drop (pcm=0xb690e480) at pcm_ioplug.c:464

#7 0x03e45281 in snd_pcm_drop (pcm=0xb690e480) at pcm.c:1091

#8 0x03e4b550 in snd_pcm_close (pcm=0xb690e480) at pcm.c:695

#9 0x009899fe in audio_close_alsa (ad=0xb69084e8) at au_alsa.c:193

#10 0x0098a831 in audio_close (ad=0xb69084e8) at audio.c:81

#11 0x0804a119 in close_audiodev () at fs.c:503

#12 0x0804c058 in s_clear (s=0x80515e0) at fs.c:910

#13 0x0804cda0 in parse (client=0x8739bd0, buf=0x8739ce8 "s") at es.c:590

#14 0x0804d197 in handle (client=0x8739bd0) at es.c:673

#15 0x0804dc3d in main (argc=1, argv=0xbf8b3804) at es.c:910 (gdb)

To get this trace I used the fact that eflite stops working after some time, so I could attach gdb to running process.

some info on software.

emacs 23.1.1 compiled by me.

emacspeak 30.0 compiled by me.

flite-1.3.13.fc11 (built by fedora).

eflite 0.4.2 built by me. efltite module taken from CVSROOT=:pserver:anonymous@eflite.cvs.sourceforge.net:/cvsroot/eflite. how to build: autoconf && ./configure --with-audio=alsa && make. Don't forget to install alsa-lib-devel-1.0.21-3.fc11.i586 (/usr/include/sys/asoundlib.h must exist).

to run emacspeak with eflite edit /usr/local/bin/emacspeak:

...... ......

# add 2 following lines:

DTK_PROGRAM=/path/to/eflite

export DTK_PROGRAM

EMACS_UNIBYTE=1

export EMACS_UNIBYTE

exec emacs -q -l /usr/local/share/emacs/site-lisp/emacspeak/lisp/emacspeak-setup.el $INITSTR $CL_ALL

then run /usr/local/bin/emacspeak.

If You need me provide some more information, just email me. best regards, Michal

Change History

Changed 2 years ago by rabbit

  • owner changed from lennart to rabbit

I just noticed that notes to version "2009-09-10: PulseAudio 0.9.16", has info:

threaded-mainloop: loop around pa_cond_wait() invocation in pa_threaded_mainloop_signal()

my trace contains this problem. and fc11 runs pulseaudio 0.9.15, so I first will check if problem occurs with 0.9.16, then I will let You know. Please don't bother with this problem. best regards

Changed 2 years ago by rabbit

  • cc rabbitko@… added
  • owner changed from rabbit to lennart

Hallo Lennart.

In fc12 problem comes back unfortunatelly. eflite deamon thread gets stuck in following stack trace:

(gdb) bt #0 0x00bd0416 in kernel_vsyscall () #1 0x0092cc45 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:122 #2 0x0057eb9d in pa_cond_wait () from /usr/lib/libpulsecommon-0.9.19.so #3 0x0052e9c0 in pa_threaded_mainloop_wait () from /usr/lib/libpulse.so.0 #4 0x004fdb03 in pulse_wait_operation () from /usr/lib/alsa-lib/libasound_module_pcm_pulse.so #5 0x004fcda8 in snd_config_iterator_end () at conf.c:3815 #6 0x05bcad59 in snd_pcm_ioplug_drop (pcm=<value optimized out>) at pcm_ioplug.c:464 #7 0x05b80672 in snd_pcm_drop (pcm=<value optimized out>) at pcm.c:1091 #8 0x008da726 in audio_drain_alsa (ad=0xb6c005b0) at au_alsa.c:299 #9 0x008db38e in audio_drain (ad=0xb6c005b0) at audio.c:213 #10 0x0804be59 in s_clear (s=0x80502c0) at fs.c:884 #11 0x0804cd9d in parse (client=0x994fbd0, buf=0x994e008 "s") at es.c:590 #12 0x0804d194 in handle (client=0x994fbd0) at es.c:673 #13 0x0804dc3a in main (argc=2, argv=0xbfce9c44) at es.c:910 (gdb)

all packages, except eflite come from fc12 distribution. Especially I run: $ rpm -qi pulseaudio Name : pulseaudio Relocations: (not relocatable) Version : 0.9.19 Vendor: Fedora Project Release : 2.fc12 Build Date: Wed 04 Nov 2009 09:16:58 PM CET Install Date: Mon 09 Nov 2009 06:02:57 AM CET Build Host: x86-1.fedora.phx.redhat.com Group : System Environment/Daemons Source RPM: pulseaudio-0.9.19-2.fc12.src.rpm

Below is detailed instruction on how I reproduce the problem:

prompt# yum install emacs emacspeak flite flite-devel alsa-lib-devel edit /usr/bin/emacspeak (> - add; < - remove): .... ....

export DTK_PROGRAM=/usr/src/eflite-cvs/eflite/eflite

EMACS_UNIBYTE=1 export EMACS_UNIBYTE < exec emacs -q -l /usr/share/emacs/site-lisp/emacspeak/lisp/emacspeak-setup.el $INITSTR $CL_ALL

exec emacs --eval '(setq dtk-quiet t)' -q -l /usr/share/emacs/site-lisp/emacspeak /lisp/emacspeak-setup.el $INITSTR $CL_ALL

--- end of /usr/bin/emacspeak file.

"--eval '(setq dtk-quiet t)'" is added to defer initialization of speech server so that one could attach debugger before eflite gets stuck.

prompt# mkdir /usr/src/eflite-cvs prompt# cd /usr/src/eflite-cvs prompt# export CVSROOT=:pserver:anonymous@eflite.cvs.sourceforge.net:/cvsroot/eflite prompt# cvs get eflite prompt# cd eflite edit Makefile: < CFLAGS = -g -O2 -Wall

CFLAGS = -g -O0 -Wall

< #CFLAGS+= -DDEBUG=2

CFLAGS+= -DDEBUG=2

-- end of Makefile "-DDEBUG=2" turns on putting information to ~/es.log

prompt# ./configure --with-audio=alsa prompt# make

to test if it works fine: login-user-prompt$ ./eflite q { hello } d login-user-prompt$

You should hear "hello".

This is all about compiling. Now I'll write how to reproduce an error.

login-user-prompt$ /usr/src/eflite-cvs/eflite/eflite -D Please attach with GDB to this process and let it run.

"eflite -D" command creates daemon process (the one that gets stuck). It will also create socket: login-user-prompt$ ll /tmp/es.socket srw-rw-rw-. 1 me group 0 2009-11-23 22:00 /tmp/es.socket

this socket is used to pass request by eflite client process (issued by emacspeak).

login-user-prompt$ /usr/bin/emacspeak

emacs will start eflite client process. YOu will see new "eflite" process in "ps xauwwwuf". Because I added "--eval '(setq dtk-quiet t)'" to /usr/bin/emacspeak, it will not start talking immediatelly.

While in emacs put: Ctrl-u Esc-x dtk-toggle-quiet <Enter>

this command will enable speech. You will probably hear some words, which is ok. Now try to type some words. 2 or 3 characters will probably be spoken but that's all! eflite deamon gets stuck. Please stop eflite daemon in GDB and issue "bt" command.

That's all what I was able to do with this problem. I am of course willing to help.

Because using pulseaudio 0.9.19 didn't help I decided to rewrite defect back to You. I hope I didn't do the mistake.

Best regards, Michal.

Changed 2 years ago by rabbit

  • status changed from new to closed
  • resolution set to elsewhere

I'm still trying to solve the problem. it does not have anything common with pulseaudio. the same happens, when I run emacs under console, where no pulse audio is run. For now I am closing it "elsewhere" status. best regards

Changed 2 years ago by rabbit

  • status changed from closed to reopened
  • resolution elsewhere deleted

I was wrong claiming that the problem has nothing common with pulseaudio. I checked once more pulseaudio while working in runlevel 3, and pulseaudio process was working there.

Workaround for my problem is just to uninstall alsa-plugins-pulseaudio. THen everything works fine.

I of course do not claim that the problem is in pulseaudio; I only claim that it is related to pulseaudio. I do not know where is the problem.

I additionally informed eflite team about this problem.

best regards Michal

Note: See TracTickets for help on using tickets.