Opened 14 years ago
Closed 10 years ago
#231 closed defect (deferred)
Two CPUs in critical section under Qemu/ia32/SMP
Reported by: | Jakub Jermář | Owned by: | Jakub Jermář |
---|---|---|---|
Priority: | major | Milestone: | 0.6.0 |
Component: | helenos/kernel/ia32 | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description (last modified by )
After applying the attached changes on top of changeset:mainline,377, I am observing (under Qemu 0.11.?, 0.12.2+3) what appears to be more than one CPU in a spinlock-protected critical section.
In order to figure out more, I improved the spinlock code to be more sensitive to random lock corruption (which I can thus rule out) and also to be more observable by providing a global ring buffer for recording the locking history. See the attachement to see the diff. I am also going to attach screenshots which illustrate the panics.
Frankly speaking, my suspect number one is actually Qemu (since the HelenOS code looks good to me atm.), but I am logging this ticket anyway just for the case I am wrong. One more thing which makes me think that this is rather a Qemu issue is that with the given ring buffer and the spinlock_lock_debug() code, I would expect the panic to occur in spinlock_lock_debug() on either of the two checks for multiple CPUs in the CS, and not so late in spinlock_unlock(). With this behavior, the simulated CPUs appear to use some very strange memory model (i.e. we observe the effect of the lock_event_record() on both CPUs that manage to "lock" the spinlock, but in most of the cases do not hit the "not alone in critical section" panic).
Attachments (4)
Change History (10)
by , 14 years ago
by , 14 years ago
Attachment: | kernel.raw.bz2 added |
---|
kernel.raw for the sake of running a disassembler on it.
by , 14 years ago
Attachment: | spinlock_unlock.png added |
---|
Screenshot with a ring buffer showing the lock-lock-unlock-unlock pattern
by , 14 years ago
Attachment: | spinlock_lock_debug.png added |
---|
Screenshot which shows panic on one of the CS invariant checks in the modified spinlock_lock_debug()
comment:1 by , 14 years ago
Description: | modified (diff) |
---|
comment:2 by , 14 years ago
Description: | modified (diff) |
---|
comment:3 by , 14 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:4 by , 14 years ago
Milestone: | 0.4.3 → 0.5.0 |
---|
comment:5 by , 12 years ago
Milestone: | 0.5.0 → 0.5.1 |
---|
comment:6 by , 10 years ago
Resolution: | → deferred |
---|---|
Status: | assigned → closed |
Too old branch of a too old version of HelenOS on a too old version of QEMU. Deferring indefinitely.
Diff from changeset:head,377.