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

RR chaos mode #3670

Closed
firelizzard18 opened this issue Feb 22, 2024 · 8 comments · Fixed by #3726
Closed

RR chaos mode #3670

firelizzard18 opened this issue Feb 22, 2024 · 8 comments · Fixed by #3726

Comments

@firelizzard18
Copy link

Please provide a way to pass the --chaos flag to the rr backend. Either by a dedicated flag such as --rr-chaos or as a general --rr-flags, --backend-flags, --backend-opts, etc.

$ rr record -h
 rr record [OPTION]... <exe> [exe-args]...
  [...]
  -h, --chaos                randomize scheduling decisions to try to 
                             reproduce bugs

Chaos mode is an extremely useful tool for reproducing weird bugs.

@firelizzard18
Copy link
Author

It looks like this https://github.com/go-delve/delve/blob/master/pkg/proc/gdbserial/rr.go#L144 line is where the arguments for rr record are constructed.

@aarzilli
Copy link
Member

It looks like this https://github.com/go-delve/delve/blob/master/pkg/proc/gdbserial/rr.go#L144 line is where the arguments for rr record are constructed.

That's replay, record is above in RecordAsync.

@firelizzard18
Copy link
Author

🤦 of course

@firelizzard18
Copy link
Author

firelizzard18 commented Feb 25, 2024

@aarzilli Would you accept a PR for this? Do you have a preferred flag name or other mechanism for setting the RR flag?

@aarzilli
Copy link
Member

Do you have a preferred flag name or other mechanism for setting the RR flag?

That's the problem. The simple way to do this is to add a flag to debug, test and exec but that sucks, they already have too many flags and adding another one that only works when --backend is rr is ugly. The implementation is trivial.

@dmvolod
Copy link

dmvolod commented Mar 5, 2024

I would prefer to have backend specific --backend-opts parameter to avoid confusion and, probably futher using for other backend.

For example, I can't use rr without --bind-to-cpu=0 option on my CPU and OS combination.
Thanks in advance.

aarzilli added a commit to aarzilli/delve that referenced this issue May 14, 2024
Adds two environment variables to configure rr invocations.

Fixes go-delve#3670
@aarzilli
Copy link
Member

@firelizzard18 @dmvolod I have made a PR about this using environment variables: #3726

@firelizzard18
Copy link
Author

@aarzilli That works for me, I should be able to set those via VSCode so that takes care of my use case.

aarzilli added a commit to aarzilli/delve that referenced this issue May 15, 2024
Adds two environment variables to configure rr invocations.

Fixes go-delve#3670
aarzilli added a commit to aarzilli/delve that referenced this issue May 23, 2024
Adds two environment variables to configure rr invocations.

Fixes go-delve#3670
derekparker pushed a commit that referenced this issue May 24, 2024
…3726)

Adds two environment variables to configure rr invocations.

Fixes #3670
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants