Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qemu-system-x86_64: Failed to get "write" lock #72

Open
RaghuShankarATX opened this issue Dec 6, 2022 · 1 comment
Open

qemu-system-x86_64: Failed to get "write" lock #72

RaghuShankarATX opened this issue Dec 6, 2022 · 1 comment

Comments

@RaghuShankarATX
Copy link

Trying set up Swarm-u for first time using Quick Start guide posted here https://vhive-serverless.github.io/vSwarm-u/quick_start/

Completed setup/setup_host.sh with no errors

Now I'm testing downloads
$ make -f test/Makefile all_emu

I get this error "Failed to get write lock" for disk.qcow2 - This is the only process on my system

Running this on Dell laptop with Ubuntu 20.04.5 LTS with 12th Gen Intel Core i7-12800H
$ egrep -c '(vmx|svm)' /proc/cpuinfo
40

DETAILS BELOW:
~/swarm/vSwarm-u-main$ make -f test/Makefile all_emu
make -f /home/raghu/swarm/vSwarm-u-main/test/Makefile build
make[1]: Entering directory '/home/raghu/swarm/vSwarm-u-main'
make[1]: Nothing to be done for 'build'.
make[1]: Leaving directory '/home/raghu/swarm/vSwarm-u-main'
make -f /home/raghu/swarm/vSwarm-u-main/test/Makefile run_emu_test
make[1]: Entering directory '/home/raghu/swarm/vSwarm-u-main'
if [ -f test_dir//test.log ]; then rm test_dir//test.log; fi
make -f /home/raghu/swarm/vSwarm-u-main/test/Makefile create_run_script
make[2]: Entering directory '/home/raghu/swarm/vSwarm-u-main'
cp /home/raghu/swarm/vSwarm-u-main/test/run_emu_test.template.sh test_dir//run.sh
make[2]: Leaving directory '/home/raghu/swarm/vSwarm-u-main'
make -f /home/raghu/swarm/vSwarm-u-main/test/Makefile serve_start
make[2]: Entering directory '/home/raghu/swarm/vSwarm-u-main'
make[2]: Nothing to be done for 'serve_start'.
make[2]: Leaving directory '/home/raghu/swarm/vSwarm-u-main'
make -f /home/raghu/swarm/vSwarm-u-main/test/Makefile run_kvm
make[2]: Entering directory '/home/raghu/swarm/vSwarm-u-main'
sudo qemu-system-x86_64
-nographic
-cpu host -enable-kvm
-smp 2
-m 2G
-drive file=test_dir//disk.qcow2,format=qcow2,if=virtio
-kernel test_dir//kernel
-append 'console=ttyS0 root=/dev/vda2'
[sudo] password for raghu:
qemu-system-x86_64: -drive file=test_dir//disk.qcow2,format=qcow2,if=virtio: Failed to get "write" lock
Is another process using the image [test_dir//disk.qcow2]?
make[2]: *** [/home/raghu/swarm/vSwarm-u-main/test/Makefile:185: run_kvm] Error 1
make[2]: Leaving directory '/home/raghu/swarm/vSwarm-u-main'
make[1]: *** [/home/raghu/swarm/vSwarm-u-main/test/Makefile:232: run_test] Error 2
make[1]: Leaving directory '/home/raghu/swarm/vSwarm-u-main'
make: *** [test/Makefile:60: all_emu] Error 2

@RaghuShankarATX
Copy link
Author

RaghuShankarATX commented Dec 6, 2022

Also I've issued the first 2 commands repeatedly to kill any lingering processes & yet I see 3 processes in the lsof command
lslocks command does not show any qemu or qcow2 entries

Help to solve "failed to get write lock error" in above post

$ make -f simulation/Makefile kill_gem5
for p in ; do echo $p; sudo kill $p; don

$ make -f test/Makefile clean
if [ -e test_dir//server.pid ]; then kill cat test_dir//server.pid && rm test_dir//server.pid 2> /dev/null; fi
/bin/sh: 1: kill: No such process
make: *** [test/Makefile:333: serve_stop] Error 1

$ sudo lsof | grep qcow
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1001/gvfs
Output information may be incomplete.
lsof: WARNING: can't stat() fuse file system /run/user/1001/doc
Output information may be incomplete.
qemu-syst 8175 root 10u REG 259,3 6534463488 13768943 /home/raghu/swarm/vSwarm-u-main/test_dir/disk.qcow2
qemu-syst 8175 8176 qemu-syst root 10u REG 259,3 6534463488 13768943 /home/raghu/swarm/vSwarm-u-main/test_dir/disk.qcow2
qemu-syst 8175 8180 qemu-syst root 10u REG 259,3 6534463488 13768943 /home/raghu/swarm/vSwarm-u-main/test_dir/disk.qcow2
qemu-syst 8175 8181 qemu-syst root 10u REG 259,3 6534463488 13768943 /home/raghu/swarm/vSwarm-u-main/test_dir/disk.qcow2

$ lslocks | grep qemu
.. empty set ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant