Linux: Unprivileged Users Cannot Run Renoise 2.0 On Gentoo 64bit

Hi!

For some strange reason I cannot run Renoise 2.0 (registered version) as an unprivileged user using Gentoo Linux (1.9.1 runs with no problems at all). Running Renoise as root works fine, but setting the SUID bit (just to try a workaround) still does not make it work for normal users. :blink:

My user is in groups audio and realtime with /etc/security/limits.conf configured as:

  
* hard rtprio 0  
* soft rtprio 0  
@realtime hard rtprio 99  
@realtime soft rtprio 99  
  

Renoise crashes or hangs when bringing up MIDI:

Renoise LOG> ALSA: Enumerating Devices...  
Renoise LOG> ALSA: PLAYBACK info: card 0: CMI8738 [C-Media CMI8738], device 0: CMI8738-MC6 [C-Media PCI DAC/ADC]  
Renoise LOG> ALSA: CAPTURE info: card 0: CMI8738 [C-Media CMI8738], device 0: CMI8738-MC6 [C-Media PCI DAC/ADC]  
Renoise LOG> ALSA: PLAYBACK info: card 0: CMI8738 [C-Media CMI8738], device 1: CMI8738-MC6 [C-Media PCI 2nd DAC]  
Renoise LOG> ALSA: PLAYBACK info: card 0: CMI8738 [C-Media CMI8738], device 2: CMI8738-MC6 [C-Media PCI IEC958]  
Renoise LOG> ALSA: CAPTURE info: card 0: CMI8738 [C-Media CMI8738], device 2: CMI8738-MC6 [C-Media PCI IEC958]  
Renoise LOG> ALSA: PLAYBACK info: card 1: Intel [HDA Intel], device 0: ALC883 Analog [ALC883 Analog]  
Renoise LOG> ALSA: CAPTURE info: card 1: Intel [HDA Intel], device 0: ALC883 Analog [ALC883 Analog]  
Renoise LOG> ALSA: PLAYBACK info: card 1: Intel [HDA Intel], device 1: ALC883 Digital [ALC883 Digital]  
Renoise LOG> ALSA: CAPTURE info: card 1: Intel [HDA Intel], device 2: ALC883 Analog [ALC883 Analog]  
Renoise LOG> MIDI-IO: Starting the input thread...  
Renoise LOG> System: Failed to create a RT thread. Trying again as FIFO thread on process scope...  
Aborted  

(RT works for jack but - according to that message - not for Renoise; same user, same config; ulimit -r shows maximum priority 99)

Sometimes I don’t even get the RT error message. Every 5-10 tries I get the splash screen hanging on MIDI, every ~20th try I get to the GUI (in very rare cases even drawn, in most cases just dialog boxes but no main window) but cannot click anything (GUI terminates anyway after a few seconds). Then I get lots of crash messages on the console: (this is just a short excerpt)

Renoise LOG> System: Failed to create a FIFO thread. Trying again with the default scheduler mode...  
Renoise LOG> CrashLog: /lib32/libgcc_s.so.1 [0xf7c6c532]  
Renoise LOG> CrashLog: /lib32/libgcc_s.so.1 [0xf7c6cb3f]  
Renoise LOG> CrashLog: /lib32/libgcc_s.so.1 [0xf7c6ce37]  
Renoise LOG> CrashLog: /lib32/libgcc_s.so.1(_Unwind_ForcedUnwind+0x70) [0xf7c6d372]  
Renoise LOG> CrashLog: /lib32/libpthread.so.0 [0xf7f252f6]  
Renoise LOG> CrashLog: /lib32/libpthread.so.0(__pthread_unwind+0x51) [0xf7f22d71]  
Renoise LOG> CrashLog: /lib32/libpthread.so.0 [0xf7f1b38a]  
Renoise LOG> CrashLog: [0xffffe410]  
Renoise LOG> CrashLog: [0x2]  
Renoise LOG> CrashLog: /lib32/libc.so.6(clone+0x5e) [0xf7bfa13e]  
Renoise LOG> CrashLog: [(nil)]  
Renoise LOG> CrashLog: [(nil)]  

Looks like a library error, but ldd reveals no such problems?

  
 linux-gate.so.1 => (0xffffe000)  
 librt.so.1 => /lib32/librt.so.1 (0xf7efb000)  
 libdl.so.2 => /lib32/libdl.so.2 (0xf7ef7000)  
 libpthread.so.0 => /lib32/libpthread.so.0 (0xf7ee0000)  
 libX11.so.6 => /usr/lib32/libX11.so.6 (0xf7df4000)  
 libasound.so.2 => /usr/lib32/libasound.so.2 (0xf7d43000)  
 libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/32/libstdc++.so.6 (0xf7c61000)  
 libm.so.6 => /lib32/libm.so.6 (0xf7c3b000)  
 libgcc_s.so.1 => /lib32/libgcc_s.so.1 (0xf7c30000)  
 libc.so.6 => /lib32/libc.so.6 (0xf7b00000)  
 /lib/ld-linux.so.2 (0xf7f3a000)  
 libXau.so.6 => /usr/lib32/libXau.so.6 (0xf7afb000)  
 libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf7af5000)  
  

I already created a new user with groups audio and realtime and it doesn’t work on that account either.

System is Core2Duo 64 bit, 32 bit emulation enabled. As you can see above I got two soundcards (one PCI, one onboard) running fine with ALSA. I don’t get any native MIDI with Linux though; don’t know if that’s the problem? I suppose not because root cannot natively play MIDI either but run Renoise nevertheless. For MIDI playback I have timidity installed but not running (already tried it but nothing changed).

Running JACK prior to starting Renoise doesn’t help either.

Any ideas on which additional permissions my normal user will need to run Renoise 2.0 or what else could be wrong with my configuration?

Hi Enq,

Could you please try if changing the security settings to:

  
@realtime - rtprio 99  
  

-> not specifying hard/soft and leaving out the default (*) settings works for you?

This does not explain why creating the “normal”, not realtime threads fails, but we at least know if RT creation works.

Probably this is a 64 vs. 32 bit problem. Renoise runs as 32bit app, emulated, so there might be some trouble in the 32bit emulation libaries…

sorry for interrupting. I just wanted to say, that THIS is a perfect example of a very very good bug report as it should be. Children: take a look at this man, doing it right. :)

I can’t say much more than taktik at the moment about the problem. 64bit vs. 32bit lib problem would have been my first guess aswell.

Jack needs to run as a 32-bit environment as well, did you checked that?

I tried it with @realtime and default set to - instead of hard/soft and also with default commented out and only the above line. Unfortunately it does not change anything, although ulimit -r still reports 99 (I think I read not specifying default could cause problems and ulimit should not show 99 though it does for me).

1.9.1 (demo and registered version) still runs fine with the unprivileged user until I use my keyboard’s multimedia keys to change the ALSA volume (Renoise simply crashes then; don’t know if it’s due to Compiz or 64 vs. 32 bit ALSA). Do you know of anything special that has changed between 1.9.1 and 2.0 and could cause such an early crash (maybe something with MIDI since that’s almost always the last message)?

(I tried running Renoise 2.0 without Compiz using a clean new user account just using KDE 3.5’s own window manager - no change.)

Nope, all 64. Sorry, I didn’t see the version mismatch “16 vs 22” before in JACK. I downgraded JACK to match with Renoise’s version (down from 0.109.2 to 0.103.0) and recompiled emulation for 32 bit. I don’t get any crash as I should when mixing up 32 and 64 bit versions; instead I get this:

Trying with an already running JACK daemon, Renoise doesn’t seem to detect it since it tries to start its own instance and fails, thus not trying to make any connection to JACK:

The unprivileged user gets nothing but crashes when trying JACK.

Again: Running Renoise 2.0 as root works except for JACK - no crashes at all - (even with Compiz) but the unprivileged user seems to be lacking some permissions I can’t figure out. Another very strange issue is the file owner of ~/.renoise/V2.0.0 being set to user root when running unprivileged. Fixing them doesn’t make Renoise run unprivileged either.

Therefore I assume this is not a 32 vs. 64 bit problem but some misconfiguration or distro dependent problem - or at least a very very odd one only affecting permissions.

The user already belongs to the following groups: (most, like root or uucp, are just for finding a solution to this issue atm)

root wheel uucp audio cdrom video usb utmp rpc vboxusers vmware games messagebus cedega haldaemon plugdev realtime users  

Usually it should be sufficient to be in groups audio and realtime?

I had that problem once when upgrading JackD to the latest version… i upgraded the server but had to recompile the client itself as well, if JackD and the Jack client do not match, Renoise does not want to start the fun either.
In your case this is downgrading.

Hi,
i have had the same issue, which is not a Jack issue, (or however, i am passed to the stage2 of the problem, the real jack issue)

For me worked by modifying limits.conf as reported on some renoise page i-forgot-the-url(im on gentoo amd64)

@realtime - rtprio 99
@realtime - nice -10

If it wouldn’t work, you may try to examinate the output of a strace renoise and try to find where it fails.

Now renoise does start up but wouldn’t support jack, it searches for the 100.0 version which is not installed; compiling it gives me compilation errors at make, and i haven’t found ebiulds for it out there… Think i’m gonna start a new thread for this.

hand :)

Sorry for the long delay. ckeen’s settings didn’t help either. Anyway, I decided I will run Renoise as root for this version and check that issue again on updates. I guess it’s the exact same error that makes it impossible to run Cinelerra (compiled from source) unprivileged on my system (always crashes sooner or later; seems to happen due to some sporadic ALSA permission problems; sometimes it doesn’t even start up or will just silently hang in background - but it runs stable for hours if it has root permissions, just like Renoise 2).

I just discovered it this week so I thought it would be nice to let you know; maybe it’s really the same problem and someone figures out what it is (I couldn’t find any solution to it).

It’s not an ideal solution but since I’m the only user on this computer and I assume noone will use audio samples (Renoise) or my own video clips (Cinelerra) to attack me through any buffer overflows that workaround is a compromise I can take.