From: Kees Cook <keescook@chromium.org>
To: Muni Sekhar <munisekharrms@gmail.com>
Cc: kernel-hardening@lists.openwall.com
Subject: Re: How to get the crash dump if system hangs?
Date: Mon, 30 Sep 2019 16:51:03 -0700 [thread overview]
Message-ID: <201909301645.5FA44A4@keescook> (raw)
In-Reply-To: <CAHhAz+htpQewAZcpGWD567KLksorc+arA3Mu=hkUX+y6567jGA@mail.gmail.com>
On Thu, Sep 26, 2019 at 01:47:00AM +0530, Muni Sekhar wrote:
> I looked at the available tests with "cat
> /sys/kernel/debug/provoke-crash/DIRECT", from this I’d like to know
> which test causes system hang? I could not find any test case for
> deadlock, is any reason for this?
The various *LOCKUP tests will hang a CPU or task (though SPINLOCKUP
needs to be called twice). You could keep calling HARDLOCKUP until
you're out of CPUs, for example. :)
What kind of deadlock do you want to test?
> I’m having a Linux system, I’m seeing it gets hung during certain
> tests. When it hung, it does not even respond for SYSRQ button, only
> way to recover is power-button-only. Does no response for SYSRQ
> button means kernel crashed?
That's an impressive hang! :(
> After reboot I looked at the kern.log and most of the times it has
> “^@^@^@^ ...“ line just before reboot. Can someone clarify me what the
> kernel log entry “^@^@^@^ ...“ means? I suspect kernel is crashed, but
> it does give any crashdump in kern.log.
That's a zero byte. I would suggest using something like pstore to
capture this in RAM instead of hoping it makes it to disk.
> Later I enabled the kernel crash dump(sudo apt install
> linux-crashdump) and rerun the test but still nothing copied to the
> disk(/var/crash/). I don’t have onboard serial port in my machine, so
> I tried get the crash dump via netconsole, but this method also does
> not able to catch the crash dump.
>
> Can someone help me how to debug in this scenario?
>
> And I'd like to know what other options available to get the crash
> dump? Can someone please clarify me on this?
>
> Also , does the crash dump fails if incase deadlock occurs?
>
> Any help will be greatly appreciated.
If you really need to hard-power your system to get it back, pstore may
only work if you're really quick and likely enable software ECC.
--
Kees Cook
next prev parent reply other threads:[~2019-09-30 23:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 20:17 How to get the crash dump if system hangs? Muni Sekhar
2019-09-30 23:51 ` Kees Cook [this message]
2019-10-03 16:48 ` Muni Sekhar
2019-10-03 21:36 ` Kees Cook
2019-10-10 15:49 ` Muni Sekhar
2019-10-10 16:56 ` Kees Cook
2019-10-10 17:15 ` Muni Sekhar
2019-10-10 18:31 ` Kees Cook
2019-10-11 14:03 ` Muni Sekhar
2019-10-25 2:10 ` Muni Sekhar
2019-10-28 19:22 ` Kees Cook
2019-10-20 19:01 youling257
2019-10-21 8:39 ` Lukas Odzioba
2019-10-21 10:22 ` youling 257
2019-11-02 5:42 ` youling 257
2019-10-20 19:31 youling257
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=201909301645.5FA44A4@keescook \
--to=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=munisekharrms@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).