jamesnetherton / docker-atom-editor

Run the Atom editor within a Docker container
MIT License
117 stars 38 forks source link

Atom Editor freezes occasionally #91

Open diegoferigo opened 7 years ago

diegoferigo commented 7 years ago

@jamesnetherton I'm trying to debug https://github.com/diegoferigo/dockerfiles/issues/12 and I tested the behavior of your image. I have the same freezes described in the linked issue, but the error generated now is:

docker run -it \
           -v /tmp/.X11-unix/:/tmp/.X11-unix/ \
           -v /dev/shm:/dev/shm \
           -v ${HOME}/.atom:/home/atom/.atom \
           -e DISPLAY \
           jamesnetherton/docker-atom-editor

[...]
[18:0802/141212:ERROR:browser_gpu_channel_host_factory.cc(119)] Failed to launch GPU process.

Including in the image the packages for HW acceleration (libgl1-mesa-glx libgl1-mesa-dri) the error becomes exactly the same I got:

[20:0802/142316:WARNING:x11_util.cc(1406)] X error received: serial 5126, error_code 3 (BadWindow (invalid Window parameter)), request_code 3, minor_code 0 (X_GetWindowAttributes)

Did you ever notice something similar? It looks like there's something going on between X11 and KF5/Plasma.

jamesnetherton commented 7 years ago

I'll have to experiment to see if I can reproduce it. It's not something that I have come across in the past.

But, I've moved to VS Code so I don't use Atom too often these days.

Does it happen frequently? Or just randomly over a long period?

diegoferigo commented 7 years ago

I experimented VS Code as well, but unfortunately the C++ support (debugging excluded) is still not as good as in Atom, which has so far a decent support of CMake + clang :disappointed:

I noticed this on two setups, the first with Arch Linux (rolling) and the second with Ubuntu 17.04, both with KF5/Plasma. My old setup, running on Ubuntu 16.10 (or 04, don't remember exactly) never had such issues, hence I suppose this is a regression of the most recent X11 releases. If this is the case unfortunately it would take a lot of time to debug, I'd wanted to ask you since you're maintaining this Atom image.

It happens every time and right after the container is created. The easier way to trigger it is opening the menu and browsing the items with the cursor. The editor freezes for a couple of seconds (the host system as well) and then the errors I reported are displayed. It keeps happening doing the same operation again, even though other actions can trigger the freezes e.g. opening folders in the tree view. For the sake of clarity I didn't created the container with -d, using -it the output of Atom can be directly read from the stdout of the terminal.

jamesnetherton commented 7 years ago

I'm running Fedora 25 with i3. I get the Failed to launch GPU process message, but there's no freezing. Adding the libgl1-mesa-glx libgl1-mesa-dri packages fixes up the error.

I'll try to replicate your environment and see what happens.

diegoferigo commented 7 years ago

Good to know that at least you manage to replicate that. My current setup is a Dell AIO with an i5-7500 CPU and basically just a plain Ubuntu 17.04 with kubuntu-desktop and docker from the ppa, 2 days fresh. However, I remember noticing this issue in my laptop (Dell XPS 13 9343) running Arch Linux at least 4 / 5 months ago.

jamesnetherton commented 7 years ago

I can't replicate your hardware but I tested in a Kubuntu 17.04 VM. I still see the errors you mentioned earlier in the console output, but there is no freezing.

The menus open fine and everything seems to run smoothly.

diegoferigo commented 7 years ago

Ok so it doesn't happen in a virtualized environment, and I can tell you it doesn't happen either in a regular ubuntu-session with unity on the same setup previously described, tested this setup either. It looks like KF5 / Plasma on real hardware messes things up, might it be kwin related? It's the only big difference between the DEs I see here.

jamesnetherton commented 7 years ago

Yes, could be related to kwin. Maybe try to obtain some debug logs?

mitsest commented 6 years ago

I 'm also experiencing this behaviour. I 'm under ubuntu 16.04

jamesnetherton commented 6 years ago

@mitsest can you give some more details about your environment?

What window manager do you run, etc.

mitsest commented 6 years ago

Sure!

I 'm using unity and here is the lspci output

mits@mits:~/nativescript/dev_env (master)*$ lspci | grep -i --color 'vga|3d|2d'

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)

Also, keep in mind that it does not happen all the time. Maybe it's only my idea, but it seems to happen when the window loses focus when it is launched.

Thanks!

jamesnetherton commented 6 years ago

On Fedora I have:

00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)`

I don't experience any problems. Maybe I'll try to build a Ubuntu VM and see if I can reproduce.

mitsest commented 6 years ago

OK, cheers man! I 'll wait to hear about your test results.

Thanks again

jamesnetherton commented 6 years ago

Can you not generate config.cson locally (or in another container) and just add it to your image?

mitsest commented 6 years ago

After some tests on Debian I don't think it's easily reproducible. But gnome3 seems to freeze less...