qemu-system-sparc MUTEX_HELD assert and libC lock errors

Bug #1450881 reported by jdery
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

Here I am cross-posting a comment I made on Artyom's blog. Atar responded that he "fixed these issues for some customers". I hoped that opening a bug to the opensource project might help develop the solution for the public domain.

I now have a mostly-working Solaris 6 emulation, with great thanks to the valuable information in Artyom's blog, brezular.com, and the QEMU/Solaris 4.14 wikibook.

setup detail;
QEMU (present git snapshot, reports --version 2.2.92)
-M SS-20, openboot/proprietary prom

# uname -a
SunOS emu0 5.6 Generic_105181-33 sun4m sparc SUNW,SPARCstation-20

I continue to have a problem, which I have found others posted in blog comments, but have not seen a resolution yet.

# /etc/init.d/init.dmi start
Run-time error, libC:
Trying to release a lock that was not acquired in this thread
(repeat above 1x)
Abort - core dumped

as well as:
Assertion failed: MUTEX_HELD(&svc_mutex), file rpc/svc_run.c, line 766

which prints to the console periodically when "dmispd" is running.

Revision history for this message
Mark Cave-Ayland (mark-cave-ayland) wrote :

Yes, this is a known issue which I can reproduce using a Solaris installation. I still have a few outstanding bugs on my list to do before I can start looking into this one, but I will keep this bug up to date as/when I can start work on it - apologies for not being able to be more specific than this at the moment.

no longer affects: qemu (Ubuntu)
Revision history for this message
Pierre L (pierre-le-nahedic-external) wrote :

Hi all,
I also have this issue with my sparcstation installation :

Emulated OS : SunOS 5.5.1
Emulated Processor : sparc
Host machine OS : Linux RED HAT

Do you manage to fix it ?

Revision history for this message
Mark Cave-Ayland (mark-cave-ayland) wrote :

Not yet - things have been made much harder now as my original test image tends to hang for long periods of time instead of giving the MUTEX_HELD error. If you have an image that you would be willing to share for debugging, please get in touch via email and I'll try and take a look.

Revision history for this message
Mark Cave-Ayland (mark-cave-ayland) wrote :

Proposed patch posted to mailing list: https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg01645.html - please test and report back.

Revision history for this message
jdery (joedery) wrote : Re: [Bug 1450881] Re: qemu-system-sparc MUTEX_HELD assert and libC lock errors

re:
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index 58572c3..7998ff5 100644
...
- tcg_gen_qemu_ld8s(cpu_val, cpu_addr, dc->mem_idx);
+ tcg_gen_qemu_ld8u(cpu_val, cpu_addr, dc->mem_idx);

I confirmed this patch resolves MUTEX_HELD errors on a minimal testcase
solaris 6 image.
Thank you!

On Mon, Apr 11, 2016 at 7:03 AM, Mark Cave-Ayland <
<email address hidden>> wrote:

> Proposed patch posted to mailing list:
> https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg01645.html -
> please test and report back.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1450881
>
> Title:
> qemu-system-sparc MUTEX_HELD assert and libC lock errors
>
> Status in QEMU:
> New
>
> Bug description:
> Here I am cross-posting a comment I made on Artyom's blog. Atar
> responded that he "fixed these issues for some customers". I hoped
> that opening a bug to the opensource project might help develop the
> solution for the public domain.
>
> I now have a mostly-working Solaris 6 emulation, with great thanks to
> the valuable information in Artyom's blog, brezular.com, and the
> QEMU/Solaris 4.14 wikibook.
>
> setup detail;
> QEMU (present git snapshot, reports --version 2.2.92)
> -M SS-20, openboot/proprietary prom
>
> # uname -a
> SunOS emu0 5.6 Generic_105181-33 sun4m sparc SUNW,SPARCstation-20
>
> I continue to have a problem, which I have found others posted in blog
> comments, but have not seen a resolution yet.
>
> # /etc/init.d/init.dmi start
> Run-time error, libC:
> Trying to release a lock that was not acquired in this thread
> (repeat above 1x)
> Abort - core dumped
>
> as well as:
> Assertion failed: MUTEX_HELD(&svc_mutex), file rpc/svc_run.c, line 766
>
> which prints to the console periodically when "dmispd" is running.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/qemu/+bug/1450881/+subscriptions
>

Revision history for this message
Mark Cave-Ayland (mark-cave-ayland) wrote :

Excellent - thanks once again for all your help!

Revision history for this message
Mark Cave-Ayland (mark-cave-ayland) wrote :

Fix is included in the 2.6.0-rc2 release.

Changed in qemu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.