RE: 2.6.17-1.2145_FC5 mmap-related soft lockup

From: Gary Funck
Date: Sun Jul 16 2006 - 02:55:45 EST

> From: Gary Funck
> Sent: Saturday, July 15, 2006 10:07 AM
> A test program which allocates about 256M of MAP_ANONYMOUS mmap memory,
> and then spawns 4 processess, where each process i writes to 1/4 of the
> mapped memory, and then reads the memory written by
> the process (i + 1)%4, triggers a soft lockup, when exiting.
> Hardware:
> dual core dual Opteron 275 (Tyan motherboard, 4G physical memory)
> has been rock solid reliable.
> BUG: soft lockup detected on CPU#3!

Follow up, the attached test program, when compiled on FC5 with the
2.6.17-1.2145 kernel will cause lost timer ticks, lost RS-232 interrupts,
and often will lead to the soft lockup situation shown below:

BUG: soft lockup detected on CPU#0!

Call Trace: <IRQ> <ffffffff802b2fb5>{softlockup_tick+219}
<ffffffff80263acb>{apic_timer_interrupt+135} <EOI>
<ffffffff8023c7d9>{exit_mmap+120} <ffffffff8023eda8>{mmput+44}

After compiling the code, A continuous loop like the following, seems to
eventually lead to the soft lockup situation (FC5, x86_64) shown above:

while true; do

Attachment: mmap_soft_lockup_x86_64.c
Description: Binary data