Android emulator 29.2.0.0 Segfault - android-emulator

Running Android Emulator on cloud VPS with nested virtualization support.
Everything worked find until the latest sdkmanager --update. Now I am having SegFault on emulator startup:
#!/usr/bin/env bash
export DISPLAY=:2.0
sudo -H -u vnc xhost +localhost
#sdkmanager --update
emulator #android-28-x86 -verbose -memory 2048 -gpu swiftshader_indirect -no-audio -no-snapshot -no-boot-anim -skin 768x1280 ${1}
Concatenated QEMU options:
/root/android-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64 -dns-server 127.0.0.53 -no-audio -serial null -device goldfish_pstore,addr=0xff018000,size=0x10000,file=/root/.android/avd/android-28-x86.avd/data/misc/pstore/pstore.bin -cpu android64 -enable-kvm -smp cores=2 -m 2048 -lcd-density 160 -object iothread,id=disk-iothread -nodefaults -kernel /root/android-sdk/system-images/android-28/google_apis_playstore/x86//kernel-ranchu-64 -initrd /root/android-sdk/system-images/android-28/google_apis_playstore/x86//ramdisk.img -drive if=none,index=0,id=system,file=/root/android-sdk/system-images/android-28/google_apis_playstore/x86//system.img,read-only -device virtio-blk-pci,drive=system,iothread=disk-iothread,modern-pio-notify -drive if=none,index=1,id=cache,file=/root/.android/avd/android-28-x86.avd/cache.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=cache,iothread=disk-iothread,modern-pio-notify -drive if=none,index=2,id=userdata,file=/root/.android/avd/android-28-x86.avd/userdata-qemu.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=userdata,iothread=disk-iothread,modern-pio-notify -drive if=none,index=3,id=encrypt,file=/root/.android/avd/android-28-x86.avd/encryptionkey.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=encrypt,iothread=disk-iothread,modern-pio-notify -drive if=none,index=4,id=vendor,file=/root/android-sdk/system-images/android-28/google_apis_playstore/x86//vendor.img,read-only -device virtio-blk-pci,drive=vendor,iothread=disk-iothread,modern-pio-notify -netdev user,id=mynet -device virtio-net-pci,netdev=mynet -device virtio-rng-pci -show-cursor -L /root/android-sdk/emulator/lib/pc-bios -soundhw hda -vga none -append 'qemu=1 no_timer_check androidboot.hardware=ranchu androidboot.serialno=EMULATOR29X2X0X0 clocksource=pit no-kvmclock android.qemud=1 console=0 android.checkjni=1 android.bootanim=0 qemu.gles=1 qemu.settings.system.screen_off_timeout=2147483647 qemu.encrypt=1 qemu.opengles.version=131072 cma=272M#0-4G qemu.wifi=1 mac80211_hwsim.channels=2 androidboot.android_dt_dir=/sys/bus/platform/devices/ANDR0001:00/properties/android/ skip_initramfs rootwait ro init=/init loop.max_part=7 dm="1 vroot none ro 1,0 5159992 verity 1 PARTUUID=19E87A23-1C27-4616-8116-0088D1F64FD2 PARTUUID=19E87A23-1C27-4616-8116-0088D1F64FD2 4096 4096 644999 644999 sha1 3d4097abf29343cf6b86b9d6703c131e82429f69 5f81fddb8cc753b134fc2901766e57a49cfae566dba7ca48630fdddc30913f84 1 ignore_zero_blocks" androidboot.veritymode=enforcing androidboot.verifiedbootstate=orange root=/dev/dm-0 ramoops.mem_address=0xff018000 ramoops.mem_size=0x10000 memmap=0x10000$0xff018000 qemu.dalvik.vm.heapsize=512m' -android-hw /root/.android/avd/android-28-x86.avd/hardware-qemu.ini
emulator: Android qemu version 29.2.0.0 (build_id 5871853) (CL:N/A)
emulator: Starting QEMU main loop
./start-emulator.sh: line 5: 49651 Segmentation fault emulator #android-28-x86 -verbose -memory 2048 -gpu swiftshader_indirect -no-audio -no-snapshot -no-boot-anim -skin 768x1280 ${1}
The machine was created like this:
sdkmanager 'system-images;android-28;google_apis_playstore;x86'
sdkmanager --licenses
echo 'no' | avdmanager create avd --force --name android-28-x86 --abi google_apis_playstore/x86 --package 'system-images;android-28;google_apis_playstore;x86'
Any idea how to quick fix this? Any option to rollback to the previous version through sdkmanager?
Edit: tried Android 26. Same thing. Segfault.
Edit2: Also tried to install the emulator from here: https://chromium.googlesource.com/android_tools/+archive/refs/heads/master/sdk/emulator.tar.gz
I replaced the folder android-sdk/emulator with it. Tried to run it, but encountered a missing kernel-qemu error.
Not sure what to do at this point. The distros of sdkmanager and android_tools are incompatible?
emulator: Concatenated backend parameters:
/root/android-sdk/emulator/emulator64-x86 #android-28-x86 -verbose -memory 2048 -gpu swiftshader_indirect -no-audio -no-snapshot -no-boot-anim -skin 768x1280
emulator: Android virtual device file at: /root/.android/avd/android-28-x86.ini
emulator: virtual device content at /root/.android/avd/android-28-x86.avd
emulator: virtual device config file: /root/.android/avd/android-28-x86.avd/config.ini
emulator: using core hw config path: /root/.android/avd/android-28-x86.avd/hardware-qemu.ini
emulator: Found AVD target API level: 28
emulator: Read property file at /root/android-sdk/system-images/android-28/google_apis_playstore/x86//build.prop
emulator: No boot.prop property file found.
emulator: Warning: config.ini contains invalid skin.path entry: (null)
emulator: autoconfig: -skindir (null)
emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-qemu" is in the same location as your system image.
emulator: ERROR: ANDROID_SDK_ROOT is defined (/root/android-sdk) but cannot find kernel file in /root/android-sdk/system-images/ sub directories
root#VS-683:~# ls -la android-sdk/system-images/android-28/google_apis_playstore/x86/
total 2816004
drwxr-xr-x 3 root root 4096 Sep 18 17:06 .
drwxr-xr-x 3 root root 4096 Sep 18 17:06 ..
-rw-r--r-- 1 root root 190 Sep 18 17:05 advancedFeatures.ini
-rw-r--r-- 1 root root 1806 Sep 18 17:05 build.prop
drwxr-xr-x 3 root root 4096 Sep 18 17:05 data
-rw-r--r-- 1 root root 1048576 Sep 18 17:05 encryptionkey.img
-rw-r--r-- 1 root root 6010832 Sep 18 17:05 kernel-ranchu-64
-rw-r--r-- 1 root root 1667536 Sep 18 17:05 NOTICE.txt
-rw-r--r-- 1 root root 18163 Sep 18 17:06 package.xml
-rw-r--r-- 1 root root 1701411 Sep 18 17:05 ramdisk.img
-rw-r--r-- 1 root root 297 Sep 18 17:05 source.properties
-rw-r--r-- 1 root root 2769289216 Sep 18 17:06 system.img
-rw-r--r-- 1 root root 1048576 Sep 18 17:06 userdata.img
-rw-r--r-- 1 root root 102760448 Sep 18 17:06 vendor.img
-rw-r--r-- 1 root root 1235 Sep 18 17:06 VerifiedBootParams.textproto
Tried to create a symlink from kernel-ranchu-64 to kernel-qemu. The emulator doesn't seem to be loading anything...
Hm... perhaps I should've download the emulator from the different source. Not from the chromium project.
From here perhaps? https://dl.google.com/android/repository/emulator-linux-4969155.zip
Edit3: gdb output:
Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault.
0x0000000000898358 in ?? ()

So I downloaded the latest emulator (5719087 - 29.1.4) from here: https://android.googlesource.com/platform/prebuilts/android-emulator/+archive/7fa8974e268068384138470b4910f39f5c465236/linux-x86_64.tar.gz
I have absolutely no idea how I got 5871853. It is not even available in the android repository.
So the conclusion is that one should never run sdkmanager --update. This is simply too unstable.

Related

CentOs 7, "Tesseract couldn't load any languages!" however: "List of available languages (2): eng, spa"

this is CentOs 7
when I run tesseract --list-langs
[root#cia tessdata]# tesseract --list-langs
Error opening data file /usr/local/share/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
List of available languages (2):
eng
spa
[root#cia tessdata]#
however when I run
[root#cia tessdata]# ls -l /usr/local/share/tessdata/
total 328
drwxr-xr-x. 2 root root 4096 Nov 17 23:28 configs
-rw-r--r--. 1 root root 164228 Nov 18 06:11 eng.traineddata
-rw-r--r--. 1 root root 572 Nov 17 23:28 pdf.ttf
-rw-r--r--. 1 root root 157745 Nov 18 06:11 spa.traineddata
drwxr-xr-x. 2 root root 98 Nov 17 23:28 tessconfigs
[root#cia tessdata]#
I get eng.traineddata and spa.traineddata in this form:
cd /usr/local/share/tessdata
wget https://github.com/tesseract-ocr/tessdata/blob/main/eng.traineddata
wget https://github.com/tesseract-ocr/tessdata/blob/main/spa.traineddata
:::::::::::::::::::::::::::::::::::::::::::
allways I install languages with:
wget https://github.com/tesseract-ocr/tessdata/raw/master/eng.traineddata
wget https://github.com/tesseract-ocr/tessdata/raw/master/spa.traineddata
then allways tesseract work fine, but now this return 404
how I can fix?

why terminal output can't be saved to file when there's core dumped

I'm running an executable and trying to save terminal output to a file:
# ll
total 132
-rw-r--r--. 1 root root 496 Jun 14 11:41 mpx-debug.h
-rw-r--r--. 1 root root 12775 Jun 14 11:41 mpx-dig.c
-rw-r--r--. 1 root root 3526 Jun 14 11:41 mpx-hw.h
-rwxr-xr-x. 1 root root 65176 Jun 14 14:28 mpx-mini-test
-rw-r--r--. 1 root root 40480 Jun 14 11:41 mpx-mini-test.c
-rw-r--r--. 1 root root 205 Jun 14 11:41 mpx-mm.h
# ./mpx-mini-test
XSAVE is supported by HW & OS
XSAVE processor supported state mask: 0x1f
XSAVE OS supported state mask: 0x1f
BNDREGS: size: 64 user: 1 supervisor: 0 aligned: 0
BNDCSR: size: 64 user: 1 supervisor: 0 aligned: 0
no MPX support
Aborted (core dumped)
#
# ./mpx-mini-test | tee -a mpx-mini-test.log
#
# cat mpx-mini-test.log
#
As you can see, there're some prints in terminal without "| tee -a **.log".
But with "| tee -a **.log", nothing is saved to file.
I suspect it has something to do with the "Abort (core dumped)", did some googling but can't figure out exactly why. Is there anyone knows why? And how could I save all terminal outputs(including the "Abort (core dumped)") to file? Thanks in advance.

Concourse Worker Failure on Ubuntu 14.04

After configuring a standalone Concourse 2.4.0 per the instructions, everything seems to be up and running. However, when trying to run the "hello world" example, I can see the following error in the Concourse UI:
runc create: exit status 1: rootfs ("/volumes/live/a72f9a0d-3506-489b-5b9b-168744b892c1/volume") does not exist
"web" start command:
./concourse web \
--basic-auth-username admin \
--basic-auth-password admin \
--session-signing-key session_signing_key \
--tsa-host-key host_key \
--tsa-authorized-keys authorized_worker_keys \
--external-url http://myconcoursedomain:8080 \
--postgres-data-source postgres://user:pass#mydbserver/concourse
"worker" start command:
./concourse worker \
--work-dir worker \
--tsa-host 127.0.0.1 \
--tsa-public-key host_key.pub \
--tsa-worker-private-key worker_key
I'm wondering if the problem occurs since the "missing" directory is created in the directory specified in the "start worker" command, instead of at the actual root directory:
~/concourse# ls -la worker
total 145740
drwxr-xr-x 5 root root 4096 Nov 15 23:07 .
drwxr-xr-x 3 root root 4096 Nov 15 23:07 ..
drwxr-xr-x 3 root root 4096 Nov 15 23:07 2.4.0
drwxr-xr-x 2 root root 4096 Nov 15 23:09 depot
drwxr-xr-x 1 root root 24 Nov 15 23:07 volumes
-rw-r--r-- 1 root root 42142052352 Nov 15 23:15 volumes.img
Concourse is installed on Ubuntu 14.04:
uname -r
4.4.0-47-generic
uname -a
Linux ubuntu-2gb-nyc3-01 4.4.0-47-generic #68~14.04.1-Ubuntu SMP Wed Oct 26 19:42:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
For reasons that I still do not understand, it appears that if you specify the --work-dir value to be /opt/concourse/worker, then the worker will work with this kernel version without issue.
I was using a relative path to a worker directory within a dir in my user folder as my --work-dir value.

custom yum repo not showing rpm

I have a yum repository I've set up where I store custom rpms.
I have no problem finding information about other packages that were built and stored in this custom repo.
#yum --disablerepo=rhui-us-east-rhel-server-1y,epel,epel-testing --enablerepo=customrepo install php53-pecl-xdebug
php53-pecl-xdebug x86_64 2.2.1-2 customrepo 132 k
No problem.
Now I drop somerpm.rpm in centos/repo/5/noarch, run createrepo --update . in this directory and try the same command, and yet it shows no results.
I tried running createrepo --update in the root of the repo as well, but that did not work either (I'm actually not sure where to run it and if it needs a repodata directory in each subdir).
[root#reposerver mnt]# ls -l /var/www/repo/
total 12
-rw-r--r-- 1 root root 203 Jun 8 00:13 REPO_README
drwxr-xr-x 3 root root 4096 Jun 10 2011 centos
drwxr-xr-x 2 root root 4096 Oct 18 20:02 repodata
[root#reposerver mnt]# ls -l /var/www/repo/centos/5/
SRPMS/ i386/ noarch/ repodata/ x86_64/
[root#reposerver mnt]# ls -l /var/www/repo/centos/5/noarch/
total 7324
-rw-r--r-- 1 root root 1622 Jun 28 2011 compat-php-5.1.6-1.noarch.rpm
drwxr-xr-x 2 root root 4096 Oct 18 19:55 repodata
-rw-r--r-- 1 root root 1066928 Oct 18 19:54 salt-0.10.3-1.noarch.rpm
-rw-r--r-- 1 root root 6363197 Oct 18 19:54 salt-0.10.3-1.src.rpm
-rw-r--r-- 1 root root 21822 Oct 18 19:54 salt-master-0.10.3-1.noarch.rpm
-rw-r--r-- 1 root root 14294 Oct 18 19:54 salt-minion-0.10.3-1.noarch.rpm
I also tried adding the exactarch=0 flag to my repo config to ignore arch restrictions and this did not work either, it was a shot in the dark, since my rpm is noarch, it should show regardless.
# cat /etc/yum.repos.d/mycompany.repo
[mycompany]
name=mycompany custom repo
baseurl=http://config/repo/centos/5/$basearch
enabled=1
exactarch=0
I'm at a loss at this point. Usually createrepo --update does the trick, but for some reason it cannot find the new rpms.
repo]# find . -type f -name "*.gz" | xargs zcat | grep salt-minion
returns results as well, so it's definitely in the repo data.
yum clean all on the server I was trying to install on worked.
Also make sure to do createrepo --update on the specific subdir instead of the root of the repo.

Build failed when installing node-postgres module for node.js

I'm very (very) new to node.js, and also fairly green when it comes to server side configuration and coding. (I have a long history of client-side programming, most recently with Adobe Flex and ActionScript.)
Anyhow, I asked Rackspace (who manages a Linux server for me) to install node.js and node-postgres.
From the comments in the ticket, that installation went like this:
node.js
Running Transaction
Installing : nodejs-stable-release [1/1]
Installed: nodejs-stable-release.noarch 0:5-3
Complete!
and node-postgres
[root#237175-web2 src]# npm install pg
npm http GET https://registry.npmjs.org/pg
npm http 200 https://registry.npmjs.org/pg
npm http GET https://registry.npmjs.org/pg/-/pg-0.6.17.tgz
npm http GET https://registry.npmjs.org/generic-pool/1.0.9
npm http 200 https://registry.npmjs.org/generic-pool/1.0.9
npm http GET https://registry.npmjs.org/generic-pool/-/generic-pool-1.0.9.tgz
pg#0.6.17 install /usr/src/node_modules/pg
node-waf configure build || (exit 0)
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : not found
Checking for node prefix : ok /usr
Checking for program pg_config : /usr/bin/pg_config
'configure' finished successfully (0.051s)
Waf: Entering directory `/usr/src/node_modules/pg/build'
[1/2] cxx: src/binding.cc -> build/Release/src/binding_1.o
[2/2] cxx_link: build/Release/src/binding_1.o -> build/Release/binding.node
Waf: Leaving directory `/usr/src/node_modules/pg/build'
'build' finished successfully (0.745s)
pg#0.6.17 ./node_modules/pg
+-- generic-pool#1.0.9
More info:
[root#237175-web2 ~]# ls -la /usr/src/node_modules/pg
total 68
drwxr-xr-x 9 root root 4096 Apr 26 22:34 .
drwxr-xr-x 3 root root 4096 Apr 26 22:34 ..
drwxr-xr-x 2 root root 4096 Apr 26 22:34 benchmark
drwxr-xr-x 4 root root 4096 Apr 26 22:34 build
drwxr-xr-x 3 root root 4096 Apr 26 22:34 lib
-rw-r--r-- 1 root root 5618 Apr 26 22:34 .lock-wscript
-rw-r--r-- 1 root root 1269 Feb 23 23:58 Makefile
drwxr-xr-x 3 root root 4096 Apr 26 22:34 node_modules
-rw-r--r-- 1 root root 21 Mar 3 15:19 .npmignore
-rw-r--r-- 1 root root 962 Apr 26 22:34 package.json
-rw-r--r-- 1 root root 6843 Mar 27 09:30 README.md
drwxr-xr-x 2 root root 4096 Apr 26 22:34 script
drwxr-xr-x 2 root root 4096 Mar 21 23:37 src
drwxr-xr-x 5 root root 4096 Apr 26 22:34 test
-rw-r--r-- 1 root root 990 Feb 23 23:58 wscript
[root#237175-web2 ~]#
A little “Hello world” node.js example works fine (hooray!), but a simple Postgres example fails on the require('pg') statement, saying that the module cannot be found. I've looked on the server and can't find a pg.js file anywhere.
Any clue as to why the node-postgres build failed?
Install it globally:
npm install -g pg
You may need to become root, e.g. with
sudo npm install -g pg