Using virtual frame buffer fails when spawning child processes - xvfb

I'm trying to use Google Compute Engine for a machine learning project using python game that requires a GUI. Up to now, I've been using XVFB to make up for the fact that there's no GUI. I started it up using the commands
Xvfb :99 &
export DISPLAY=:99
I've been modifying the game to use multithreading, but when I try to run the game, it fails giving error messages like
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":99"
after 108 requests (108 known processed) with 0 events remaining.
Anyone ever encounter a problem like this?

Related

WebKitWebProcess / Gdk-Error when trying to run a Tauri app in a container via x11 connection

I'm trying to display a basic Tauri app GUI running in a Docker container but connected to the host's X11 server through a unix socket. But I get the following warning and error when running npm run tauri dev:
(WebKitWebProcess:6009): Gdk-ERROR **: 00:17:37.147: The program 'WebKitWebProcess' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
(Details: serial 258 error_code 2 request_code 152 (GLX) minor_code 34)
(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.)
I get opened a GUI window on the host but it's blank (but should contain some text / HTML markup).
As I am able to get Firefox and Gedit running from within the container but not the gnome-terminal, I think it's some permissions issue or there is some missing package to get the Webkit based GUI window connecting to my host's X server.
$DISPLAY and /tmp/.X11-unix are set properly. On the host I set xhost +
The container is running as node user. Cargo is installed in /home/node/.cargo/bin. /home/node is owned by root:node with 775 permissions on folders and 664 on files (+x on executable scripts).
I'm just getting started with Rust and Tauri and also not a big expert on X server and Docker networking.
Any ideas how to get it work?
I ended up using Qemu + Virt-Manager instead of docker. For the starters I've used an Ubuntu template as the clipboard sharing works out of the box with my host running on Ubuntu as well. Sound sharing and video playback works out of the box, too. And if I should get in the situation where I would need a separate VM for each app, then I would use my minimalist Arch template to spin up the VM's - the size should be pretty close to that of a docker container.
Edit:
LXC/LXD and Podman might be even better alternatives, I have been told.

Running applescript during laptop sleep ends with error

So I have an applescript (from https://apple.stackexchange.com/questions/370531/catalina-backup-ios-devices-programatically/370850#370850?newreg=14a167f68b6b4b4faa86c0877fb000ba) that backs up my iphone over wifi.
It works perfectly when running manually.
Now, I want to schedule them periodically (daily) at some hour in the night.
I've tried using launchd and periodic services, but when they run the script in the night when laptop is sleeping, I get: "execution error: System Events got an error: Application isn’t running. (-600)"
Not sure what is not running - System Events or the Finder??
Any idea how to make the script work when lid is closed?

RosAria node doesn’t receive messages

Resources
Macbook Air with Ubuntu virtual machine via VMWare
Pioneer3 AT robot
ROS
RosAria
Context
I have at least most of the setup for Ros+RosAria already working:
The master ROS node running on a laptop at 192.168.1.112 via roscore
The RosAria node running on the robot’s built-in computer at 192.168.1.108 via rosrun rosaria RosAria, the port set accordingly to access the robot's motors and sensors via rosparam set..., ROS_MASTER_URI=192.168.1.112:11311, and ROS_IP=192.168.1.112.
Another terminal window on the laptop running rostopic pub /RosAria/cmd_vel geometry_msgs/Twist “linear:... angular:...”
The RosAria node running on the robot confirms it’s able to connect to the master, and if I run the command rostopic list on the laptop I can see /RosAria/cmd_vel as one of the available topics.
In the terminal window where I try to publish to /RosAria/cmd_vel I’m told that the message is sending but the robot shows no signs of having received it, neither console message nor movement of the wheels.
However, if I quit the RosAria node on the robot and restart it while leaving the rostopic pub command running on my laptop, the robot registers the message once upon startup, moves accordingly for a bit, and then does nothing.
I’ve also tried to rostopic echo other topics like battery state, motors status and pose, but I don’t receive any messages from the robot.
I already tried changing the parameters /RosAria/TicksMM and /RosAria/RevCount according to this case.
Question
Why is the Pioneer robot with RosAria running not receiving the cmd_vel commands from my client if it’s apparently able to communicate with the master node successfully?
Disclaimer
The project I was working on where this problem came up isn’t using the same equipment anymore, so now this question is not so urgent for me. I’m also not able to test proposed solutions in the near future since I no longer have access to that Pioneer robot. However, I’ll keep this topic unanswered in case someone else encounters this problem too.
You need To Set ROS_IP On Robot side too to let the ROS System Knows What IP To Use as It's Network Interface
I myself Set This Environments Inside .bashrc Like This:
export ROS_IP=192.168.1.108
and then source .bashrc.
I think You can use rosparam Too But I never tested.

Delays browsing neo4j server

I've installed Neo4J 3.2.1 server on an Ubuntu 14.04 machine with 16G of RAM. I'm connecting to this Neo4J server from my Windows 10 laptop via browser (http://server_ip_address:7474).
I'm working with 3 different graphs with 280MB, 6MB and 13MB. No problem when I activate one of the two smaller ones but impossible to work (make cypher queries in the NEO4J-browser) with the larger because it blocks for long periods (over one minute each).
I've tried to fix this myself. Read https://neo4j.com/docs/operations-manual/current/performance/ and set the following values in neo4j.conf file: - dbms.memory.heap.initial_size=12g; - dbms.memory.heap.max_size=12g; - dbms.memory.pagecache.size=4g.
I also tried: - echo noop > /sys/block/sda/queue/scheduler; - mount -o remount,noatime /.
Since none of these attempts worked, I would appreciate some help!
I'm not sure but it seems that there's some kind of cyclic script running causing the delays.
I only have trouble using the http browser server. I wrote a simple java application to make remote queries without using the http browser, produced a executable jar with it and when I run that jar and make the queries the response times are normal.

Erlang: Node freezes totaly. Now what?

Platform: windows 7 32bit, erlang R15B01.
I have developed an erlang server that simultaneously listens to 200 different tcp ports (200 gen_servers)
After a few minutes of moderate load(few clients in parallel) the entire node just freezes completely - even the shell freezes entirely.
How can this problem get diagnosed? is there a standard erlang approach for those kind of problems? (memory consumption was low ,so its not some kind of memory leak)
Important Edit
It seems that under werl.exe there is no such problem. only under erl.exe. Probably same as in http://erlang.2086793.n4.nabble.com/erl-exe-dies-but-werl-exe-does-not-on-both-Windows-XP-and-2008R2-with-R14B01-td3335030.html
If you kill your process with kill -SIGUSR1 <pid>, the erlang VM will generate a erlang crash dump file erl_crash.dump in the directory the app was started.
Then you can analyze it using the crash dump viewer.
A frozen erlang shell can be caused by uncaught exit signals. You can try to trap exits in the shell process (assuming it is the parent process of your server) which should give you the exit reason. See Reference manual on Errors

Resources