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

Bug#859926: speechd-up: fails to install



Hi,

On 2017-04-21 20:08, Paul Gevers wrote:
>> I enabled this line in /etc/speech-dispatcher/speechd.conf:
>> CustomLogFile "protocol" "/var/log/speech-dispatcher/speech-dispatcher-protocol.log"
>>
>> /var/log/speech-dispatcher/speech-dispatcher-protocol.log stays empty
>> when using service (my VM is still using sysvinit-core now), but when I
>> use the usual start-stop-daemon command, I get this log:
>
> May it be that starting daemons via service may not have $HOME set? It
> occurs to me that when I start speechd-up manually I see this with "ps
> aux" (notice the socket location):
> root     22182  0.0  0.0 174708  2224 ?        Ssl  19:47   0:00
> /usr/bin/speech-dispatcher --spawn --communication-method unix_socket
> --socket-path /root/.cache/speech-dispatcher/speechd.sock
>
> By the way, with "service" it seems that configuration of
> speech-dispatcher is ignored. I find the logging in
> /root/.cache/speech-dispatcher... where it now also records what goes
> wrong..
> [Fri Apr 21 20:04:39 2017 : 549750] speechd: Error [speechd.c:665]:No
> speech output modules were loaded - aborting...

Good catch with the socket and log files. There's indeed no $HOME in
the init.d env. It's just LC_*/LANG, PATH, PWD, TERM; but adding HOME
doesn't help as far as I can tell.
$XDG_RUNTIME_DIR as referenced in /etc/speech-dispatcher/speechd.conf
isn't set in either env.

Looking at the log files, esp.
/root/.cache/speech-dispatcher/log/speech-dispatcher.log, I noticed
that running "sudo /etc/init.d/speechd-up start" works without errors.
Please note: I do not have and use systemd right now.
With systemd in use, this won't work, systemd catches the init script.
Running "sudo service speechd-up start" fails and this log shows a lot
of pulseaudio errors with the sub logs all logging this line:
pulse.c: pa_simple_new() failed: Connection refused

Looks like we're chasing a pulseaudio<->speech-dispatcher bug now. Fun.
Removing pulseaudio and setting AudioOutputMethod to alsa in
/etc/speech-dispatcher/speechd.conf makes speechd-up work.
After rebooting I can hear parts of the boot log messages, and:
$ sudo service speechd-up status
[ ok ] Checking status of Interface between speakup and speech-dispatcher: speechd-up running.

The directories are different when starting at boot:
$ ps aux | grep "speec\h"
root      1479  0.0  0.0  99264  2164 ?        Ssl  Apr21   0:00 /usr/bin/speechd-up -l1
root      1506  0.0  0.1  59768  4628 ?        SLl  Apr21   0:00 /usr/lib/speech-dispatcher-modules/sd_dummy /etc/speech-dispatcher/modules/dummy.conf
root      1533  0.0  0.1  59784  4612 ?        SLl  Apr21   0:00 /usr/lib/speech-dispatcher-modules/sd_generic /etc/speech-dispatcher/modules/generic.conf
root      1541  0.1  0.4 277456 10328 ?        SLl  Apr21   0:01 /usr/lib/speech-dispatcher-modules/sd_espeak-ng /etc/speech-dispatcher/modules/espeak-ng.conf
root      1586  0.0  0.0 173032  2212 ?        Ssl  Apr21   0:00 /usr/bin/speech-dispatcher --spawn --communication-method unix_socket --socket-path /.cache/speech-dispatcher/speechd.sock
$ sudo service speechd-up restart
[....] Restarting Interface between speakup and speech-dispatcher: speechd-upStopping speechd-up and unloading speakup modules...
[Sat Apr 22 00:02:55 2017] speechd: Configuration has been read from "/etc/speechd-up.conf"
Starting speechd-up...
To work, speechd-up needs speakup and speakup_soft modules.
They are loaded automatically. If you don't want, type
rmmod speakup speakup_soft
. ok
$ ps aux | grep "speec\h"
root      2170  0.0  0.1 105616  2744 ?        Ssl  00:02   0:00 /usr/bin/speechd-up -l1
root      2175  0.6  0.1  59776  4540 ?        SLl  00:02   0:00 /usr/lib/speech-dispatcher-modules/sd_dummy /etc/speech-dispatcher/modules/dummy.conf
root      2179  0.4  0.1  59788  4608 ?        SLl  00:02   0:00 /usr/lib/speech-dispatcher-modules/sd_generic /etc/speech-dispatcher/modules/generic.conf
root      2181  2.8  0.3 142088  8536 ?        SLl  00:02   0:00 /usr/lib/speech-dispatcher-modules/sd_espeak-ng /etc/speech-dispatcher/modules/espeak-ng.conf
root      2188  0.0  0.0 183144  2212 ?        Ssl  00:02   0:00 /usr/bin/speech-dispatcher --spawn --communication-method unix_socket --socket-path /root/.cache/speech-dispatcher/speechd.sock

Still a bit broken, but at least it's some progress.
At this stage, I think all these problems belong to speech-dispatcher.
I'll continue digging, but I I'll reset my vm after changing so much.

Just for the record:
I just found out that Jessie doesn't have any issues and the only
relevant changelog entry is "speechd-up.init: Fix startup/shutdown."
- well, for me it looks like the other way around.
Git commit: https://anonscm.debian.org/cgit/pkg-a11y/speechd-up.git/commit/?id=5db9503f13cdadbefb160846e53c8f141a7ee631
The errcode move is a legit bug fix.
STARTTIME might expose some bugs but isn't the root cause of anything.
Required-(Start|Stop) looks strange with the autospawn thing of
speech-dispatcher. But deleting speech-dispatcher from
Required-(Start|Stop) won't do anything - speech-dispatcher won't run
anyway unless enabled to do so in /etc/default/speech-dispatcher.
That's a dead-end, speechd-up doesn't seem to be the primary culprit.


Reply to: