Opened 5 years ago

Closed 5 years ago

#11314 closed bug (duplicate)

PANIC: acquire_spinlock: attempt to acquire lock twice on non-SMP system

Reported by: nicsma Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: #11032 Blocking:
Has a Patch: no Platform: All

Description

I'm trying to get the GHC Haskell compiler running on Haiku. At some point in the configure script, it runs a C program which reliably gives the kernel panic above on the hrev47958 nightly (x86, GCC 2/4 hybrid). I've attached the C program (panic.c) but I haven't tried to minimise it because I don't really know what it does.

I'm running on QEMU, single-processor. If I enable SMP I get a different panic most of the time:

PANIC: acquire_spinlock(): Failed to acquire spinlock 0xce99c850 for a long time!

I've also attached the serial debug output from the UP and SMP runs.

Attachments (5)

panic.c (2.1 KB) - added by nicsma 5 years ago.
The offending program
haiku-up.log (58.1 KB) - added by nicsma 5 years ago.
Log from QEMU UP
haiku-smp.log (61.0 KB) - added by nicsma 5 years ago.
Log from QEMU SMP
20141005_024319.jpg (2.6 MB) - added by jessicah 5 years ago.
panic-simpler.c (351 bytes) - added by nicsma 5 years ago.
A reduced test case

Change History (9)

Changed 5 years ago by nicsma

Attachment: panic.c added

The offending program

Changed 5 years ago by nicsma

Attachment: haiku-up.log added

Log from QEMU UP

Changed 5 years ago by nicsma

Attachment: haiku-smp.log added

Log from QEMU SMP

comment:1 Changed 5 years ago by anevilyak

Component: - GeneralSystem/Kernel
Owner: changed from nobody to axeld

Changed 5 years ago by jessicah

Attachment: 20141005_024319.jpg added

comment:2 Changed 5 years ago by jessicah

For what it's worth, it's also happening on actual hardware too with the same level of reproducibility. Even when SMP is disabled (gives the double spinlock error instead).

My KDL is slightly different, but same set of circumstances leading to the KDL; see attached photo.

Changed 5 years ago by nicsma

Attachment: panic-simpler.c added

A reduced test case

comment:3 Changed 5 years ago by nicsma

I managed to reduce the test case quite a bit - just a call to timer_create followed by timer_settime triggers the bug.

It KDLs if I use CLOCK_PROCESS_CPUTIME_ID or CLOCK_THREAD_CPUTIME_ID in timer_create, but not if I use CLOCK_MONOTONIC or CLOCK_REALTIME.

comment:4 Changed 5 years ago by mmlr

Blocked By: 11032 added
Resolution: duplicate
Status: newclosed

This is the same as #11032.

Note: See TracTickets for help on using tickets.