Opened 13 years ago
Closed 8 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)
Changed 13 years ago by
Changed 13 years ago by
Attachment: | kernel.raw.bz2 added |
---|
kernel.raw for the sake of running a disassembler on it.
Changed 13 years ago by
Attachment: | spinlock_unlock.png added |
---|
Screenshot with a ring buffer showing the lock-lock-unlock-unlock pattern
Changed 13 years ago by
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 Changed 13 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 13 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 12 years ago by
Owner: | set to Jakub Jermář |
---|---|
Status: | new → assigned |
comment:4 Changed 12 years ago by
Milestone: | 0.4.3 → 0.5.0 |
---|
comment:5 Changed 11 years ago by
Milestone: | 0.5.0 → 0.5.1 |
---|
comment:6 Changed 8 years ago by
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.