As the title states, I'm finding that whenever I issue xwininfo -tree on a container running Ubuntu in lambda, there are never child screens, though when I run the same container locally it works fine (listing all the windows used by said application). The issue must lie somewhere from application start and it registering with the X server. Does anyone have any insights here as to what could be going on, or how I can get this to work?
To attach some code to this problem, the gist is essentially:
# Start Xvfb
Xvfb $DISPLAY -screen 0 1920x1080x24 -nolisten tcp -nolisten unix &
# Open Visual Studio Code (just as an example application)
code .
# List all windows
xwininfo -root -tree
As mentioned, locally xwininfo produces something like this:
Root window id: 0x50d (the root window) (has no name)
Parent window id: 0x0 (none)
6 children:
0x600006 "Code": ("code" "Code") 800x600+560+240 +560+240
0x600002 "Get Started - src - Visual Studio Code": ("code" "Code") 1024x768+448+156 +448+156
0x600003 (has no name): () 1x1+0+0 +0+0
0x800003 "code": ("code" "Code") 200x200+0+0 +0+0
1 child:
0x800004 (has no name): () 1x1+-1+-1 +-1+-1
0x800001 "code": ("code" "Code") 10x10+10+10 +10+10
0x600000 "Chromium clipboard": () 10x10+-100+-100 +-100+-100
but in lambda, the output only shows the root window, with no children:
Root window id: 0x50d (the root window) (has no name)
Parent window id: 0x0 (none)
0 children.
What could be going on here? Why are my application windows not appearing in the output of xwininfo -tree?
This is a sort of half answer in that I'm unable to definitely solve the root cause of the original question, but it's an answer that explains tells why Visual Studio Code fails to launch (and does not appear in xwininfo). If you pass the --verbose flag to Visual Studio code when it launches, in a Lambda environment, you'll get output like this:
prctl(PR_SET_NO_NEW_PRIVS) failed
prctl(PR_SET_NO_NEW_PRIVS) failed
Unable to create argv.json configuration file in /home/sbx_user1051/.vscode/argv.json, falling back to defaults (Error: ENOENT: no such file or directory, mkdir \'/home/sbx_user1051/.vscode\')
[94:1213/213845.593392:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[94:1213/213845.593463:ERROR:bus.cc(398)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[94:1213/213845.626853:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[94:1213/213845.626936:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[94:1213/213845.671433:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.
[94:1213/213845.671514:ERROR:gpu_process_host.cc(974)] GPU process launch failed: error_code=1002
[94:1213/213845.671522:WARNING:gpu_process_host.cc(1282)] The GPU process has crashed 1 time(s)
[94:1213/213845.672685:ERROR:gpu_process_host.cc(974)] GPU process launch failed: error_code=1002
[94:1213/213845.672708:WARNING:gpu_process_host.cc(1282)] The GPU process has crashed 2 time(s)
[94:1213/213845.688115:ERROR:gpu_process_host.cc(974)] GPU process launch failed: error_code=1002
[94:1213/213845.688143:WARNING:gpu_process_host.cc(1282)] The GPU process has crashed 3 time(s)
[94:1213/213845.689768:ERROR:gpu_process_host.cc(974)] GPU process launch failed: error_code=1002
[94:1213/213845.689790:WARNING:gpu_process_host.cc(1282)] The GPU process has crashed 4 time(s)
[94:1213/213845.690646:ERROR:gpu_process_host.cc(974)] GPU process launch failed: error_code=1002
[94:1213/213845.690662:WARNING:gpu_process_host.cc(1282)] The GPU process has crashed 5 time(s)
[94:1213/213846.470027:ERROR:gpu_process_host.cc(974)] GPU process launch failed: error_code=1002
[94:1213/213846.470054:WARNING:gpu_process_host.cc(1282)] The GPU process has crashed 6 time(s)
[94:1213/213846.471084:ERROR:gpu_process_host.cc(974)] GPU process launch failed: error_code=1002
[94:1213/213846.471101:WARNING:gpu_process_host.cc(1282)] The GPU process has crashed 7 time(s)
[94:1213/213846.471742:ERROR:gpu_process_host.cc(974)] GPU process launch failed: error_code=1002
[94:1213/213846.471761:WARNING:gpu_process_host.cc(1282)] The GPU process has crashed 8 time(s)
[94:1213/213846.472344:ERROR:gpu_process_host.cc(974)] GPU process launch failed: error_code=1002
[94:1213/213846.472357:WARNING:gpu_process_host.cc(1282)] The GPU process has crashed 9 time(s)
[94:1213/213846.472371:FATAL:gpu_data_manager_impl_private.cc(450)] GPU process isn\'t usable. Goodbye.
The problem is that even though Visual Studio Code is built on Electron / Chromium, it doesn't seem to support a --headless option yet (as apposed to something like Chrome, which is possible to launch in a Lambda function with some careful tinkering). So, due to the restrictions of the Lambda environment, for now, it seems that it's not possible to Launch Visual Studio code in a lambda environment. (I know there is the web version, but I don't want this). Would have been nice as a single instance per call would have been perfect for what I was trying to accomplish. I'm going to move on to some other backend infrastructure to do what I want...
Related
First of all, I tried to run eclipse (eclipse-jee-neon-3-linux-gtk-x86_64) normally. Each time, it showed a splash screen for few seconds and disappers. Then I check with terminal. Running in the terminal with command ./eclipse prints the error messages. I have attached the full terminal output below.
nalin#nalin:/opt/eclipse-neon$ ./eclipse
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized. Will retry after the state location is initialized.
(Eclipse:5741): GLib-CRITICAL **: g_base64_encode_step: assertion 'in != NULL' failed
Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceDropAdapter$1
Any idea what's going on ?
I am using Mac OSX El Captain with Android Studio 2.2.
Android Studio start to don't show Android devices suddenly. I try to kill adb server and start it again and this errors appear on terminal.
List of devices attached
daemon not running. starting it now on port 5037 *
adb E 1165 84563 usb_osx.cpp:307] Could not clear pipe stall both ends: e0004051
adb E 1165 84563 usb_osx.cpp:289] Could not find device interface
daemon started successfully *
When I try to kill server twice for understanding the issue it gives this error message:
error: protocol fault (couldn't read status): Connection reset by peer
Try restarting your Mac and devices. I ran into a similar error and restart got rid of it :)
No such file or directory.
Launching app-Error while waiting for device: The emulator process for AVD was killed)
I have a BitBake build process that runs on a Docker container (CentOS 7). The BitBake fails during recipe gcc-cross-i586-5.2.0-r0: task do_compile on each run that I try it in.
An example of bitbake's output:
NOTE: recipe gcc-cross-i586-5.2.0-r0: task do_compile: Started
ERROR: Worker process (367) exited unexpectedly (-9), shutting down...
ERROR: Worker process (367) exited unexpectedly (-9), shutting down...
ERROR: Worker process (367) exited unexpectedly (-9), shutting down...
ERROR: Worker process (367) exited unexpectedly (-9), shutting down...
NOTE: Tasks Summary: Attempted 1538 tasks of which 17 didn't need to be rerun and all succeeded.
Is this a problem with recipe gcc-cross-i586-5.2.0-r0: task do_compile? Perhaps an out-of-memory error? I don't know what the -9 refers to or how to find out more information about it.
Try:
$ bitbake -c cleansstate gcc-cross ; bitbake -k gcc-cross
How much you have memory of ram?
Report log error here.
This worked for me,
Edit conf/local.conf and decrease the number of working threads by adding the following to you conf/local.conf file (under the build directory):
BB_NUMBER_THREADS = "6"
Just a long shot, -9 in kernel land means EBADF (bad file number.) Is it possible you have done some operations as root and some files are not accessible during the build? Is the issue reproducible? ie. can you rm -rf tmp and does it happen again? Make sure you don't have any permissions issues in your project directory and associated file system(s).
I remote(chrome remote) to my desktop which runs android studio. When I try to run the emulator from android studio, i see the window with the virtual device open. But the device doesn't power on. This is not the behavior when I use the desktop directly to run the android project. Could this behavior be because of the remoting? If so how do i change it?
My need is to work on android studio on a remote connection, if there is a way to achieve it, kindly advise.
This is the AVD log
C:\Users\xxx\AppData\Local\Android\sdk\tools\emulator.exe -avd Nexus_5_API_21 -netspeed full -netdelay none
emulator: device fd:1228
HAX is working and emulator runs in fast virt mode
creating window 61 83 462 820
logcat
04-29 12:06:39.077 1966-1966/com.example.xxx.four4 E/libprocessgroup﹕ failed to make and chown /acct/uid_10053: Read-only file system
04-29 12:06:39.077 1966-1966/com.example.xxx.four4 W/Zygote﹕ createProcessGroup failed, kernel missing CONFIG_CGROUP_CPUACCT?
04-29 12:06:39.078 1966-1966/com.example.xxx.four4 I/art﹕ Not late-enabling -Xcheck:jni (already on)
04-29 12:06:39.183 1966-1986/com.example.xxx.four4 D/OpenGLRenderer﹕ Render dirty regions requested: true
04-29 12:06:39.186 1966-1966/com.example.xxx.four4 D/﹕ HostConnection::get() New Host Connection established 0xa607f4c0, tid 1966
04-29 12:06:39.319 1966-1966/com.example.xxx.four4 D/Atlas﹕ Validating map...
04-29 12:06:40.050 1966-1966/com.example.xxx.four4 I/Choreographer﹕ Skipped 42 frames! The application may be doing too much work on its main thread.
04-29 12:06:40.184 1966-1986/com.example.xxx.four4 D/﹕ HostConnection::get() New Host Connection established 0xa607fa60, tid 1986
04-29 12:06:40.231 1966-1986/com.example.xxx.four4 I/OpenGLRenderer﹕ Initialized EGL, version 1.4
04-29 12:06:40.469 1966-1986/com.example.xxx.four4 D/OpenGLRenderer﹕ Enabling debug mode 0
04-29 12:06:40.521 1966-1986/com.example.xxx.four4 W/EGL_emulation﹕ eglSurfaceAttrib not implemented
04-29 12:06:40.521 1966-1986/com.example.xxx.four4 W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa6083580, error=EGL_SUCCESS
04-29 12:07:12.637 1966-1973/com.example.xxx.four4 W/art﹕ Suspending all threads took: 13.570ms
Thanks.
I have the same issue using a remote desktop. I solved it using another remote access application TeamViewer (http://teamviewer.com)
Using TeamViewer you can run any Android Emulator like x86, x86_64 or arm.
The Android emulator is not using all of your cpu capabilities but rather a single thread and my guess is that the remote desktop and the emulator are sharing the same thread thus preventing from your emulator to run while using the remote desktop. the solution is to use a stronger cpu or a different remote desktop as user2839592 said.