Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: bpftrace cannot obtain ena_io_poll return value #292

Closed
3 tasks done
hengqiali opened this issue Dec 29, 2023 · 5 comments
Closed
3 tasks done

[Bug]: bpftrace cannot obtain ena_io_poll return value #292

hengqiali opened this issue Dec 29, 2023 · 5 comments
Labels
bug Report errors or unexpected behavior Linux ENA driver

Comments

@hengqiali
Copy link

Preliminary Actions

Driver Type

Linux kernel driver for Elastic Network Adapter (ENA)

Driver Tag/Commit

6.1.66-91.160.amzn2023.x86_64

Custom Code

No

OS Platform and Distribution

6.1.66-91.160.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMI

Bug description

Try to get the return value using the following command:
bpftrace -e 'kretprobe: ena_io_poll {@[nsecs/1000000000]=count();}'

bpftrace cannot obtain the ena_io_poll return value. How should I get it?
Modify the code? I added noinline which doesn't seem to work.

Reproduction steps

Excute the following cmd:
bpftrace -e 'kretprobe: ena_io_poll {@[nsecs/1000000000]=count();}'

Expected Behavior

Get the corresponding return value.

Actual Behavior

Cannot get the corresponding return value.

Additional Data

# bpftrace -e 'kretprobe: ena_io_poll {@[nsecs/1000000000]=count();}'
Attaching 1 probe...
cannot attach kprobe, probe entry may not exist
ERROR: Error attaching probe: 'kretprobe:ena_io_poll'

Relevant log output

No response

Contact Details

No response

@hengqiali hengqiali added bug Report errors or unexpected behavior triage Determine the priority and severity labels Dec 29, 2023
@davidarinzon
Copy link
Contributor

davidarinzon commented Dec 31, 2023

Hi @Data-crea

Thanks for submitting the query, the command you've posted works well on Amazon Linux 2 and Ubuntu 22.04.
We will investigate to see why it doesn't work on Amazon Linux 2023 and will get back to you.
Stay tuned.

@amitbern-aws
Copy link
Contributor

Hi @Data-crea,
We can confirm that this issue has been replicated in the Amazon Linux 2023 kernel (version 6.1).
Although the problem is not related to the ENA driver, we have internally assigned it to the Amazon Linux kernel team.

To mitigate this issue, you can:

  1. Use Amazon Linux 2 (5.10)
  2. Use kretfunc
sudo bpftrace -e 'kretfunc:ena:ena_io_poll {@[nsecs/1000000000]=count();}'

We will provide an update once we receive a resolution from the Amazon Linux team.

Thank you for bringing this to our attention.

@amitbern-aws amitbern-aws removed the triage Determine the priority and severity label Jan 3, 2024
@hengqiali
Copy link
Author

Hi @amitbern-aws @davidarinzon

Hi @Data-crea, We can confirm that this issue has been replicated in the Amazon Linux 2023 kernel (version 6.1). Although the problem is not related to the ENA driver, we have internally assigned it to the Amazon Linux kernel team.

To mitigate this issue, you can:

  1. Use Amazon Linux 2 (5.10)
  2. Use kretfunc
sudo bpftrace -e 'kretfunc:ena:ena_io_poll {@[nsecs/1000000000]=count();}'

Thank you very much for your effective response! I will try this!

We will provide an update once we receive a resolution from the Amazon Linux team.

Thank you for bringing this to our attention.

@amitbern-aws
Copy link
Contributor

Update from kernel team:

Amazon Linux 2023 will take the fix in the coming weeks,
Will update once its available.

Thanks

@hengqiali
Copy link
Author

I see it! Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report errors or unexpected behavior Linux ENA driver
Projects
None yet
Development

No branches or pull requests

3 participants