Segmentation Fault when starting google-chrome-stable on Ubuntu 18.04 - amazon-ec2

Just started experiencing crashes when trying to start google-chrome-stable with Xvfb via the CLI. Specifically the AWS EC2 AMI "Canonical, Ubuntu, 18.04 LTS, amd64 bionic image build on 2018-09-12"
Chrome has been running fine on this instance for months, and suddenly started crashing today. Not only that, but it also started crashing on a separate cloned instance that I hadn't touched. Very strange. Perhaps related to whatever update was recently pushed for this AMI?
On first attempt at invoking '$ google-chrome-stable' I get the following error:
[1917:1917:0213/165941.946941:ERROR:browser_main_loop.cc(1512)] Unable to open X display.
On later attempts I get a segmentation fault.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/opt/google/chrome/chrome '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f7c532462dd in ?? () from /usr/lib/x86_64-linux-gnu/libGLX_mesa.so.0
Any ideas how to investigate what's going on with google-chrome-stable? Perhaps I could try to rollback the AMI to a previous version, or just start up a new instance. I strongly believe it was the AMI upgrade since Selenium/google-chrome-stable was running just fine this morning before the update. And the update broke two separate EC2 instances, one of which hadn't been touched today.

Found a workaround just by using the pip3 module "pyvirtualdisplay" which is a wrapper for X. I still don't know what caused Xvfb to break, but if you find this question with the same problem try using that module.

Related

Can't get Podman to run on an Mac M1 Monterey

I have done the following so far:
brew install qemu (apparently needed for podman, but want to use it for VMs anyway)
brew install podman
modify ~/.config/containers/containers.conf and add following line to [engine] section:
helper_binaries_dir = ["/Users/user/dev/homebrew/Cellar/podman/4.1.0/bin","/Users/user/dev/homebrew/Cellar/podman/4.1.0/libexec"]
podman machine init
podman machine start
Initially, machine start complained it could not dial up a unix socket at var/folders/v0/xqf571mj5sg5x7k4j1dpb1_w0000gn/T/podman/podman-machine-default_ready.sock. That file existed, so don't know what the problem was.
I rebooted to see if that would help, and now that socket file no longer exists, but podman machine start still wants to use it. Rerunning podman machine init just gives this error:
Error: podman-machine-default: VM already exists
That error always occurs once it successfully inits, so doesn't seem to be related to my issue.
That's as far as I can get from various web pages I read. Hopefully someone can provide further help :)
I've been away from using a Mac for over a decade, so really have no idea how stuff like podman is supposed to work, beyond it apparently needs QEMU to run a VM for each container.
Am I better off using Docker Desktop for Mac instead of fighting with podman? If so, I'll just use that. Podman was butt easy on my Linux desktop, but maybe it's not worth the trouble on a Mac, or at least on an M1 since it's an arm.
I had a similar issue yesterday, as have others. The solution comes from the issue thread linked in the comment above. The problem was resolved by downgrading the version of QEMU from the one currently available as default on homebrew.
You can downgrade to QEMU 6.2.0 on Monterrey with the following:
curl -L -H "Authorization: Bearer QQ==" -o qemu-6.2.0_1.monterey.bottle.tar.gz https://ghcr.io/v2/homebrew/core/qemu/blobs/sha256:fcc3b1a8139f70dae57f5449f3856f9b3b67448ee0623e64da1e47dc255b46f6
brew install -f qemu-6.2.0_1.monterey.bottle.tar.gz
After some time debugging, I found the cause of this problem.
This problem is caused due to qemu 7.0.0 startup latency (3-5s) that occour in every first qemu execution after Mac Machine machine boots.
Podman has some bug that doesn't expect that the creation of socks files, done by the qemu call, can be delayed some seconds, and when podman tries to access the socks files, the qemu is not created them yet, showing the error "Error: dial unix /podman/podman-machine-default_ready.sock: connect: connection refused".
To avoid this problem, just execute qemu, even with invalid options (just to initialize), before call "podman machine start".
After some time debugging, I found the cause of this problem.
This problem is caused due to qemu 7.0.0 startup latency (3-5s) that occour in every first qemu execution after Mac Machine machine boots.
Podman has some bug that doesn't expect that the creation of socks files, done by the qemu call, can be delayed some seconds, and when podman tries to access the socks files, the qemu is not created them yet, showing the error "Error: dial unix /podman/podman-machine-default_ready.sock: connect: connection refused".
To avoid this problem, just execute qemu, even with invalid options (just to initialize), before call "podman machine start".
echo "* Podman VM machine for MACOSX is stoped, starting..."
# workaround - initialize qemu before machine start to avoid socket error
/usr/local/bin/qemu-system-x86_64 -machine q35,accel=hvf:tcg -cpu host -display none INVALID_OPTION >> /dev/null 2>&1
podman machine start podman-machine-default
ECODE=$?;if [ $ECODE -ne 0 ];then echo "* Error starting podman linux vm machine: $ECODE";exit $ECODE;fi

Resize qcow2 image on Ubuntu via WSL2? Kernel cannot be read by libguestfs-tools virt-resize

I'm trying to resize a qcow2 img I created and installed a guest mac os. When I try to use virt-resize I get the following error:
virt-resize: error: libguestfs error: /usr/bin/supermin exited with error status 1.
This seems to have to do with not being able to access the kernel or wrong permissions on the kernel. I'm running Ubuntu via WSL2 and I'm not sure how to give libguestfs-tools access to the kernel WSL2 runs on. How would you do this?
This comes about because there's not really a good way (at least, not any obvious one after a bit of time with Google) to get access to the WSL2 kernel from within WSL2 without custom-compiling your own.
In lieu of that, libguestfs-tools will work just fine if you install the normal Ubuntu kernel packages and do the usual Ubuntu follow-up step for libguestfs-tools:
sudo apt install linux-image-generic-hwe-20.04
sudo chmod go+r /boot/vmlinuz-*
This will populate your /boot and /lib/modules/* directories with a kernel that will satisfy libguestfs-tools.

Installing Open Project 7 (Apache error: Service Unavailable)

Here is the original question: https://community.openproject.com/topics/7851
I'm trying to install Open Project 7 in a brand new Ubuntu instance at Digital Ocean.
I've follow the instructions at https://www.openproject.org/download-and-installation/, but it's not working.
After the complete of installation and the run of the openproject configure command, i have selected options to install both MySQL and Apache server. When it's all done, i'm unable to connect to my server.
My enviroment:
Ubuntu 16.04
http://159.203.191.172
At logs, i can see two strange messages.
First:
bundler: failed to load command: unicorn (/opt/openproject/vendor/bundle/ruby/2.4.0/bin/unicorn)
Second is a warning:
WARN -- : You are setting a key that conflicts with a built-in method OmniAuth::AuthHash::InfoHash#name defined at /opt/openproject/vendor/bundle/ruby/2.4.0/bundler/gems/omniauth-8385bc0da47e/lib/omniauth/auth_hash.rb:34. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-06-13T01:01:17.860764 #25822]
I don't know if the warning is related to problem, but i think that the unicorn problem is.
Answering my own question here:
I suspected that the package had some problems so i decided to install it using manual installation. The newest documentation i found was an old Ubuntu 14 step-to-step tutorial, adapted from older versions of Open Project. I decided to follow it and after a lot of adaptations i got able to finish the installation process.
This is the tutorial: https://github.com/opf/openproject-ce/blob/stable/7/docs/installation/manual/README.md
Now I'm writing another step-to-step tutorial based on it, modifying all required steps to perform a clean installation on Ubuntu 16.

docker pull centos timeout on windows 8.1

When I run from command line
docker pull centos
I got timeout error. I have no proxy and try from different networks and stucked on this. What reason can be?
Since you wrote that you use Windows 8 I assume that you run boot2docker?
Can you first verify that you can connect to boot2docker itself? E.g. with docker ps? If you still get timeouts issuing that command, make sure boot2docker is running by typing boot2docker restart.
If you can connect to boot2docker without any problems and the docker pull centos problem remains then it seems you have other kind of networking problems on your site which block your connections.

pub build fail with "segmentation fault (core dumped)" on EC2 small intance

Am trying to automate the deployment of my Dart web application, but i keep getting the "segmentation fault (core dumped)" whenever i run pub build on my EC2's Ubuntu 14.04.2 LTS small instance using Dart 1.9.X
You can reproduce this using the example project from my repo : https://github.com/youssefgh/angular-dart-google-maps

Resources