From: buhr@stat.wisc.edu (Kevin Buhr)
To: linux-kernel@vger.kernel.org
Subject: 2.4.0-test5 bug: invalid "shmid_kernel" passed to "shm_nopage_core"
Date: 24 Nov 2000 15:17:13 -0600 [thread overview]
Message-ID: <vbaaeapf4ti.fsf@mozart.stat.wisc.edu> (raw)
I've been chasing after a bug in 2.4.0-test5 that I can't quite nail
down. I don't see anything obvious between test5 and test11 that
leads me to believe it's been fixed.
I encountered a lockup on my SMP box. One CPU got stuck in a spinlock
via the following call trace. There were enough args and saved
registers on the stack for me to reconstruct a few of the calls:
valid_swaphandles(entry=c218b268, offset=c68e7e78)
swapin_readahead(entry=c218b268)
shm_nopage_core(shp=c218b240, idx=0, address=40014000)
shm_nopage
do_no_page
handle_mm_fault
do_page_fault
schedule
sys_ipc (at call to sys_shmat)
"valid_swaphandles" locked on the:
swap_device_lock(swapdev)
and it's not surprising it did. The SWP_TYPE(entry) was swapfile
index 52 on my 2-swapfile system, so it was spinning on some random
piece of memory.
In "shm_nopage", the code
if(!(shp = shm_lock(inode->i_ino)))
BUG();
got a "shp" of 0xc218b240. For some reason, this wasn't a valid
"shp", because in "shm_nopage_core", the
pte = SHM_ENTRY(shp,idx); // in our case, shp->shm_dir[0][0]
returned 0xc218b268 (i.e., the value of &shp->shm_dir, so maybe
shp->shm_dir was a pointer to itself---not possible if "shp" pointed
to a valid "struct shmid_kernel").
The SHM locking has thwarted my attempts at understanding. Maybe
someone else can see the bug or reassure me that it's already been
fixed in test11?
Kevin <buhr@stat.wisc.edu>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2000-11-24 21:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-24 21:17 Kevin Buhr [this message]
2000-11-25 10:05 ` 2.4.0-test5 bug: invalid "shmid_kernel" passed to "shm_nopage_core" Christoph Rohland
2000-11-26 7:05 ` Kevin Buhr
2000-11-26 10:41 ` Christoph Rohland
2000-11-26 20:35 ` Kevin Buhr
2000-12-19 8:58 ` Christoph Rohland
2000-12-19 18:11 ` Kevin Buhr
2000-12-20 7:30 ` Christoph Rohland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vbaaeapf4ti.fsf@mozart.stat.wisc.edu \
--to=buhr@stat.wisc.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox