Change:
Describe the bug On the branch 19.09, when i start a test interactively, the QEMU process segfaults. It works well when executed non interactively. To Reproduce In the kernel logs, i can see: Additional context The host kernel is and the nixpkgs commit of the NixOS deployment is (release 19.03). It seems to be working fine for a friend of mine, so it may be related to the execution environment.
I've been running VMs off unstable and 19.09 all week without issues. (host runs unstable) I believe it's because your host system is on 19.03 and the configuration you've built to run interactively is on 19.09. Though I wouldn't expect this to segfault, I've seen things like this happen before in a similar circumstance.
I upgraded to my host to 19.09 and i still run into this issue:( are you running VMs interactively?
Yes I have Perhaps hardware information could benefit this report, it could be an issue in QEMU.
So, I just tried to run the vm as root and it works well:/
if you're on a default 19.09, there should be a coredump, available via . Could you post the backtrace here - it might be helpful.
Thanks to the core dump, i have disable qemu () in the test vm and the process is no longer segfaulting! So, the culprit seems to be gtk. Here is the trace:
a segfault in sounds scary - what CPU is this running on?
Ok, it works well when I . It seems to be the same kind of issue than
cc
I guess it needs a wrapper. Pretty sure you don't run into ever if the executable is wrapped.
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly: for maintainers and people that previously touched the related code and @ mention them in a comment. on the . 3. Ask on the on .
It seems simply invokes , and wrapping gtk binaries is as simple as , so I opened this PR. I'd appreciate if you could test this, as I wasn't able to reproduce this issue locally.
I'm unfortunately no longer able to reproduce:(

Discussion:
, seccompSupport ? stdenv.isLinux, libseccomp , pulseSupport ? !stdenv.isDarwin, libpulseaudio , sdlSupport ? !stdenv.isDarwin, SDL2 <del> , gtkSupport ? !stdenv.isDarwin && !xenSupport, gtk3, gettext, vte </del> <ins> , gtkSupport ? !stdenv.isDarwin && !xenSupport, gtk3, gettext, vte, wrapGAppsHook </ins> , vncSupport ? true, libjpeg, libpng , smartcardSupport ? true, libcacard , spiceSupport ? !stdenv.isDarwin, spice, spice-protocol

sha256 = "1gczv8hn3wqci86css3mhzrppp3z8vppxw25l08j589k6bvz7x1w"; }; <del> nativeBuildInputs = [ python python.pkgs.sphinx pkgconfig flex bison ]; </del> <ins> nativeBuildInputs = [ python python.pkgs.sphinx pkgconfig flex bison ] ++ optionals gtkSupport [ wrapGAppsHook ]; </ins> buildInputs = [ zlib glib ncurses perl pixman vde2 texinfo makeWrapper lzo snappy

++ optional smbdSupport "--smbd=${samba}/bin/smbd"; doCheck = false; # tries to access /dev <ins> dontWrapGApps = true; </ins> <del> postFixup = '' </del> <ins> postFixup = '' </ins> # copy qemu-ga (guest agent) to separate output mkdir -p $ga/bin cp $out/bin/qemu-ga $ga/bin/ <ins> '' + optionalString gtkSupport '' # wrap GTK Binaries for f in $out/bin/qemu-system-*; do wrapGApp $f done </ins> ''; # Add a ‘qemu-kvm’ wrapper for compatibility/convenience.