RR chaos mode
firelizzard18 opened this issue · comments
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.
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.
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.
🤦 of course
@aarzilli Would you accept a PR for this? Do you have a preferred flag name or other mechanism for setting the RR flag?
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.
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.