No such device (os error 19) ERROR crosvm exiting with error 1: failed to create IRQ chip

262 views
Skip to first unread message

Mario Marietto

unread,
Sep 20, 2024, 3:44:24 PM9/20/24
to crosvm-dev

Hello.

I'm trying an experiment that no one has tried yet : trying to boot up Android cuttlefish on my Jetson nano 4 GB,where I have installed Ubuntu 22.04 and the kernel 4.9. At the beginning the default compiler was gcc 7.5 linaro. So the first thing that I did was to upgrade it.

Based on this tutorial :

https://linaro.atlassian.net/wiki/spaces/QEMU/pages/29464068097/Run+Android+using+QEMU


This is what I did :


#
sudo apt install -y git devscripts equivs config-package-dev debhelper-compat golang curl
#
git clone https://github.com/google/android-cuttlefish
# cd android-cuttlefish
# tools/buildutils/build_packages.sh
# sudo dpkg -i ./cuttlefish-base_*_*64.deb || sudo apt-get install -f
# sudo dpkg -i ./cuttlefish-user_*_*64.deb || sudo apt-get install -f
# sudo usermod -aG kvm,cvdnetwork,render $USER


This is what happened :


aresuser@jetson:~/Scrivania/Android/android-image$ HOME=$(pwd) ./bin/launch_cvd -report_anonymous_usage_stats=n --start_webrtc=false

09-18 23:17:33.233  8190  8190 I launch_cvd: main.cc:235 Using system_image_dir of:
===================================================================
NOTICE:

By using this Android Virtual Device, you agree to
Google Terms of Service (https://policies.google.com/terms).
The Google Privacy Policy (https://policies.google.com/privacy)
describes how Google handles information generated as you use
Google Services.
===================================================================

Reading --config option from: /home/aresuser/Scrivania/Android/android-image/android-info.txt
Launching CVD using --config='phone'.

GPU auto mode: did not detect prerequisites for accelerated rendering support, enabling --gpu_mode=guest_swiftshader.


GPU vhost user auto mode: not needed for --gpu_mode=guest_swiftshader. Not enabling vhost user gpu.

Path for instance UDS: /tmp/cf_avd_1000
The following lines contain useful debugging information:
  Serial console is disabled; use -console=true to enable it.

  Logcat output: /home/aresuser/Scrivania/Android/android-image/cuttlefish/instances/cvd-1/logs/logcat

  Kernel log: /home/aresuser/Scrivania/Android/android-image/cuttlefish/instances/cvd-1/kernel.log

  Launcher log: /home/aresuser/Scrivania/Android/android-image/cuttlefish/instances/cvd-1/logs/launcher.log

  Instance configuration: /home/aresuser/Scrivania/Android/android-image/cuttlefish/instances/cvd-1/cuttlefish_config.json
  Launcher Build ID: 12309296

VhostDeviceVsock::vhost param is:guest-cid=3,socket=/tmp/vsock_3_1000/vhost.socket,uds-path=/tmp/vsock_3_1000/vm.vsock

/home/aresuser/Scrivania/Android/android-image/bin/modem_simulator
/home/aresuser/Scrivania/Android/android-image/bin/tombstone_receiver
/home/aresuser/Scrivania/Android/android-image/bin/log_tee
/home/aresuser/Scrivania/Android/android-image/bin/process_restarter
/home/aresuser/Scrivania/Android/android-image/bin/log_tee
/home/aresuser/Scrivania/Android/android-image/bin/process_restarter
/home/aresuser/Scrivania/Android/android-image/bin/log_tee
/home/aresuser/Scrivania/Android/android-image/bin/wmediumd
/home/aresuser/Scrivania/Android/android-image/bin/casimir_control_server
/home/aresuser/Scrivania/Android/android-image/bin/screen_recording_server
/home/aresuser/Scrivania/Android/android-image/bin/adb_connector
/home/aresuser/Scrivania/Android/android-image/bin/socket_vsock_proxy
/home/aresuser/Scrivania/Android/android-image/bin/socket_vsock_proxy
/home/aresuser/Scrivania/Android/android-image/bin/tcp_connector
/home/aresuser/Scrivania/Android/android-image/bin/control_env_proxy_server
/home/aresuser/Scrivania/Android/android-image/bin/echo_server
/home/aresuser/Scrivania/Android/android-image/bin/gnss_grpc_proxy
/home/aresuser/Scrivania/Android/android-image/bin/logcat_receiver
/home/aresuser/Scrivania/Android/android-image/bin/kernel_log_monitor
/home/aresuser/Scrivania/Android/android-image/bin/openwrt_control_server
/home/aresuser/Scrivania/Android/android-image/bin/log_tee
/home/aresuser/Scrivania/Android/android-image/bin/process_restarter
/home/aresuser/Scrivania/Android/android-image/bin/netsimd
/home/aresuser/Scrivania/Android/android-image/bin/socket_vsock_proxy
/home/aresuser/Scrivania/Android/android-image/bin/socket_vsock_proxy
/home/aresuser/Scrivania/Android/android-image/bin/secure_env
/home/aresuser/Scrivania/Android/android-image/bin/log_tee
/home/aresuser/Scrivania/Android/android-image/bin/process_restarter

Start modem simulator, server_fds: 77, Sim type: normal

Server listening on unix:/tmp/cf_avd_1000/cvd-1/grpc_socket/CasimirControlServer.sock

Server listening on unix:/tmp/cf_avd_1000/cvd-1/grpc_socket/EchoServer.sock

Failed to open socket: Connection refused

Server listening on unix:/tmp/cf_avd_1000/cvd-1/grpc_socket/OpenwrtControlServer.sock

Server listening on unix:/tmp/cf_avd_1000/cvd-1/grpc_socket/ControlEnvProxyServer.sock

root-canal I 09-18 23:17:42.827 device_boutique.cc:37                    Registering beacon

root-canal I 09-18 23:17:42.827 device_boutique.cc:37                    Registering beacon_swarm

root-canal I 09-18 23:17:42.827 device_boutique.cc:37                    Registering scripted_beacon

root-canal I 09-18 23:17:42.827 device_boutique.cc:37                    Registering sniffer

netsimd I 09-18 21:17:42.829 rust_main.rs:98 - netsim artifacts path: "/tmp/android-aresuser/netsimd"

netsimd I 09-18 21:17:42.829 rust_main.rs:101 - NetsimdArgs {
    fd_startup_str: Some(
        "{\"devices\":[{\"name\":\"0.0.0.0:6520\",\"chips\":[{\"kind\":\"BLUETOOTH\",\"fdIn\":98,\"fdOut\":99},{\"kind\":\"UWB\",\"fdIn\":100,\"fdOut\":101}]}]}",

[2024-09-18T21:17:43.082340806+00:00 ERROR crosvm] exiting with error 1: failed to create IRQ chip

Caused by:
    No such device (os error 19)
[2024-09-18T21:17:43.089676197+00:00 ERROR crosvm] exiting with error 1: failed to create IRQ chip

Caused by:
    No such device (os error 19)

Detected unexpected exit of monitored subprocess /home/aresuser/Scrivania/Android/android-image/bin/process_restarter

Subprocess /home/aresuser/Scrivania/Android/android-image/bin/process_restarter (8286) has exited with exit code 1

Detected unexpected exit of monitored subprocess /home/aresuser/Scrivania/Android/android-image/bin/process_restarter

Subprocess /home/aresuser/Scrivania/Android/android-image/bin/process_restarter (8310) has exited with exit code 1

Stopping all monitored processes due to unexpected exit of critical process

starting Rust KeyMint TA implementation in a thread

starting C++ KeyMint implementation in a thread with FDs in=31, out=30

KeyMint Rust TA running with infile=37, outfile=36, security_level=Software

Secure deletion data file found. Parsing.

transport message failed, response body: device '0.0.0.0:6520' not found
transport message failed, response body: device '0.0.0.0:6520' not found

aresuser@jetson:~$ adb devices
List of devices attached

nothing.

A developer told me :

Just found a public report of this bug here from August this year. 

https://issuetracker.google.com/issues/361302729.

The issue was resolved by patching crosvm - 


Can you cherry-pick that change into your crosvm build in external/crosvm and rebuild / relaunch?

If you're using prebuilts from ci.android.com - you'll have to wait a little bit for the change to get merged into the android tree. We can get that sped up if that's what you're doing. Let us know.

And then he didn't reply anymore. Someone can explain to me what should I do to fix the error ? thanks.

Daniel Verkamp

unread,
Sep 20, 2024, 3:59:37 PM9/20/24
to Mario Marietto, crosvm-dev
On Fri, Sep 20, 2024 at 12:44 PM Mario Marietto <mariet...@gmail.com> wrote:
>
> Hello.
>
> I'm trying an experiment that no one has tried yet : trying to boot up Android cuttlefish on my Jetson nano 4 GB,where I have installed Ubuntu 22.04 and the kernel 4.9. At the beginning the default compiler was gcc 7.5 linaro. So the first thing that I did was to upgrade it.
[...]
> [2024-09-18T21:17:43.082340806+00:00 ERROR crosvm] exiting with error 1: failed to create IRQ chip
>
> Caused by:
> No such device (os error 19)

I would guess this is probably not related to the Rust 1.78 bug, but
more likely missing functionality in the Jetson Nano kernel
specifically; a quick search turns up some instructions with a kernel
patch to enable creating a KVM irqchip:
https://github.com/lattice0/jetson_nano_kvm

However, Linux 4.9 is also quite old and it's likely other required
functionality is missing; crosvm requires at least Linux 4.14 for
KVM_CAP_IMMEDIATE_EXIT, among other things, so you may have better
luck with a newer kernel version.

-- Daniel

Mario Marietto

unread,
Sep 20, 2024, 4:40:59 PM9/20/24
to Daniel Verkamp, crosvm-dev
Thanks.

very good points. I forgot to mention that I have already patched the kernel of the Jetson nano and I have enabled KVM,using these patches :


Anyway,I'm not sure if those patches include the KVM irqchip. I've asked Matt Madison,the owner of that github,but he said that he does not know. Can you give a look ? Very thanks.
--
Mario.

Mario Marietto

unread,
Sep 20, 2024, 4:41:03 PM9/20/24
to Daniel Verkamp, crosvm-dev
Please give a look also here :


because this is the discussion that I've started,where I show that I can use the Android emulator without problems,but not Android Cuttlefish...
--
Mario.

Mario Marietto

unread,
Sep 30, 2024, 2:16:22 PM9/30/24
to Daniel Verkamp, crosvm-dev

Hello.

I've emulated RaspiOS based on Debian Bookworm on Ubuntu 24.04 X64 bit using this script assembled by me :

if pgrep -f qemu-system-aarch64 &> /dev/null 2>&1;
then
  echo "success"
  sleep 1

   qemu-system-aarch64 -machine virt-9.0,virtualization=on,gic_version=3 -cpu max -smp 8 -m 8G -kernel /home/ziomario/Scaricati/RaspiOS/Image -append "root=/dev/vda2 rootfstype=ext4 rw panic=0 console=ttyAMA0 kvm-arm.mode=nested" -drive format=raw,file=/home/ziomario/Scaricati/RaspiOS/2024-07-04-raspios-bookworm-arm64-big.img,if=none,id=hd0 -device virtio-blk,drive=hd0,bootindex=0 -netdev tap,id=mynet0,ifname=tap0,script=no,downscript=no -device virtio-net-pci,netdev=mynet0,mac=52:55:00:d1:55:01 -device usb-ehci -device usb-kbd -device virtio-tablet-pci -usb -device virtio-serial-pci -spice port=5930,disable-ticketing=on -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 -chardev spicevmc,id=spicechannel0,name=vdagent -display spice-app&

else

  echo "error"
  sleep 1
  brctl addbr br0
  sleep 1
  ip addr flush dev eno1
  sleep 1
  brctl addif br0 eno1
  sleep 1
  tunctl -t tap0 -u `whoami`
  sleep 1
  brctl addif br0 tap0
  sleep 1
  ifconfig eno1 up
  sleep 1
  ifconfig tap0 up
  sleep 1
  ifconfig br0 up
  sleep 1
  dhclient -v br0
  sleep 1

  qemu-system-aarch64 -machine virt-9.0,virtualization=on,gic_version=3 -cpu max -smp 8 -m 8G -kernel /home/ziomario/Scaricati/RaspiOS/Image -append "root=/dev/vda2 rootfstype=ext4 rw panic=0 console=ttyAMA0 kvm-arm.mode=nested" -drive format=raw,file=/home/ziomario/Scaricati/RaspiOS/2024-07-04-raspios-bookworm-arm64-big.img,if=none,id=hd0 -device virtio-blk,drive=hd0,bootindex=0 -netdev tap,id=mynet0,ifname=tap0,script=no,downscript=no -device virtio-net-pci,netdev=mynet0,mac=52:55:00:d1:55:01 -device usb-ehci -device usb-kbd -device virtio-tablet-pci -usb -device virtio-serial-pci -spice port=5930,disable-ticketing=on -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 -chardev spicevmc,id=spicechannel0,name=vdagent -display spice-app&
fi

As you can read, in qemu I'm using a kernel that I have compiled by myself using this procedure :


# sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev

#
sudo apt install crossbuild-essential-arm64

# wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.34.tar.xz $ tar xvJf linux-6.1.34.tar.xz $ cd linux-6.1.34 $ ARCH=arm64 CROSS_COMPILE=/bin/aarch64-linux-gnu- make defconfig $ ARCH=arm64 CROSS_COMPILE=/bin/aarch64-linux-gnu- make kvm_guest.config $ ARCH=arm64 CROSS_COMPILE=/bin/aarch64-linux-gnu- make -j8

and,inside the VM I've installed the kernel modules using this command :


$ make modules_install
and I've loaded the following modules with this command :

# sudo modprobe fuse
# sudo modprobe vhost_net

as you can see they have been loaded succesfully :

pi@raspberrypi:~/Scaricati/Files/android-image $ less /proc/modules

cfg80211 380928 0 - Live 0x0000000000000000
rfkill 32768 2 cfg80211, Live 0x0000000000000000
ipv6 458752 56 [permanent], Live 0x0000000000000000
vhost_net 28672 0 - Live 0x0000000000000000
vhost 49152 1 vhost_net, Live 0x0000000000000000
vhost_iotlb 16384 1 vhost, Live 0x0000000000000000
tap 28672 1 vhost_net, Live 0x0000000000000000

In addition,since I've used "qemu-system-aarch64 -machine virt-9.0,virtualization=on,gic_version=3",I have enabled kvm inside the VM :

pi@raspberrypi:~/Scaricati/Files/android-image $ kvm-ok
 
INFO: /dev/kvm exists
KVM acceleration can be used

Maybe you can somewhat doubt that vhost_net is not working properly,but it is working properly. In Fact it works since I can start succesfully the nginx service :

pi@raspberrypi:~/Scaricati/Files/android-image $ systemctl status nginx.service
nginx.service - A high performance web server and a reverse proxy server
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
    Active: active (running) since Sun 2024-09-29 13:17:30 CEST; 11min ago
      Docs: man:nginx(8)
   Process: 514686 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Process: 514687 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
  Main PID: 514688 (nginx)
     Tasks: 9 (limit: 9481)
    Memory: 5.5M
       CPU: 1.034s
    CGroup: /system.slice/nginx.service
            ├─514688 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
            ├─514689 "nginx: worker process"
            ├─514690 "nginx: worker process"
            ├─514691 "nginx: worker process"
            ├─514692 "nginx: worker process"
            ├─514693 "nginx: worker process"
            ├─514694 "nginx: worker process"
            ├─514695 "nginx: worker process"
            └─514696 "nginx: worker process"
set 29 13:17:30 raspberrypi systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
set 29 13:17:30 raspberrypi systemd[1]: Started nginx.service - A high performance web server and a reverse proxy server.

While,without it,nginx service does not work :

pi@raspberrypi:~/Scaricati/android-cuttlefish $ sudo apt install nginx

Configurazione di nginx (1.22.1-9)...
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.
invoke-rc.d: initscript nginx, action "start" failed.
× nginx.service - A high performance web server and a reverse proxy server
    Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
    Active: failed (Result: exit-code) since Thu 2024-09-26 16:56:39 CEST; 320ms ago
      Docs: man:nginx(8)
   Process: 29970 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
       CPU: 269ms

set 26 16:56:39 raspberrypi systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...

set 26 16:56:39 raspberrypi nginx[29970]: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)

set 26 16:56:39 raspberrypi nginx[29970]: nginx: configuration file /etc/nginx/nginx.conf test failed
set 26 16:56:39 raspberrypi systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
set 26 16:56:39 raspberrypi systemd[1]: nginx.service: Failed with result 'exit-code'.

Now that vhost_net , kvm and a modern kernel (6.x and not the 4.x of the Jetson Nano),are in place and needed by crosvm,I tried to launch_cvd :

pi@raspberrypi:~/Scaricati/Files/android-image $ sudo HOME=$(pwd) ./bin/launch_cvd -report_anonymous_usage_stats=n --start_webrtc=false

[sudo] password di pi:
09-29 11:59:22.891 465420 465420 I launch_cvd: main.cc:235 Using system_image_dir of:
===================================================================
NOTICE:

By using this Android Virtual Device, you agree to
Google Terms of Service (https://policies.google.com/terms).
The Google Privacy Policy (https://policies.google.com/privacy)
describes how Google handles information generated as you use
Google Services.
===================================================================

Reading --config option from: /home/pi/Scaricati/Files/android-image/android-info.txt

Launching CVD using --config='phone'.
GPU auto mode: did not detect prerequisites for accelerated rendering support, enabling --gpu_mode=guest_swiftshader.
GPU vhost user auto mode: not needed for --gpu_mode=guest_swiftshader. Not enabling vhost user gpu.
Path for instance UDS: /tmp/cf_avd_0

The following lines contain useful debugging information:
  Serial console is disabled; use -console=true to enable it.
  Logcat output: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/logs/logcat
  Kernel log: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/kernel.log
  Launcher log: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/logs/launcher.log
  Instance configuration: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/cuttlefish_config.json
  Launcher Build ID: 12309296
VhostDeviceVsock::vhost param is:guest-cid=3,socket=/tmp/vsock_3_0/vhost.socket,uds-path=/tmp/vsock_3_0/vm.vsock
/home/pi/Scaricati/Files/android-image/bin/modem_simulator
/home/pi/Scaricati/Files/android-image/bin/tombstone_receiver
/home/pi/Scaricati/Files/android-image/bin/log_tee
/home/pi/Scaricati/Files/android-image/bin/process_restarter
/home/pi/Scaricati/Files/android-image/bin/log_tee
/home/pi/Scaricati/Files/android-image/bin/process_restarter
Start modem simulator, server_fds: 74, Sim type: normal
/home/pi/Scaricati/Files/android-image/bin/log_tee
/home/pi/Scaricati/Files/android-image/bin/wmediumd
/home/pi/Scaricati/Files/android-image/bin/casimir_control_server
/home/pi/Scaricati/Files/android-image/bin/screen_recording_server
/home/pi/Scaricati/Files/android-image/bin/adb_connector
/home/pi/Scaricati/Files/android-image/bin/socket_vsock_proxy
/home/pi/Scaricati/Files/android-image/bin/socket_vsock_proxy
/home/pi/Scaricati/Files/android-image/bin/tcp_connector
/home/pi/Scaricati/Files/android-image/bin/control_env_proxy_server
/home/pi/Scaricati/Files/android-image/bin/echo_server
/home/pi/Scaricati/Files/android-image/bin/gnss_grpc_proxy

Failed to open socket: Connection refused
/home/pi/Scaricati/Files/android-image/bin/logcat_receiver
/home/pi/Scaricati/Files/android-image/bin/kernel_log_monitor
/home/pi/Scaricati/Files/android-image/bin/openwrt_control_server

Failed to open socket: Connection refused
Server listening on unix:/tmp/cf_avd_0/cvd-1/grpc_socket/EchoServer.sock
Server listening on unix:/tmp/cf_avd_0/cvd-1/grpc_socket/ControlEnvProxyServer.sock

Failed to open socket: Connection refused
/home/pi/Scaricati/Files/android-image/bin/log_tee
Server listening on unix:/tmp/cf_avd_0/cvd-1/grpc_socket/CasimirControlServer.sock
/home/pi/Scaricati/Files/android-image/bin/process_restarter
/home/pi/Scaricati/Files/android-image/bin/netsimd

Failed to open socket: Connection refused
/home/pi/Scaricati/Files/android-image/bin/socket_vsock_proxy
/home/pi/Scaricati/Files/android-image/bin/socket_vsock_proxy
/home/pi/Scaricati/Files/android-image/bin/secure_env
/home/pi/Scaricati/Files/android-image/bin/log_tee
Server listening on unix:/tmp/cf_avd_0/cvd-1/grpc_socket/OpenwrtControlServer.sock


Failed to open socket: Connection refused
/home/pi/Scaricati/Files/android-image/bin/process_restarter
proxy_socket_vsock_proxy] Could not open vsock socket: Address family not supported by protocol
Failed to open socket: Connection refused
proxy_socket_vsock_proxy] Could not open vsock socket: Address family not supported by protocol

[2024-09-29T10:00:31.116681583+00:00 INFO  crosvm::crosvm::sys::linux::device_helpers] Trying to attach block device: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/ap_overlay.img
root-canal I 09-29 12:00:31.572 device_boutique.cc:37                    Registering beacon
root-canal I 09-29 12:00:31.581 device_boutique.cc:37                    Registering beacon_swarm
root-canal I 09-29 12:00:31.586 device_boutique.cc:37                    Registering scripted_beacon
root-canal I 09-29 12:00:31.591 device_boutique.cc:37                    Registering sniffer
netsimd I 09-29 10:00:31.699 rust_main.rs:98 - netsim artifacts path: "/tmp/android-root/netsimd"
netsimd I 09-29 10:00:31.701 rust_main.rs:101 - NetsimdArgs {
starting Rust KeyMint TA implementation in a thread
starting C++ KeyMint implementation in a thread with FDs in=36, out=35
KeyMint Rust TA running with infile=42, outfile=41, security_level=Software

Secure deletion data file found. Parsing.
[2024-09-29T10:00:33.389202419+00:00 INFO  crosvm::crosvm::sys::linux::device_helpers] Trying to attach block device: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/overlay.img

transport message failed, response body: device '0.0.0.0:6520' not found
[2024-09-29T10:00:37.523418049+00:00 INFO  crosvm::crosvm::sys::linux::device_helpers] Trying to attach block device: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/persistent_composite.img

transport message failed, response body: device '0.0.0.0:6520' not found

So what's the problem now ? Why is it not still working ?


On Fri, Sep 20, 2024 at 9:59 PM Daniel Verkamp <dver...@google.com> wrote:


--
Mario.

Frederick Mayle

unread,
Sep 30, 2024, 4:05:30 PM9/30/24
to Mario Marietto, Daniel Verkamp, crosvm-dev
I think you are missing `modprobe vsock`

--
You received this message because you are subscribed to the Google Groups "crosvm-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crosvm-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/crosvm-dev/CA%2B1FSih1jundiYdEG9k%3DUQ%2BNwGRP3Ejnur3wm7s1A_QAhnKkUg%40mail.gmail.com.

Mario Marietto

unread,
Oct 1, 2024, 1:31:52 PM10/1/24
to Frederick Mayle, Daniel Verkamp, crosvm-dev
Thanks. I've compiled the vsock module and I've loaded inside the memory together with vhost :

pi@raspberrypi:~ $ less /proc/modules

vsock 49152 4 - Live 0x0000000000000000
vhost 49152 0 - Live 0x0000000000000000
vhost_iotlb 16384 1 vhost, Live 0x0000000000000000
crct10dif_ce 16384 1 - Live 0x0000000000000000
sm3_ce 16384 0 - Live 0x0000000000000000
sm3 24576 1 sm3_ce, Live 0x0000000000000000
sha3_ce 16384 0 - Live 0x0000000000000000
sha3_generic 16384 1 sha3_ce, Live 0x0000000000000000
sha512_ce 16384 0 - Live 0x0000000000000000
sha512_arm64 20480 1 sha512_ce, Live 0x0000000000000000
iptable_nat 16384 1 - Live 0x0000000000000000
xt_MASQUERADE 16384 22 - Live 0x0000000000000000
nf_nat 45056 2 iptable_nat,xt_MASQUERADE, Live 0x0000000000000000
nf_conntrack 122880 2 xt_MASQUERADE,nf_nat, Live 0x0000000000000000
nf_defrag_ipv6 20480 1 nf_conntrack, Live 0x0000000000000000
nf_defrag_ipv4 16384 1 nf_conntrack, Live 0x0000000000000000
libcrc32c 16384 2 nf_nat,nf_conntrack, Live 0x0000000000000000
bridge 253952 0 - Live 0x0000000000000000
stp 16384 1 bridge, Live 0x0000000000000000
llc 16384 2 bridge,stp, Live 0x0000000000000000
rfkill 32768 1 - Live 0x0000000000000000
qrtr 28672 4 - Live 0x0000000000000000
fuse 131072 3 - Live 0x0000000000000000
drm 557056 0 - Live 0x0000000000000000
dm_mod 131072 0 - Live 0x0000000000000000
ip_tables 32768 1 iptable_nat, Live 0x0000000000000000
x_tables 40960 3 iptable_nat,xt_MASQUERADE,ip_tables, Live 0x0000000000000000
ipv6 458752 99 bridge,[permanent], Live 0x0000000000000000


But as you can see below. Something still missing because I'm still getting the error : Failed to open socket: Connection refused


pi@raspberrypi:~/Scaricati/Files/android-image $ sudo HOME=$(pwd) ./bin/launch_cvd -report_anonymous_usage_stats=n --start_webrtc=false10-01 19:17:25.073 412180 412180 I launch_cvd: main.cc:235 Using system_image_dir of:  

===================================================================
NOTICE:

By using this Android Virtual Device, you agree to
Google Terms of Service (https://policies.google.com/terms).
The Google Privacy Policy (https://policies.google.com/privacy)
describes how Google handles information generated as you use
Google Services.
===================================================================

Reading --config option from: /home/pi/Scaricati/Files/android-image/android-info.txt
Launching CVD using --config='phone'.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
GPU auto mode: did not detect prerequisites for accelerated rendering support, enabling --gpu_mode=guest_swiftshader.
GPU vhost user auto mode: not needed for --gpu_mode=guest_swiftshader. Not enabling vhost user gpu.
Path for instance UDS: /tmp/cf_avd_0
The following lines contain useful debugging information:
 Serial console is disabled; use -console=true to enable it.
 Logcat output: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/logs/logcat
 Kernel log: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/kernel.log
 Launcher log: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/logs/launcher.log
 Instance configuration: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/cuttlefish_config.json
 Launcher Build ID: 12309296
VhostDeviceVsock::vhost param is:guest-cid=3,socket=/tmp/vsock_3_0/vhost.socket,uds-path=/tmp/vsock_
3_0/vm.vsock
/home/pi/Scaricati/Files/android-image/bin/modem_simulator
/home/pi/Scaricati/Files/android-image/bin/tombstone_receiver
/home/pi/Scaricati/Files/android-image/bin/log_tee
/home/pi/Scaricati/Files/android-image/bin/process_restarter
/home/pi/Scaricati/Files/android-image/bin/log_tee
/home/pi/Scaricati/Files/android-image/bin/process_restarter
/home/pi/Scaricati/Files/android-image/bin/log_tee
Start modem simulator, server_fds: 32, Sim type: normal
/home/pi/Scaricati/Files/android-image/bin/wmediumd
/home/pi/Scaricati/Files/android-image/bin/casimir_control_server
/home/pi/Scaricati/Files/android-image/bin/screen_recording_server
/home/pi/Scaricati/Files/android-image/bin/adb_connector
/home/pi/Scaricati/Files/android-image/bin/socket_vsock_proxy
/home/pi/Scaricati/Files/android-image/bin/socket_vsock_proxy
/home/pi/Scaricati/Files/android-image/bin/tcp_connector
/home/pi/Scaricati/Files/android-image/bin/control_env_proxy_server
/home/pi/Scaricati/Files/android-image/bin/echo_server
/home/pi/Scaricati/Files/android-image/bin/gnss_grpc_proxy
/home/pi/Scaricati/Files/android-image/bin/logcat_receiver
/home/pi/Scaricati/Files/android-image/bin/kernel_log_monitor
/home/pi/Scaricati/Files/android-image/bin/openwrt_control_server
/home/pi/Scaricati/Files/android-image/bin/log_tee
/home/pi/Scaricati/Files/android-image/bin/process_restarter
/home/pi/Scaricati/Files/android-image/bin/netsimd
Server listening on unix:/tmp/cf_avd_0/cvd-1/grpc_socket/CasimirControlServer.sock
/home/pi/Scaricati/Files/android-image/bin/socket_vsock_proxy

Failed to open socket: Connection refused

/home/pi/Scaricati/Files/android-image/bin/socket_vsock_proxy
/home/pi/Scaricati/Files/android-image/bin/secure_env
Server listening on unix:/tmp/cf_avd_0/cvd-1/grpc_socket/EchoServer.sock
/home/pi/Scaricati/Files/android-image/bin/log_tee
/home/pi/Scaricati/Files/android-image/bin/process_restarter

Failed to open socket: Connection refused

Server listening on unix:/tmp/cf_avd_0/cvd-1/grpc_socket/OpenwrtControlServer.sock
Server listening on unix:/tmp/cf_avd_0/cvd-1/grpc_socket/ControlEnvProxyServer.sock
root-canal I 10-01 19:18:15.505 device_boutique.cc:37                    Registering beacon
root-canal I 10-01 19:18:15.519 device_boutique.cc:37                    Registering beacon_swarm
root-canal I 10-01 19:18:15.528 device_boutique.cc:37                    Registering scripted_beacon
root-canal I 10-01 19:18:15.529 device_boutique.cc:37                    Registering sniffer
netsimd I 10-01 17:18:15.804 rust_main.rs:98 - netsim artifacts path: "/tmp/android-root/netsimd"
netsimd I 10-01 17:18:15.814 rust_main.rs:101 - NetsimdArgs {
   fd_startup_str: Some(
       "{\"devices\":[{\"name\":\"0.0.0.0:6520\",\"chips\":[{\"kind\":\"BLUETOOTH\",\"fdIn\":98,\"f
dOut\":99},{\"kind\":\"UWB\",\"fdIn\":100,\"fdOut\":101}]}]}",
   ),
   no_cli_ui: false,
   no_web_ui: false,
   pcap: false,
   disable_address_reuse: false,
   hci_port: Some(
       7300,
   ),
   connector_instance: None,
   instance: Some(
       1,
   ),
   logtostderr: false,
   dev: false,
   rust_grpc: false,
   rust_hostapd: false,
   rust_slirp: true,
   vsock: None,
   config: None,
   host_dns: None,
   http_proxy: None,
   wifi_tap: None,
   test_beacons: false,
   no_test_beacons: false,
   no_shutdown: false,
   verbose: false,
   version: false,
}
[2024-10-01T17:18:16.301537503+00:00 INFO  crosvm::crosvm::sys::linux::device_helpers] Trying to att
ach block device: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/ap_overlay.img
[2024-10-01T17:18:16.359050845+00:00 INFO  crosvm::crosvm::sys::linux::device_helpers] Trying to att
ach block device: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/overlay.img
starting Rust KeyMint TA implementation in a thread
starting C++ KeyMint implementation in a thread with FDs in=44, out=43
KeyMint Rust TA running with infile=50, outfile=49, security_level=Software
Secure deletion data file found. Parsing.
[2024-10-01T17:18:20.663955825+00:00 INFO  crosvm::crosvm::sys::linux::device_helpers] Trying to att

ach block device: /home/pi/Scaricati/Files/android-image/cuttlefish/instances/cvd-1/persistent_composite.img
transport message failed, response body: device '0.0.0.0:6520' not found

What's missing now ?


--
Mario.

Frederick Mayle

unread,
Oct 1, 2024, 1:36:14 PM10/1/24
to Mario Marietto, Daniel Verkamp, Cloud Android [External]
Adding cloud-an...@google.com and moving crosvm-dev to BCC since this is a cuttlefish issue

The vsock setup is odd to me. I see logs for vhost-user-vsock and also vhost-vsock. If the CF device is using vhost-user-vsock, then it makes sense that the socket_vsock_proxy would fail to connect via vhost-vsock.

Any CF folks have an idea what's going on? Is this a misconfiguration?


Reply all
Reply to author
Forward
0 new messages