Linux Trace Kernel
 help / color / mirror / Atom feed
From: Daniel Wagner <dwagner@suse.de>
To: linux-trace-kernel@vger.kernel.org
Subject: kprobe not always triggering
Date: Wed, 15 Jan 2025 09:26:36 +0100	[thread overview]
Message-ID: <f91a64bf-c5cb-4d36-b50b-67cdcdccdccc@flourine.local> (raw)

Hi,

it's likely a layer 8 problem but I can't figure out what I am doing
wrong.

I am debugging the nvme state machine with a nvme-tcp setup. I attached
a kprobe to nvme_change_ctrl_state to trace all the state changes, but
not all of them are logged. It's consistent behavior and I tried
different things with the same result.

The state transition I'd like to see is

  LIVE (1) -> RESETTING (2) -> CONNECTING (3) -> LIVE (1)

Though the 1 -> 2 transition is always missing, though a printk says it
is happening.

cd /sys/kernel/debug/tracing
echo "r:nvme_change_ctrl_state nvme_change_ctrl_state new_state=\$arg2:x32" > kprobe_events
echo 1 > events/kprobes/enable
echo 1 > tracing_on
cat trace_pipe

            nvme-570     [004] .....    97.559620: nvme_change_ctrl_state: (nvme_tcp_setup_ctrl+0x324/0x720 [nvme_tcp] <- nvme_change_ctrl_state) new_state=0x1
           <...>-65      [000] .....   143.540287: nvme_change_ctrl_state: (nvme_reset_ctrl_work+0x76/0xc0 [nvme_tcp] <- nvme_change_ctrl_state) new_state=0x3
   kworker/u34:3-76      [001] .....   170.236138: nvme_change_ctrl_state: (nvme_tcp_setup_ctrl+0x324/0x720 [nvme_tcp] <- nvme_change_ctrl_state) new_state=0x1


[   97.548827] nvme_change_ctrl_state:566 3 -> 1
[   97.550547] nvme nvme1: new ctrl: NQN "nqn.io-1", addr 192.168.154.25:4420, hostnqn: nqn.2014-08.org.nvmexpress:uuid:befdec4c-2234-11b2-a85c-ca77c773af36
[  133.273552] nvme nvme1: I/O tag 1 (e001) type 4 opcode 0x18 (Keep Alive) QID 0 timeout
[  133.274359] nvme nvme1: long keepalive RTT (5056 ms)
[  133.274684] nvme nvme1: failed nvme_keep_alive_end_io error=10
[  143.514090] nvme_change_ctrl_state:566 1 -> 2
[  143.529185] nvme_change_ctrl_state:566 2 -> 3
[  146.584904] nvme nvme1: failed to connect socket: -110
[  146.585553] nvme nvme1: Reconnecting in 10 seconds...
[  159.897184] nvme nvme1: failed to connect socket: -110
[  159.897633] nvme nvme1: Failed reconnect attempt 2/60
[  159.898006] nvme nvme1: Reconnecting in 10 seconds...
[  170.153915] nvme nvme1: creating 8 I/O queues.

The system is idle, so I hope it's not just a dropped event. Any ideas
what I am doing wrong?

Linux 6.13.0-rc3+, clang compiler.

Thanks,
Daniel

             reply	other threads:[~2025-01-15  8:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-15  8:26 Daniel Wagner [this message]
2025-01-15 15:17 ` kprobe not always triggering Steven Rostedt
2025-01-15 16:29   ` Daniel Wagner
2025-01-15 16:37     ` Steven Rostedt
2025-01-15 16:50       ` Daniel Wagner
2025-01-15 23:48     ` Masami Hiramatsu
2025-01-16 12:04       ` Daniel Wagner
2025-01-17  8:52         ` Masami Hiramatsu

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=f91a64bf-c5cb-4d36-b50b-67cdcdccdccc@flourine.local \
    --to=dwagner@suse.de \
    --cc=linux-trace-kernel@vger.kernel.org \
    /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