summary refs log tree commit diff stats
path: root/results/classifier/gemma3:12b/permissions/515
diff options
context:
space:
mode:
Diffstat (limited to 'results/classifier/gemma3:12b/permissions/515')
-rw-r--r--results/classifier/gemma3:12b/permissions/51532
1 files changed, 32 insertions, 0 deletions
diff --git a/results/classifier/gemma3:12b/permissions/515 b/results/classifier/gemma3:12b/permissions/515
new file mode 100644
index 000000000..f20a395d8
--- /dev/null
+++ b/results/classifier/gemma3:12b/permissions/515
@@ -0,0 +1,32 @@
+
+qemu-system-x86_64 fails to run with regular user after following arch wiki article
+Description of problem:
+When `qemu-system-x86_64` binary is run with a regular user, it fails with no output. No matter if it's run with `--help`, `--version` or any other parameter. By checking the resulting error code (`echo $?`) it is possible to see that it finished with error code 1.
+
+After seeing this [post](https://www.reddit.com/r/archlinux/comments/b9emxp/qemusystemx86_64_does_not_execute_how_can_i/ek47btb/) on reddit, it became clear that the reason was that my `/etc` directory had a subdirectory qemu, in which my regular user did not have access to. That is, qemu binary looks for `/etc/qemu/qemu.conf` and if it can't determine if the file is there or not, it fails.
+
+Here goes the logic:
+strace showed the permission error (even though there was no output to indicate that).
+
+```
+$ strace /usr/bin/qemu-system-x86_64
+…
+mmap(NULL, 4928, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_POPULATE, 3, 0) = 0x7f4d01e6e000
+mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_POPULATE, 3, 0x10000000) = 0x7f4d01e6c000
+eventfd2(0, EFD_CLOEXEC|EFD_NONBLOCK)   = 4
+sysinfo({uptime=92539, loads=[109952, 80640, 118144], totalram=16643309568, freeram=5314445312, sharedram=2590158848, bufferram=1301561344, totalswap=20479733760, freeswap=19551150080, procs=1202, totalhigh=0, freehigh=0, mem_unit=1}) = 0
+rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=~[RTMIN RT_1], sa_flags=SA_RESTORER, sa_restorer=0x7f4d01ad7960}, NULL, 8) = 0
+openat(AT_FDCWD, "/etc/qemu/qemu.conf", O_RDONLY) = -1 EACCES (Permission denied)
+exit_group(1)                           = ?
++++ exited with 1 +++
+```
+
+The thing was that initially that folder did not exist, and I created it to make the qemu bridges work, like indicated in this arch wiki [article](https://wiki.archlinux.org/title/QEMU#Bridged_networking_using_qemu-bridge-helper). I will be suggesting modifications to that article.
+
+When the directory did not exit, qemu noticed that the folder didn't exist and moved on, once it was created, in case the regular user had no access to it, it fails with no warning.
+
+I just gave access to the folder ant it worked again (if you delete the folder it works too).
+
+If you use libvirt, by using virsh for example, you may not notice this issue as it may be running as system (by setting the following system variable `export LIBVIRT_DEFAULT_URI='qemu:///system'`) 
+
+So, to fix this issue, in my opinion a warning should be printed out to the stderr. Otherwise, qemu could move on if it doens't have access to `/etc/qemu/qemu.conf`.