[MERGE][bug #102019] strace hanging the test suite

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Jul 3 10:30:49 BST 2007

>>>>> "mbp" == Martin Pool <mbp at sourcefrog.net> writes:

    mbp> On 7/3/07, Robert Collins <robertc at robertcollins.net> wrote:
    >> On Mon, 2007-07-02 at 13:22 +0200, Vincent Ladeuil wrote:
    >> > Hi,
    >> >
    >> > The attached patch was obtained from playing with sigstop-demo.py
    >> > script in
    >> > https://bugs.launchpad.net/ubuntu/+source/strace/+bug/103133.
    >> >
    >> > This script has the nice property that it hangs at every run :)
    >> >
    >> > Disabling the '-f' strace option make it run without hanging.
    >> >
    >> > From strace man page :
    >> >
    >> >        -f          Trace child processes as they are  created  by  cur‐
    >> >                    rently  traced  processes as a result of the fork(2)
    >> >                    system call.
    >> >
    >> > This is not needed during the tests, so far, so I disabled the
    >> > option for them.
    >> I would prefer it if you had a new function.
    >> e.g.
    >> def strace_detailed(function, args, kwargs, follow_children=True):
    >> ...
    >> and strace becomes
    >> def strace(function, *args, **kwargs):
    >> return strace_detailed(function, args, kwargs)

Thanks for the hint, I didn't know how to do it in python.

    >> and the tests that test executing strace can do
    >> strace_detailed calls rather than strace calls.

    mbp> I agree with Robert that this style is nicer.

strace_detailed looks ugly to my eyes, but here is a patch that
implements your suggestion.

    mbp> I know there are cases in the test suite where we mix
    mbp> them together and that's why I have this opinion.

I can't find them or I do not understand what you are talking about ;)

    mbp> However, it seems to me that using strace -f on bzr is
    mbp> likely to cause hangs in regular operation just as in
    mbp> the test suite.  Therefore I don't see it as urgent to
    mbp> support it until it actually works properly.


1) we want to have it activated so that debugging SSH
connections, for example, includes SSH process.

2) We are not afraid to encounter spurious threads outside of the
test suite because nobody have reported such things during
debugging (and in that case the dev is the pilot and can just
issue 'fg' if and when needed).

So the solution seems to be: leave it activated except for the
test suite and keep an eye on that strace bug.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 102019.patch
Type: text/x-patch
Size: 14203 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070703/fccfeeb5/attachment-0001.bin 

More information about the bazaar mailing list