[PlanetCCRMA] Jack, Jackd and realtime problem

Fernando Lopez-Lezcano nando@ccrma.Stanford.EDU
Fri Feb 18 12:32:01 2005


On Fri, 2005-02-18 at 11:48, Shayne O'Connor wrote:
> Ben Cohen wrote:
> >I think I'm having a problem with Jack. I use the
> >jackd server but when I have the realtime box checked
> >in qjackctl amsynth doesn't start.
> >
> >Here's the jack message:
> >12:19:41.406 MIDI connection graph change.
> >subgraph starting at qjackctl-4757 timed out
> >(subgraph_wait_fd=17, status = 0, state = Finished)
> >12:19:41.445 Audio connection graph change.
> >12:19:41.446 XRUN callback (5).
> >**** alsa_pcm: xrun of at least 8.616 msecs
> >
> >>From what I can gather realtime priority is a must for
> >good audio performance so I any help on solving this
> >would be great.
> >
> >I'm using kernel 2.6.10-2.1.ll.rhfc3.ccrma.
> >
> >This is the second time I've had problems with amsynth
> >- it always amazes me how an inanimate object can get
> >someone (i.e. me) so frustated!
>
> i'm getting a similar problem - i can run amSynth with alsa as output,

Same here, it looks like it is related to Jack output. 

> but using jack produces this:
> 
> [mrmachine@localhost mrmachine]$ amSynth
> amSynth 1.0.0
> Copyright 2001-2004 Nick Dowell and others.
> amSynth comes with ABSOLUTELY NO WARRANTY
> This is free software, and you are welcome to redistribute it
> under certain conditions; see the file COPYING for details
> reading map file
>         unlocking /usr/lib/libgtk-1.2.so.0.9.1
>         unlocking /usr/lib/libgtk-1.2.so.0.9.1
>         unlocking /usr/lib/libgtkmm-1.2.so.0.3.4
>         unlocking /usr/lib/libgtkmm-1.2.so.0.3.4
>  
> GLib-WARNING **: getpwuid_r(): failed due to: No such user 500.
>  
> Gtk-WARNING **: /usr/lib/gtk/themes/engines/libbluecurve.so: failed to
> map segment from shared object: Resource temporarily unavailable
> /usr/bin/amSynth: line 75:  7830 Aborted                
> $BINDIR/amSynth.bin $*
>  
> ********** there was an error! **********
>  
> please check your config in ~/.amSynthrc
>
> I'm not sure where this supposed "user 500" is set?

I don't know either. It runs in rh9 but rh9 still has an older
(official) version of jack...

[... minutes later ...]

Ok, I think I know (or can guess). This is probably a selinux problem.
The amSynth binary is really in /usr/libexec/amSynth.bin and is
installed suid (probably should not). Something in the security
framework does not like you to execute it like that and fails. Do a:

  chmod 755 /usr/libexec/amSynth.bin

It looks like it works fine after that... I don't know if this would
affect the realtime response of an instance of amsynth running under
alsa, it should not affect it when running as a jack client. 

I'll release a new package with that fix incorporated. 
-- Fernando