-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attempt to access private resource denied #21
Comments
The MIT-SHM is an extension to the X server which allows faster transactions by using shared memory. Docker isolation probably blocks it. Qt applications can be forced not to use the extension. Try using:
It could be a good idea to add it to the images (for rviz and rqt). |
As @j-rivero points out a relevant issue with Qt, forgetting this flag results in much of the GUI windows button or menu interfaces not being rendered. How ever if you are having a Bad Access error, my guess is that your having and a permission or authentication problem using the mounted Unix socket from within the container. You should peruse through some notes on the topic I wrote in the ROS Docker wiki here: Also, for some image sensors in gazebo, we might need GPU access within the container. |
I can reproduce the problem and using the env from @j-rivero it is fixed. Also this is in the troubleshoot section of the GUI tutorial. I added the error message for easier searching in the future. |
This option |
alternative solution is to pass |
@graywolf , I'm not familiar with IPC namespace, or MIT-SHM. Could you elaborate? |
docker's --ipc setting: https://docs.docker.com/engine/reference/run/#/ipc-settings-ipc allows accessing shared memory between x11 and application running in container. But I'm no expert on it either. It could open security holes though ( I made SO question, hopefully will someone answer http://stackoverflow.com/questions/38907708/docker-ipc-host-and-security ), I don't know enough to say for sure. But if you trust application inside (which is this case I suspect) and use docker more for convinience than security, you could just allow it. PS: GPU benchmark (with |
@graywolf , If you wouldn't mind, could you document your findings on the wiki: http://wiki.ros.org/docker/Tutorials/GUI , that would be awsome. What additional arguments do you need, just the volume for the x11 unix socket, or not even that? |
PrefaceTbh I would mind, I don't even have any idea what this project is, I just found this issue when googling for
so I don't feel like qualified person to edit your wiki :) Since this page is relatively high in google search, I thought I would leave here what I found for future people having this problem. I don't even know if GUI performance is important enough for you (I was benchmarking OpenGL so for me it was). But I can make a summary of what I managed to figure out and if you find it useful you (or someone) can incorporate it into your wiki :) Image creationI'm using Archlinux as a base, so steps will probably need to be adapted to your base. This
Seems more complicated than it is. Basically it just updated archlinux base to newest version and install gui drivers & libraries. Note: You need to pick driver depending on your GPU (or install them all), I have ATI card, so for me it's Note2: this is probably not smallest possible, from Running
Note: The line with EndIf you think this could be useful you this project, go ahead and incorporate it into the wiki :) I have no doubt it could be simplified quite a bit since you already have working image etc. Hope this will be helpful to someone ^_^ |
@graywolf , pardon my assumption, I guess these pages on Docker and GUIs are more general traffic than just fellow ROS users. I'll try this out for out ubuntu bases and incorporate it into the wiki. Does this no longer require adjusting the allowed xorg users on the host, i.e. doing (P.S. awesome GITS related avatar by the way.) |
Ups, I forgot that part (it's not in the bash script I used to launch it :D ). You are right of course, that part is still needed. I went with And thanks :) |
Fake errors
GR plots couldn't display with the ubuntu images, probably due to missing packages. To support them, followed the instructions in http://gr-framework.org/tutorials/docker.html - Image based on fedora - Julia built from source, takes a long time - docker --ipc=host opens a potential security hole. Based on osrf/docker_images#21
I am able to launch gazebo using @graywolf 's way, but the model inside is not launching up. |
@AnkS4 , if you're able to view the GUI window, but not the 3D rendered view, I think that would be an issue with enabling the hardware acceleration for 3D graphics. I'd say check your approach with the wiki, or use a tool to setup your environment for you: http://wiki.ros.org/docker/Tutorials/GUI |
|
In some X installations using the MIT shared memory extension for rendering window elements, Bambu Studio needs direct access to a UNIX socket for fast rendering. This fix passes `--ipc host` with docker run to allow the container to just have direct access to the host's IPC system. The error message that this solves is: ``` (bambu-studio:1): Gdk-ERROR **: 00:02:37.498: The program 'bambu-studio' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAccess (attempt to access private resource denied)'. (Details: serial 316 error_code 10 request_code 130 (MIT-SHM) minor_code 1) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) ``` Here are some extra links for more information: osrf/docker_images#21 http://wiki.ros.org/docker/Tutorials/GUI https://en.wikipedia.org/wiki/MIT-SHM
In some X installations using the MIT shared memory extension for rendering window elements, Bambu Studio needs direct access to a UNIX socket for fast rendering. This fix passes `--ipc host` with docker run to allow the container to just have direct access to the host's IPC system. The error message that this solves is: ``` (bambu-studio:1): Gdk-ERROR **: 00:02:37.498: The program 'bambu-studio' received an X Window System error. This probably reflects a bug in the program. The error was 'BadAccess (attempt to access private resource denied)'. (Details: serial 316 error_code 10 request_code 130 (MIT-SHM) minor_code 1) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) ``` Here are some extra links for more information: osrf/docker_images#21 http://wiki.ros.org/docker/Tutorials/GUI https://en.wikipedia.org/wiki/MIT-SHM
After I run the docker container of osrf/ros, I got the following error, and the GUI not work!
$ docker run -it --security-opt="label:disable" --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" osrf/ros:indigo-desktop-full rqt
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x135
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 3 (X_ShmPutImage)
Resource id: 0x2000008
I tried it on Fedora22 X86_64.
The text was updated successfully, but these errors were encountered: