rr-debugger / rr-debugger/rr

zen_workaround.py PermissionError (Ryzen 3700U)

Open
#2,933 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.7k
Forks
662
Avg merge
2d 3h
Merged PRs (30d)
2

Description

I'm having trouble getting the zen_workaround.py script working on my Ryzen 3700U-based laptop.

lscpu reports cpu model is "AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx"

I'm using rr 5.4 as packaged by Debian (I've diffed the workaround script and it's the same as in the github repo, other than a link referencing the Zen page on the mozilla wiki rather than the github wiki).

$ sudo /usr/share/doc/rr/examples/zen_workaround.py 
Traceback (most recent call last):
  File "/usr/share/doc/rr/examples/zen_workaround.py", line 46, in <module>
    os.write(msr, struct.pack('<q', val))
PermissionError: [Errno 1] Operation not permitted

So it's opening /dev/cpu/7/msr and seeking, but the actual write fails...
Anything obvious I'm missing?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported command, /usr/share/doc/rr/examples/zen_workaround.py, and the failing write to /dev/cpu/7/msr on the Ryzen 7 3700U. Compare the Debian rr 5.4 script with the repository version and verify the failure conditions; done means the permission error has a confirmed explanation and a documented or reproducible next step.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.