From: Olaf Hering <olaf@aepfle.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] reject taskset for kernel threads
Date: Thu, 22 Mar 2007 22:28:25 +0100 [thread overview]
Message-ID: <20070322212825.GA12297@aepfle.de> (raw)
In-Reply-To: <20070321145027.c76121dc.akpm@linux-foundation.org>
On Wed, Mar 21, Andrew Morton wrote:
> On Wed, 21 Mar 2007 21:53:53 +0100
> Olaf Hering <olaf@aepfle.de> wrote:
>
> >
> > Do not allow taskset for kernel threads.
> > These commands will cause oopses due to stack corruption:
> >
> > ls /proc/*/task | grep -v ^/ | xargs echo | xargs -n1 taskset -pc 2-9
> > taskset -pc 1 $$
> > taskset -pc 0 $((pidof john))
>
> Why does the kernel oops?
I guess I have to find out. Sometimes it just deadlocks.
Linus tree (+patches) crashes nicely and loops in xmon exceptions, see below.
#/bin/bash
numcpus=`grep -Ec '^cpu[0-9]' /proc/stat || echo 1`
forked=
john=
for i in `seq 1 $numcpus`
do
echo $i
bash -c 'declare -i x=1 ; while test $x != 0 ; do : $(( x++ )) ; done' &
forked="$forked $!"
done
echo "forked $forked"
nice -n -19 bash -c 'declare -i x=1 ; while test $x != 0 ; do : $(( x++ )) ; done' &
john=$!
sleep 3
ls -A /proc/*/task | grep -v ^/ | xargs echo | xargs -n1 taskset -pc 2-$numcpus
taskset -pc 2 $$
taskset -pc 0 $john
sleep 3
kill $forked $john
...
pid 4796's new affinity list: 2,3
pid 4797's current affinity list: 0-3
Page fault in user mode within_atomic() = 0 mm = 0000000000000000
NIP = fd8e590 MSR = 4000f032
cpu 0x1: Vector: 401 (Instruction Access) at [c0000000e9dfbea0]
pc: 000000000fd8e590
lr: 000000000fdf3cec
sp: ffc2
0c90
msr: 4000f032
current = 0xc0000000e74e2800
paca = 0xc0000000005b3000
pid = 4797, comm = bash
cpu 0x2: Vector: 400 (Instr------------[ cuut here ]--------c----
tion Access) at [c0000000e9dfb380]
cpu 0x2: Vector: 3865000000000400 at [c0000000e9dfac60]
pc: c0000000e9dfae00
lr: c0000000e9dfae00
sp: c0000000e9dfaee0
msr: c0000000004e6220
cur e?n tfeorr ?h eflopr
shxl 0 0pacfScP2 0(cf9f0c)2 0ics9 0i)n iuss eirns puasceer
pac h
p1i:dm o n >= 4797, comm = bash
cpu 0x2: Exception 3835360000000400 in xmon, returning to main loop
cpu 0x2: Vector: 300 (Data Access) at [c0000000e9dfac10]
...
next prev parent reply other threads:[~2007-03-22 21:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-21 20:53 [PATCH] reject taskset for kernel threads Olaf Hering
2007-03-21 21:50 ` Andrew Morton
2007-03-22 21:28 ` Olaf Hering [this message]
2007-03-22 23:01 ` Olaf Hering
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=20070322212825.GA12297@aepfle.de \
--to=olaf@aepfle.de \
--cc=akpm@linux-foundation.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.