Skip to content

long perf stat session triggers kernel panic - not syncing: Fatal exception #40234

@ydroneaud

Description

@ydroneaud

Windows Version

Microsoft Windows [version 10.0.26100.8246]

WSL Version

2.6.3.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.6.87.2-1

Distro Version

Ubuntu 24.04

Other Software

In Ubuntu 24.04, I've installed linux-tools-generic, which installed linux-tools-6.8.0-110, allowing me to run perf, and, in particular perf stat.

Unfortunately, the longer I run perf stat on a CPU intensive program, the higher the chance it's going to kill my Linux environment, printing this message in the terminal (pardon my french):

[processus terminé avec le code 1 (0x00000001)]
Vous pouvez maintenant fermer ce terminal avec CTRL+D, ou appuyez sur Entrée pour redémarrer

My traduction:

[process exited with code 1 (0x00000001)]
You could now close this terminal with CTRL+D, or press Enter to restart

Looking at the files in C:\Users\<username>\AppData\Local\Temp\wsl-crashes, I see the same call trace every time my session is interrupted by a crash:

Call Trace:
 <TASK>
 intel_update_topdown_event+0x6c/0x180
 icl_update_topdown_event+0x1b/0x30
 intel_pmu_update+0x26/0x30
 x86_pmu_stop+0xac/0xd0
 x86_pmu_del+0x73/0x1b0
 event_sched_out+0xcd/0x260
 group_sched_out+0x52/0xa0
 __pmu_ctx_sched_out+0xfa/0x150
 ctx_sched_out+0xe5/0x1c0
 task_ctx_sched_out+0x44/0x60
 __perf_event_task_sched_out+0x1c0/0x460
 ? psi_task_switch+0xbd/0x210
 __schedule+0x575/0xb00
 schedule+0x6f/0xf0
 exit_to_user_mode_prepare+0x71/0x140
 irqentry_exit_to_user_mode+0xd/0x20
 irqentry_exit+0x3f/0x50
 sysvec_hyperv_stimer0+0x6a/0xd0
 asm_sysvec_hyperv_stimer0+0x1f/0x30

With last final touch

 Kernel panic - not syncing: Fatal exception

See attached 5 full kernel panic.

kernel-panic-1776450584-{c5334e28-e5e4-4083-b848-a1a5e0baab57}.txt
kernel-panic-1776432691-{af22701c-2a85-41b9-9af3-e8c88a9b8fbc}.txt
kernel-panic-1776431742-{fcc25161-0a96-404d-b25b-5db099211cd2}.txt
kernel-panic-1776424046-{b19d1c24-dd55-4ed6-98f9-5d50af435cf3}.txt
kernel-panic-1776417468-{59c1c4fe-87c8-4b2a-8a45-a35eeadcdb71}.txt

Repro Steps

sudo apt install linux-tools-6.8.0-110-generic
/usr/lib/linux-tools/6.8.0-110-generic/perf stat <a command burning CPU cycles for minutes>

Expected Behavior

The Linux kernel should not panic, and perf stat should complete.

Actual Behavior

The Linux kernel encounter a fatal exception and panic, killing the running Ubuntu distribution and my perf stat command.

Diagnostic Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions