* how to hard hang the kernel from userspace?
@ 2017-12-07 0:32 Daniel Walker
2017-12-07 15:49 ` valdis.kletnieks at vt.edu
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Walker @ 2017-12-07 0:32 UTC (permalink / raw)
To: kernelnewbies
Hi,
I was able to formulate this command,
echo -1 > /proc/sys/kernel/sched_rt_runtime_us
chrt -f 99 yes &> /dev/null
and it works sometimes on UP, but it doesn't work on SMP. I also tried
adding in "taskset" to pin multiple version of the "yes" command to each
cpu in the system, but that just resulted in lots of rcu warnings.
The goal is to make the watchdog trigger by starving out the watchdog
petting process. Anyone have any ideas? I'd rather not make a kernel module.
Thanks,
Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread
* how to hard hang the kernel from userspace?
2017-12-07 0:32 how to hard hang the kernel from userspace? Daniel Walker
@ 2017-12-07 15:49 ` valdis.kletnieks at vt.edu
2017-12-07 23:12 ` Daniel Walker
0 siblings, 1 reply; 5+ messages in thread
From: valdis.kletnieks at vt.edu @ 2017-12-07 15:49 UTC (permalink / raw)
To: kernelnewbies
On Wed, 06 Dec 2017 16:32:26 -0800, Daniel Walker said:
> and it works sometimes on UP, but it doesn't work on SMP. I also tried
Thinking about *why* that hangs a UP should explain why it doesn't work
on SMP.
> adding in "taskset" to pin multiple version of the "yes" command to each
> cpu in the system, but that just resulted in lots of rcu warnings.
That's.... unexpected.
> The goal is to make the watchdog trigger by starving out the watchdog
> petting process. Anyone have any ideas? I'd rather not make a kernel module.
What are you trying to achieve by doing that?
Have you tried just pointing a 'kill -9' at the watchdog monitor process? Are you using
in-kernel watchdogd, or one in userspace?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171207/ec60fe15/attachment.bin
^ permalink raw reply [flat|nested] 5+ messages in thread
* how to hard hang the kernel from userspace?
2017-12-07 15:49 ` valdis.kletnieks at vt.edu
@ 2017-12-07 23:12 ` Daniel Walker
2017-12-08 2:40 ` valdis.kletnieks at vt.edu
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Walker @ 2017-12-07 23:12 UTC (permalink / raw)
To: kernelnewbies
On 12/07/2017 07:49 AM, valdis.kletnieks at vt.edu wrote:
> On Wed, 06 Dec 2017 16:32:26 -0800, Daniel Walker said:
>
>> and it works sometimes on UP, but it doesn't work on SMP. I also tried
> Thinking about *why* that hangs a UP should explain why it doesn't work
> on SMP.
>
>> adding in "taskset" to pin multiple version of the "yes" command to each
>> cpu in the system, but that just resulted in lots of rcu warnings.
> That's.... unexpected.
May have to do with not being able to start them all instantly enough,
something like that.
>> The goal is to make the watchdog trigger by starving out the watchdog
>> petting process. Anyone have any ideas? I'd rather not make a kernel module.
> What are you trying to achieve by doing that?
>
> Have you tried just pointing a 'kill -9' at the watchdog monitor process? Are you using
> in-kernel watchdogd, or one in userspace?
So typically you have a process which updates the watchdog periodically
which I call a petting process. As I said the purpose is to trigger the
watchdog by starving the petting process (i.e. kick process) , then the
watchdog reboots the system.
Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread
* how to hard hang the kernel from userspace?
2017-12-07 23:12 ` Daniel Walker
@ 2017-12-08 2:40 ` valdis.kletnieks at vt.edu
2017-12-08 15:03 ` Daniel Walker
0 siblings, 1 reply; 5+ messages in thread
From: valdis.kletnieks at vt.edu @ 2017-12-08 2:40 UTC (permalink / raw)
To: kernelnewbies
On Thu, 07 Dec 2017 15:12:15 -0800, Daniel Walker said:
> So typically you have a process which updates the watchdog periodically
> which I call a petting process. As I said the purpose is to trigger the
> watchdog by starving the petting process (i.e. kick process) , then the
> watchdog reboots the system.
If you're doing the updating from userspace, a kill -9 will get the job done.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171207/482d6acd/attachment.bin
^ permalink raw reply [flat|nested] 5+ messages in thread
* how to hard hang the kernel from userspace?
2017-12-08 2:40 ` valdis.kletnieks at vt.edu
@ 2017-12-08 15:03 ` Daniel Walker
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Walker @ 2017-12-08 15:03 UTC (permalink / raw)
To: kernelnewbies
On 12/07/2017 06:40 PM, valdis.kletnieks at vt.edu wrote:
> On Thu, 07 Dec 2017 15:12:15 -0800, Daniel Walker said:
>
>> So typically you have a process which updates the watchdog periodically
>> which I call a petting process. As I said the purpose is to trigger the
>> watchdog by starving the petting process (i.e. kick process) , then the
>> watchdog reboots the system.
> If you're doing the updating from userspace, a kill -9 will get the job done.
>
True, but that wasn't what I had in mind.. I was more interesting in
simulating an actual lockup.
Daniel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-08 15:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 0:32 how to hard hang the kernel from userspace? Daniel Walker
2017-12-07 15:49 ` valdis.kletnieks at vt.edu
2017-12-07 23:12 ` Daniel Walker
2017-12-08 2:40 ` valdis.kletnieks at vt.edu
2017-12-08 15:03 ` Daniel Walker
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.