User avatar
Toad King
Posts: 157
Joined: Sun Dec 18, 2011 8:03 pm

"failed to add service - already in use?" error

Fri Jul 27, 2012 7:03 am

After the latest firmware update, any time I try to run a program with GLES/OpenVG, I get an error like this:

Code: Select all

3422136784: * failed to add service - already in use?
where the number changes each time. Does anyone know what could be causing this?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5144
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: "failed to add service - already in use?" error

Fri Jul 27, 2012 9:54 am

What memory split are you using?

pwinwood
Posts: 74
Joined: Mon Jul 02, 2012 2:21 am
Location: Oxford, England

Re: "failed to add service - already in use?" error

Fri Jul 27, 2012 4:47 pm

It happens to me too using 128/128 and 192/64.

uname -a

Linux raspberrypi 3.1.9+ #202 PREMPT Wed Jul 25 22:11:06 BST 2012 armv6l GNU/Linux.

I will try reflashing the sdcard.

pwinwood
Posts: 74
Joined: Mon Jul 02, 2012 2:21 am
Location: Oxford, England

Re: "failed to add service - already in use?" error

Fri Jul 27, 2012 6:21 pm

I reflashed the sdcard, installed and ran the rpi-update and the same error occurred again running hello_triangle.

User avatar
Aloshi
Posts: 359
Joined: Sat Jun 23, 2012 6:42 pm
Contact: Website

Re: "failed to add service - already in use?" error

Fri Jul 27, 2012 8:16 pm

Same thing here, also started happening after I updated the firmware yesterday.

Oraclemaster
Posts: 3
Joined: Sat Jul 28, 2012 7:53 am

Re: "failed to add service - already in use?" error

Sat Jul 28, 2012 7:57 am

I have the same problem with Quake 3 and some people get this error running XBMC.

Mauro

fordexplorer
Posts: 12
Joined: Mon Jul 23, 2012 9:23 pm

Re: "failed to add service - already in use?" error

Sat Jul 28, 2012 9:19 am

I can confirm Mauro's statement regarding XBMC.

Ford

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5144
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: "failed to add service - already in use?" error

Sat Jul 28, 2012 9:34 am

@all
Have you tried updating today? I think I fixed this late last night.

Oraclemaster
Posts: 3
Joined: Sat Jul 28, 2012 7:53 am

Re: "failed to add service - already in use?" error

Sun Jul 29, 2012 7:12 am

Hi dom, after a

sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update 192

Reboot

It works.

Thank you.

Mauro

jlauha
Posts: 3
Joined: Wed Sep 19, 2012 11:14 am

Re: "failed to add service - already in use?" error

Thu Sep 20, 2012 10:16 am

I started getting this error when I just switched to the new "2012-09-18-wheezy-raspbian" image. I get it e.g. when I compile and try to run the hello_triangle example.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5144
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: "failed to add service - already in use?" error

Thu Sep 20, 2012 5:27 pm

jlauha wrote:I started getting this error when I just switched to the new "2012-09-18-wheezy-raspbian" image. I get it e.g. when I compile and try to run the hello_triangle example.
What memory split are you using?

jlauha
Posts: 3
Joined: Wed Sep 19, 2012 11:14 am

Re: "failed to add service - already in use?" error

Thu Sep 20, 2012 5:53 pm

I had it on 240/16 as the previous image worked with that. Also I had tried the rpi-update 192 command instructed in a message above, thinking I had tried it with that as well with no luck. I guess I somehow missed an error message since there is no rpi-update command. :D

Now that I checked & tried again, it works again with the 192 memory split. 224 doesn't work either, although it gives a different, app dependent error message (context creation fails).

thogue
Posts: 131
Joined: Wed Sep 19, 2012 2:16 am

Re: "failed to add service - already in use?" error

Wed Sep 26, 2012 1:32 am

Xbian 0.6.3

xbmc would error.

Tried 192, xbmc started but still would not finish loading. Set to 128 seems to be working now.

jdonald
Posts: 34
Joined: Fri Nov 03, 2017 4:36 pm

Re: "failed to add service - already in use?" error

Mon Nov 13, 2017 3:57 am

I know this thread is more than five years old, but doesn't this problem exist today on Raspbian Jessie and Stretch? There's a Stack Overflow question about exactly this error, and someone pinpointed the vc4-kms-v3d overlay as a partial cause. To answer the earlier troubleshooting question, raising GPU memory to 256 MB on a Pi 3 doesn't help.

Removing dtoverlay=vc4-kms-v3d does make the error go away, but also disables the full OpenGL driver with KMS. This isn't really an acceptable solution.

Given that minecraft-pi still runs regardless of whether the overlay is enabled, it should be possible to make other VideoCore-accelerated programs work consistently as well.

/opt/vc/src/hello_pi/hello_triangle/ and similar examples would ideally be a starting point for integrating VideoCore acceleration into other engines. Does anyone know what source lines to change to make them work regardless?

I know there's the alternative of the Mesa driver with some open-source VC4 acceleration, but it's not as fast yet and packages like Quake 3 still use the VC libs.

jdonald
Posts: 34
Joined: Fri Nov 03, 2017 4:36 pm

Re: "failed to add service - already in use?" error

Tue Nov 28, 2017 2:21 am

Closing the loop here.

  • When this thread was discussed five years ago the problems were not due to the newer VC4 overlay--because it didn't exist at the time. Users were encountering a combination of bad memory splits and perhaps a now-resolved Raspbian regression. Whereas if someone comes across "failed to add service" today, it's more likely a case of running these older programs with the vc4-kms-v3d overlay enabled.
  • Minecraft Pi Edition works today with Mesa EGL via a wrapper. Raspbian has a script at /usr/bin/minecraft-pi which detects the runtime configuration and if necessary makes use of a modified version of this library: https://github.com/xobs/mcrpi-wrapper
  • Raspbian Quake3 could run with a slightly modified version of that wrapper that implements eglSaneChooseconfigBRCM(). However, given that this program is open-source and built on SDL it's probably more straightforward to remove the dispmanx parts of that codebase altogether. See this thread.
  • The hello_pi examples are not using SDL so would involve more code to set up a window. On Pi Stack Exchange I've posted one approach to run them on Mesa with minimal changes. In theory one could further extend the wrapper to take care of window creation and run an unmodified hello_triangle.bin executable.

Azimoth
Posts: 11
Joined: Thu Feb 07, 2013 10:22 am

Re: "failed to add service - already in use?" error

Sun Feb 18, 2018 10:50 am

Adding to this list:
  • Kodi (version 2:17.6-2~stretch) gave me this error today and returning to the "Original non-GL desktop driver" (in contrast to the "OpenGL desktop driver with full/fake KMS") made the error go away

Return to “Troubleshooting”

Who is online

Users browsing this forum: 7k1ptt, Brandon92 and 50 guests