Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76364 - media-sound/timidity++ init doesn't fail if process dies
Summary: media-sound/timidity++ init doesn't fail if process dies
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-01 18:37 UTC by Stian Skjelstad
Modified: 2005-05-28 10:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Makes timidity++ exit with a non-zero exit-value if it failes to find alsa support (timidity++-2.13.2-alsaexitvalue.patch,20.90 KB, patch)
2005-01-01 18:44 UTC, Stian Skjelstad
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stian Skjelstad 2005-01-01 18:37:23 UTC
* If you miss the alsa support for sequencer
* If timitidy is not configured yet

the initscript starts with status ok at both these stages. The second one should be checked by init script and produce and error message to the console
Comment 1 Stian Skjelstad 2005-01-01 18:44:20 UTC
Created attachment 47343 [details, diff]
Makes timidity++ exit with a non-zero exit-value if it failes to find alsa support

This was written in half-sleep, be warned


But it is not enough for the way the current init-script starts it to detect
the fault. But this patch works with the -iAD flags, and why not use the -iAD
flag? Is  it so terrible to let it deamonize itself and let it creat it's own
pid file?
Comment 2 Alexandru Toma 2005-02-03 09:54:35 UTC
I don't know if this is the same bug, but when I try to restart the timidity init script I get this:

cloud root # /etc/init.d/timidity restart
 * Stopping Timidity...
start-stop-daemon: warning: failed to kill 10070: No such process         [ !! ]

The script starts just fine at boot.


Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r1 i686)
=================================================================
System uname: 2.6.9-gentoo-r1 i686 AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Nov  5 2004, 15:16:07)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.8.1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://ftp.roedu.net/pub/mirrors/gentoo.org http://gentoo.oregonstate.edu"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync1.ro.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowex X aalib alsa apache apm avi bitmap-fonts cdr crypt cups curl encode f77 faac faad fam flac font-server foomaticdb fortran gd geoip gif gphoto2 gpm gtk2 guile imagemagick imlib imlib2 jikes jpeg lcms libcaca libwww lzo mad matroska mikmod mmx mmx2 mng motif mpeg mysql ncurses network nls no_wxgtk1 oggvorbis opengl pam png python quicktime readline rtc ruby sdl slang spell sse ssl tcpd tga theora tiff truetype truetype-fonts type1-fonts xchatdccserver xml2 xmms xprint xv xvid zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS


cloud root # etcat -v timidity++
[ Results for search key           : timidity++ ]
[ Candidate applications found : 4 ]

 Only printing found installed programs.

*  media-sound/timidity++ :
        [   ] 2.12.0-r3 (0)
        [   ] 2.13.0-r1 (0)
        [M~ ] 2.13.0-r2 (0)
        [  I] 2.13.2 (0)
Comment 3 Stian Skjelstad 2005-02-03 10:00:49 UTC
It is.

You haven't configured it to use a soundfont yet probably.
Comment 4 Alexandru Toma 2005-02-03 10:12:56 UTC
> You haven't configured it to use a soundfont yet probably.

Actually, I have timidity-eawpatches installed and working

cloud root # etcat -v timidity-eawpatches
[ Results for search key           : timidity-eawpatches ]
[ Candidate applications found : 3 ]

 Only printing found installed programs.

*  media-sound/timidity-eawpatches :
        [   ] 12-r2 (0)
        [   ] 12-r3 (0)
        [  I] 12-r4 (0)
Comment 5 Stian Skjelstad 2005-02-03 10:17:24 UTC
Have you enabled the patch-set? It is not enough to install it.

# timidity-update -g -s eawpatches
# ls /usr/share/timidity/ -l
total 8
lrwxr-xr-x   1 root root   30 Feb  3 19:19 current -> /usr/share/timidity/eawpatches
drwxr-xr-x  11 root root 8192 Jan  2 02:15 eawpatches
lrwxrwxrwx   1 root root   17 Jan  9 14:37 timidity.cfg -> /etc/timidity.cfg


and you should be ready to go
Comment 6 Alexandru Toma 2005-02-03 10:25:10 UTC
> Have you enabled the patch-set? It is not enough to install it.

Yes, I know. When I said "installed and working" I meant that I have also enabled it. I have been getting that timidity error ever since I emerged it.. I just didn't bother to report it until now.
Comment 7 Stian Skjelstad 2005-02-03 10:28:20 UTC
Do you have alsa support then?

timidity -iA

is the command the init-script tries to use.
Comment 8 Alexandru Toma 2005-02-03 10:45:03 UTC
cloud root # timidity -iA
Requested buffer size 32768, fragment size 8192
ALSA pcm 'default' set buffer size 32768, period size 8192 bytes
TiMidity starting in ALSA server mode
ALSA lib seq_hw.c:446:(snd_seq_hw_open) open /dev/snd/seq failed: No such file or directory
error in snd_seq_open

I have the following compiled in the kernel:

<*> Advanced Linux Sound Architecture
<M> Sequencer support
<M>   Sequencer dummy client
<M> OSS Mixer API
<M> OSS PCM (digital audio) API
[*] OSS Sequencer API
<*> RTC Timer support

Do I need anything else?... Or maybe I need "Sequencer support" to be built-in and not as a module?
Comment 9 Stian Skjelstad 2005-02-03 10:48:08 UTC
You need to mod-probe snd-seq. Insert it into /etc/modules.autoload.d/kernel-2.6 can be a good idee also.
Comment 10 Alexandru Toma 2005-02-03 10:55:44 UTC
That did it. Thank you for the help.

This should be mentioned in the docs, at the very least.
Comment 11 Jerome Potts 2005-05-25 11:21:41 UTC
Still not working for me... (i did not apply the patch)

tama jerome # cat /var/run/timidity.pid
8549

tama jerome # ps aux | grep 8549
root      8971  0.0  0.3   1520   464 pts/0    S+   12:36   0:00 grep 8549

tama jerome # kill 8549
bash: kill: (8549) - No such process

tama jerome # timidity -iA &
[1] 8972
tama jerome # Requested buffer size 32768, fragment size 8192
ALSA pcm 'default' set buffer size 32768, period size 8192 bytes
TiMidity starting in ALSA server mode
Opening sequencer port: 128:0 128:1 128:2 128:3

tama jerome # ps aux | grep -i timidity
root      8972  1.2  6.6  22616  8436 pts/0    S    12:37   0:00 timidity -iA

tama jerome # kill %1

tama jerome # esearch timidity++
[ Results for search key : timidity\+\+ ]
[ Applications found : 1 ]
*  media-sound/timidity++
      Latest version available: 2.13.2-r2
      Latest version installed: 2.13.2-r2

tama jerome # equery uses timidity++
[ Legend    : Left column  (U) - USE flags from make.conf              ]
[           : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for media-sound/timidity++-2.13.2-r2 ]
 U I
 + - oss       : Adds support for OSS (Open Sound System)
 - - nas       : Adds support for network audio sound
 - - esd       : Adds support for media-sound/esound (Enlightened Sound Daemon)
 + + motif     : Adds motif support (x11-libs/openmotif x11-libs/lesstif)
 + + X         : Adds support for X11
 + + gtk       : Adds support for x11-libs/gtk+ (The GIMP Toolkit)
 + + gtk2      : Use gtk+-2.0.0 over gtk+-1.2 in cases where a program supports
both.
 + + oggvorbis : <unknown>
 + + tcltk     : Support for Tcl and/or Tk
 + + slang     : Adds support for the slang text display library (it's like
ncurses, but different)
 + + alsa      : Adds support for media-libs/alsa-lib (Advanced Linux Sound
Architecture)
 - - arts      : Adds support for aRts: the KDE sound daemon
 - - jack      : Adds support for the JACK Audio Connection Kit
 - - portaudio : Adds support for the crossplatform portaudio audio API
 - - emacs     : Adds support for GNU Emacs
 + + ao        : Use libao for sound playback
 + + speex     : Adds support for the speex audio codec
 + + flac      : Adds support for the flac audio codec
 + + ncurses   : Adds ncurses support (console display library)
tama jerome # 
Comment 12 Jan Brinkmann (RETIRED) gentoo-dev 2005-05-28 10:10:45 UTC
*timidity++-2.13.2-r2 (05 Apr 2005)

  05 Apr 2005; Jeremy Huddleston <eradicator@gentoo.org>
  +files/timidity++-2.13.2-exiterror.patch, -timidity++-2.13.2-r1.ebuild,
  +timidity++-2.13.2-r2.ebuild:
  Have timidity exit with an error code if it fails to start so the initscript
  will detect it. Also, use cubic splines instead of linear. Closes bug #76364
  thanks to Stian Skjelstad <stian@nixia.no>.