Quantcast

rr debbugger

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

rr debbugger

Samba - samba-technical mailing list
Hi,

There is a group of people at mozilla working on a very interesting
project, the rr debugger. It allows you to record the non-deterministic
parts of a program run (syscall results) and replay them
deterministicly. This means you can finally use breakpoints without
trigerring timeouts on the client side. You can also reverse-debug:
start from the crash and go backward.

It wasn't working on smbd but after opening a couple of issues and
working on one I was able to use it. Other syscall might have to be
implemented depending on what you try to run.

http://rr-project.org/

You might want to pull from here to get an extra quotactl syscall
implemented:

https://github.com/aaptel/rr.git on the branch quotactl-xgetqstat

Cheers,

--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: rr debbugger

Samba - samba-technical mailing list
On Tue, Apr 11, 2017 at 05:59:48PM +0200, Aurélien Aptel via samba-technical wrote:

> Hi,
>
> There is a group of people at mozilla working on a very interesting
> project, the rr debugger. It allows you to record the non-deterministic
> parts of a program run (syscall results) and replay them
> deterministicly. This means you can finally use breakpoints without
> trigerring timeouts on the client side. You can also reverse-debug:
> start from the crash and go backward.
>
> It wasn't working on smbd but after opening a couple of issues and
> working on one I was able to use it. Other syscall might have to be
> implemented depending on what you try to run.
>
> http://rr-project.org/
>
> You might want to pull from here to get an extra quotactl syscall
> implemented:
>
> https://github.com/aaptel/rr.git on the branch quotactl-xgetqstat

Wow - that looks really cool. Can you write something
up for the wiki to explain how to use it ?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: rr debbugger

Samba - samba-technical mailing list
In reply to this post by Samba - samba-technical mailing list
Hi,

I've talked to the lead developer in person before (he's a New
Zealander) and I've debugged a few issues with it on Samba. I worked
with him about a year ago to fix some of the syscalls which were
required to run make test, like some interactions with socket wrapper.
If you manage to find any replay divergences with make test TESTS="..."
, he can actually figure it out from there (provided it doesn't take too
long to reproduce).

When I was playing around with it, there were still issues mmap and some
of the caches, so TDB_NOMMAP made it fairly reliable as well as wiping
any caches between runs. I see some of those have now been fixed, which
is nice.

It would be nice to run rr over a large number of intermittently failing
tests (using chaos mode as well to produce different scheduling), but
part of the problem with failures on these tests is that they have
dependencies on earlier state during the full make test. There's still
lots of work before we could actually get make test running entirely
under rr, but it would be rather useful for these failures (despite the
fact that replaying to that point would take a long time).


Cheers,

Garming


On 12/04/17 03:59, Aurélien Aptel via samba-technical wrote:

> Hi,
>
> There is a group of people at mozilla working on a very interesting
> project, the rr debugger. It allows you to record the non-deterministic
> parts of a program run (syscall results) and replay them
> deterministicly. This means you can finally use breakpoints without
> trigerring timeouts on the client side. You can also reverse-debug:
> start from the crash and go backward.
>
> It wasn't working on smbd but after opening a couple of issues and
> working on one I was able to use it. Other syscall might have to be
> implemented depending on what you try to run.
>
> http://rr-project.org/
>
> You might want to pull from here to get an extra quotactl syscall
> implemented:
>
> https://github.com/aaptel/rr.git on the branch quotactl-xgetqstat
>
> Cheers,
>


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: rr debbugger

Samba - samba-technical mailing list
One thing to add, using checkpoint in the rr gdb debugger is
particularly nice. Instead of running from the beginning, you can make a
checkpoint right before the failure and restart from that point. In a
long-running situation, this is great for gathering information, and
particularly when the reverse debugging does not work entirely (e.g.
optimized code or rr bugs).

I also have some ideas about a rr gdb command which would be useful for
following IRPC messages between processes. As it is, I haven't really
seen a good way of cycling through processes with rr and I don't see any
reason it can't be done.

Cheers,

Garming

On 12/04/17 10:10, Garming Sam via samba-technical wrote:

> Hi,
>
> I've talked to the lead developer in person before (he's a New
> Zealander) and I've debugged a few issues with it on Samba. I worked
> with him about a year ago to fix some of the syscalls which were
> required to run make test, like some interactions with socket wrapper.
> If you manage to find any replay divergences with make test TESTS="..."
> , he can actually figure it out from there (provided it doesn't take too
> long to reproduce).
>
> When I was playing around with it, there were still issues mmap and some
> of the caches, so TDB_NOMMAP made it fairly reliable as well as wiping
> any caches between runs. I see some of those have now been fixed, which
> is nice.
>
> It would be nice to run rr over a large number of intermittently failing
> tests (using chaos mode as well to produce different scheduling), but
> part of the problem with failures on these tests is that they have
> dependencies on earlier state during the full make test. There's still
> lots of work before we could actually get make test running entirely
> under rr, but it would be rather useful for these failures (despite the
> fact that replaying to that point would take a long time).
>
>
> Cheers,
>
> Garming
>
>
> On 12/04/17 03:59, Aurélien Aptel via samba-technical wrote:
>> Hi,
>>
>> There is a group of people at mozilla working on a very interesting
>> project, the rr debugger. It allows you to record the non-deterministic
>> parts of a program run (syscall results) and replay them
>> deterministicly. This means you can finally use breakpoints without
>> trigerring timeouts on the client side. You can also reverse-debug:
>> start from the crash and go backward.
>>
>> It wasn't working on smbd but after opening a couple of issues and
>> working on one I was able to use it. Other syscall might have to be
>> implemented depending on what you try to run.
>>
>> http://rr-project.org/
>>
>> You might want to pull from here to get an extra quotactl syscall
>> implemented:
>>
>> https://github.com/aaptel/rr.git on the branch quotactl-xgetqstat
>>
>> Cheers,
>>
>


Loading...