Opened 3 months ago

Last modified 3 months ago

#70187 assigned defect

qemu @9.0.0 aborts on Sierra

Reported by: Randrianasulu (Andrew Randrianasulu) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version:
Keywords: legacy-os sierra Cc: herbygillot (Herby Gillot)
Port: qemu

Description (last modified by ryandesign (Ryan Carsten Schmidt))

 qemu-system-i386                                        Assertion failed: (mutex->initialized), function qemu_mutex_lock_impl, file ../qemu-9.0.0/util/qemu-thread-posix.c, line 92.                                                                          Abort trap: 6

====

from terminal and ssh session alike

Attachments (1)

qemu-system-x86_64_2024-06-07-212955-1_Andrews-MacBook-Pro.crash (44.5 KB) - added by Randrianasulu (Andrew Randrianasulu) 3 months ago.
crash report

Download all attachments as: .zip

Change History (12)

comment:1 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: herbygillot added
Description: modified (diff)
Keywords: legacy-os sierra added
Owner: set to raimue
Port: qemu added
Status: newassigned
Summary: qemu 9.0.0 aborts on Sierraqemu @9.0.0 aborts on Sierra

Could you attach the crash log which should have been generated by macOS in ~/Library/Logs/DiagnosticReports?

Changed 3 months ago by Randrianasulu (Andrew Randrianasulu)

crash report

comment:2 Changed 3 months ago by herbygillot (Herby Gillot)

qemu just updated to 9.0.1 - can you confirm that this is still happening?

comment:3 Changed 3 months ago by Randrianasulu (Andrew Randrianasulu)

I can't see it in my port tree?

sudo port search qemu
Password:
docker-machine-driver-qemu @20220617 (devel)
    Docker machine driver for pure qemu/kvm - no libvirt

qemu @9.0.0 (emulators)
    Emulator for various architectures

compiled my own 9.0.1 with those switches

./configure --target-list=x86_64-softmmu --objcc="/opt/local/bin/clang-mp-16" --disable-cocoa --disable-virtfs

and it sadly also aborts in same place

Last edited 3 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 3 months ago by herbygillot (Herby Gillot)

Probably need to selfupdate: sudo port selfupdate, then check for 9.0.1

comment:5 Changed 3 months ago by Randrianasulu (Andrew Randrianasulu)

qemu-system-x86_64 --version
Assertion failed: (mutex->initialized), function qemu_mutex_lock_impl, file ../qemu-9.0.1/util/qemu-thread-posix.c, line 92.
Abort trap: 6

:(

Last edited 3 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)

Then you'll probably want to report the bug to the developers of qemu so they can fix it. Share the bug report URL with us here.

comment:7 Changed 3 months ago by Randrianasulu (Andrew Randrianasulu)

considering

commit 2d27c91e2b72ac7a65504ac207c89262d92464eb
Author: Peter Maydell <peter.maydell@linaro.org>
Date:   Thu May 2 15:29:04 2024 +0100

    ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs

    We only support the most recent two versions of macOS (currently
    macOS 13 Ventura and macOS 14 Sonoma), and our ui/cocoa.m code
    already assumes at least macOS 12 Monterey or better, because it uses
    NSScreen safeAreaInsets, which is 12.0-or-newer.

    Remove the ifdefs that were providing backwards compatibility for
    building on 10.12 and earlier versions.

I doubt they care about older OSes

Last edited 3 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:8 Changed 3 months ago by Randrianasulu (Andrew Randrianasulu)

interesting enough 8.2.5 starts if compiled like this

./configure --target-list=x86_64-softmmu --objcc="/opt/local/bin/clang-mp-16" --disable-cocoa --disable-virtfs --disable-coreaudio --disable-plugins

comment:9 Changed 3 months ago by Randrianasulu (Andrew Randrianasulu)

and git bisect lead to this commit:

03e471c41d8b1b6eb16c9714f387449f52fe5c1d is the first bad commit
commit 03e471c41d8b1b6eb16c9714f387449f52fe5c1d
Author: Fiona Ebner <f.ebner@proxmox.com>
Date:   Mon Dec 18 11:13:40 2023 +0100

    qemu_init: increase NOFILE soft limit on POSIX
Last edited 3 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:10 Changed 3 months ago by Randrianasulu (Andrew Randrianasulu)

setting

ulimit -n 1024

for raising up from default 256 also fixes port-installed 9.0.1 startup from ssh console

Last edited 3 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:11 Changed 3 months ago by johnrosshunt

I haven't tested an image yet, but disabling cocoa, building with clang-16 and setting ulimit -n 1024 does the trick on Catalina.

$ sudo port install qemu -cocoa +curl +curses +ssh +target_alpha +target_ppc +target_xtensa +vde configure.compiler=macports-clang-16

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.7
BuildVersion:	19H2026

$ qemu-system-arm --version
Assertion failed: (mutex->initialized), function qemu_mutex_lock_impl, file ../qemu-9.0.1/util/qemu-thread-posix.c, line 92.
Abort trap: 6

$ ulimit -n 1024

$ qemu-system-arm --version
QEMU emulator version 9.0.1
Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers
Last edited 3 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)
Note: See TracTickets for help on using tickets.