kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Muni Sekhar <munisekharrms@gmail.com>
To: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
Cc: aleave <aleave@protonmail.com>,
	tanure@linux.com,
	"kernelnewbies@kernelnewbies.org"
	<kernelnewbies@kernelnewbies.org>
Subject: Re: How to printk synchronously
Date: Thu, 28 Nov 2019 11:42:14 +0530	[thread overview]
Message-ID: <CAHhAz+iy8jXrxTHEfw9QR6Mm+duTBjteqvWvowT6jzNZpx0x9Q@mail.gmail.com> (raw)
In-Reply-To: <548800.1574846280@turing-police>

On Wed, Nov 27, 2019 at 2:48 PM Valdis Klētnieks
<valdis.kletnieks@vt.edu> wrote:
>
> On Tue, 26 Nov 2019 22:31:08 +0000, Lucas Tanure said:
> > Hi,
> >
> > What about ftrace ? Documentation/trace/ftrace.txt
>
> That won't help - his ^@^@^@ is a result of the system stopping and no longer
> writing to disk, so his logfile has blocks allocated to it but not yet written
> to.
>
> Using ftrace will have the same problem, if his kernel is locking up and not
> syncing to disk.
I too noticed this kind of behavior i.e. kernel locks up and won’t
respond for SYSRQ key(even it is enabled), just system freezes. Only
way to recover is hard reboot, after reboot I looked at the kernel log
and most of the times it has ^@^@^@.

My system is installed with crashdump tools and it captures the
crashed Linux kernel dump for soft\hard lockups triggered via
/sys/kernel/debug/provoke-crash/DIRECT file, but the crashdump tool
not helped in the original scenario.

Apart from soft\hard lockups, are there any other scenarios kernel
locks up and won’t respond for SYSRQ key? Is there any kernel patch I
can apply to get the stack trace of each CPU before it stops?

I enabled “kernel.softlockup_panic = 1” and “kernel.hardlockup_panic =
1” variables, but just system freezes without panic, so can we say
this fault neither soft lockup nor hard lockup?

Does machine check exceptions result the system to freeze? If so how
to capture the dump\log for this scenario?

I build the kernel with lockdep too, but does not show any possible
lockups. Netconsole also not helped.


>
> A better approach would be to use netconsole to send all the console output to
> another machine, or serial console if that's an option.
>
> Though I have to wonder how he's determining it's a deadlock issue rather than
> a panic that's just plain stopping the system - building the kernel with
> lockdep support should reveal the issue before a lockup. And if it *is* a
> deadlock, there should be sufficient info in the watchdog logging (assuming the
> hardware has some sort of watchdog support, as most systems do).
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
Thanks,
Sekhar

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2019-11-28  6:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26 20:07 How to printk synchronously aleave
2019-11-26 22:31 ` Lucas Tanure
2019-11-27  9:18   ` Valdis Klētnieks
2019-11-28  6:12     ` Muni Sekhar [this message]

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=CAHhAz+iy8jXrxTHEfw9QR6Mm+duTBjteqvWvowT6jzNZpx0x9Q@mail.gmail.com \
    --to=munisekharrms@gmail.com \
    --cc=aleave@protonmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=tanure@linux.com \
    --cc=valdis.kletnieks@vt.edu \
    /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).