Skip to contentSkip to conversation

kernel/panic: Show the stacktrace after additional notifier messages

PATCH In review Chris Wilson 3 participants 5 messages Sep 3, 2018 – Sep 4, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/panic: Show the stacktrace after additional notifier messages

Most systems keep the last messages from the panic, and we value the stacktrace most, so dump it last in order to preserve it for post-mortems.

---
 kernel/panic.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
kernel/panic.c +8 -7
index 8b2e002d52eb..c0334516cb15 100644
@@ -176,13 +176,6 @@ void panic(const char *fmt, ...)
 	vsnprintf(buf, sizeof(buf), fmt, args);
 	va_end(args);
 	pr_emerg("Kernel panic - not syncing: %s\n", buf);
-#ifdef CONFIG_DEBUG_BUGVERBOSE
-	/*
-	 * Avoid nested stack-dumping if a panic occurs during oops processing
-	 */
-	if (!test_taint(TAINT_DIE) && oops_in_progress <= 1)
-		dump_stack();
-#endif
 
 	/*
 	 * If we have crashed and we have a crash kernel loaded let it handle
@@ -217,6 +210,14 @@ void panic(const char *fmt, ...)
 	 */
 	atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
 
+#ifdef CONFIG_DEBUG_BUGVERBOSE
+	/*
+	 * Avoid nested stack-dumping if a panic occurs during oops processing
+	 */
+	if (!test_taint(TAINT_DIE) && oops_in_progress <= 1)
+		dump_stack();
+#endif
+
 	/* Call flush even twice. It tries harder with a single online CPU */
 	printk_safe_flush_on_panic();
 	kmsg_dump(KMSG_DUMP_PANIC);
Signature · 6 lines
2.19.0.rc1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for kernel/panic: Show the stacktrace after additional notifier messages

== Series Details ==

== Series Details ==

Series: kernel/panic: Show the stacktrace after additional notifier messages
URL : https://patchwork.freedesktop.org/series/49080/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4757 -> Patchwork_10071 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/49080/revisions/1/mbox/

== Possible new issues ==

Here are the unknown changes that may have been introduced in Patchwork_10071:

=== IGT changes ===

    ==== Warnings ====

    {igt@pm_rpm@module-reload}:
      fi-hsw-peppy:       DMESG-WARN (fdo#107603) -> FAIL

== Known issues ==

Here are the changes found in Patchwork_10071 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@kms_chamelium@dp-edid-read:
      fi-kbl-7500u:       PASS -> FAIL (fdo#103841)

    igt@kms_frontbuffer_tracking@basic:
      {fi-byt-clapper}:   PASS -> FAIL (fdo#103167)

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
      {fi-byt-clapper}:   PASS -> FAIL (fdo#107362)

    {igt@pm_rpm@module-reload}:
      fi-cnl-psr:         PASS -> WARN (fdo#107602, fdo#107708)

    
    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
      {fi-byt-clapper}:   FAIL (fdo#103191, fdo#107362) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-bxt-dsi:         INCOMPLETE (fdo#103927) -> PASS

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107602 https://bugs.freedesktop.org/show_bug.cgi?id=107602
fdo#107603 https://bugs.freedesktop.org/show_bug.cgi?id=107603
fdo#107708 https://bugs.freedesktop.org/show_bug.cgi?id=107708

== Participating hosts (53 -> 47) ==

Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-skl-6700hq

== Build changes ==

* Linux: CI_DRM_4757 -> Patchwork_10071

CI_DRM_4757: 1465de895e2b5d9e74e9a85189c9075155efa30d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4621: 125eee6e981eac0a004aeb4f327439a132ceac5c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10071: 2bd593b08f91000ef8b8c3070292c2d25634a25d @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

2bd593b08f91 kernel/panic: Show the stacktrace after additional notifier messages

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10071/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✓ Fi.CI.IGT: success for kernel/panic: Show the stacktrace after additional notifier messages

In reply to Chris Wilson
== Series Details ==

== Series Details ==

Series: kernel/panic: Show the stacktrace after additional notifier messages
URL : https://patchwork.freedesktop.org/series/49080/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4757_full -> Patchwork_10071_full =

== Summary - SUCCESS ==

No regressions found.

== Known issues ==

Here are the changes found in Patchwork_10071_full that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_ctx_isolation@bcs0-s3:
      shard-apl:          PASS -> INCOMPLETE (fdo#103927) +1

    
    ==== Possible fixes ====

    igt@gem_exec_await@wide-contexts:
      shard-glk:          FAIL (fdo#105900) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
      shard-apl:          DMESG-WARN (fdo#103558, fdo#105602) -> PASS +2

    igt@kms_setmode@basic:
      shard-apl:          FAIL (fdo#99912) -> PASS

    igt@kms_vblank@pipe-b-ts-continuation-idle-hang:
      shard-apl:          DMESG-WARN -> PASS

    igt@pm_rc6_residency@rc6-accuracy:
      shard-glk:          INCOMPLETE (fdo#103359, k.org#198133) -> PASS

fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133

== Participating hosts (5 -> 5) ==

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4757 -> Patchwork_10071

CI_DRM_4757: 1465de895e2b5d9e74e9a85189c9075155efa30d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4621: 125eee6e981eac0a004aeb4f327439a132ceac5c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10071: 2bd593b08f91000ef8b8c3070292c2d25634a25d @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10071/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Acked-by on v1 1/1
#3 lore raw
In reply to Chris Wilson
Quoted 3 lines · Chris Wilson

Most systems keep the last messages from the panic, and we value the stacktrace most, so dump it last in order to preserve it for post-mortems.

Thanks a lot for doing this Chris! I am hopping we'll get a lot of usable traces out of that!

Quoted 30 lines
---
 kernel/panic.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
kernel/panic.c +1 -7
index 8b2e002d52eb..c0334516cb15 100644
@@ -176,13 +176,6 @@ void panic(const char *fmt, ...)
 	vsnprintf(buf, sizeof(buf), fmt, args);
 	va_end(args);
 	pr_emerg("Kernel panic - not syncing: %s\n", buf);
-#ifdef CONFIG_DEBUG_BUGVERBOSE
-	/*
-	 * Avoid nested stack-dumping if a panic occurs during oops processing
-	 */
-	if (!test_taint(TAINT_DIE) && oops_in_progress <= 1)
-		dump_stack();
-#endif
 
 	/*
 	 * If we have crashed and we have a crash kernel loaded let it handle
@@ -217,6 +210,14 @@ void panic(const char *fmt, ...)
 	 */
 	atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
 
+#ifdef CONFIG_DEBUG_BUGVERBOSE

kernel/panic.c void panic(const char *fmt, ...) · line 223

Quoted 10 lines
kernel/panic.c +7 -0
+	/*
+	 * Avoid nested stack-dumping if a panic occurs during oops processing
+	 */
+	if (!test_taint(TAINT_DIE) && oops_in_progress <= 1)
+		dump_stack();
+#endif
+
 	/* Call flush even twice. It tries harder with a single online CPU */
 	printk_safe_flush_on_panic();
 	kmsg_dump(KMSG_DUMP_PANIC);

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

Quoting Martin Peres (2018-09-04 09:55:38)

Quoted 9 lines · Chris Wilson
Quoted 3 lines

Most systems keep the last messages from the panic, and we value the stacktrace most, so dump it last in order to preserve it for post-mortems.

Thanks a lot for doing this Chris! I am hopping we'll get a lot of usable traces out of that!

Let's see if it does the trick, and when Martin spots it in core-for-CI next year, he can poke someone (hopefully someone else) to send it upstream ;)
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx