GSOC: Print only failing syscalls (the opposite of -z option)
Eugene Syromyatnikov
evgsyr at gmail.com
Fri Mar 9 19:16:06 UTC 2018
On Fri, Mar 9, 2018 at 6:22 PM, Harsha Sharma
<harshasharmaiitr at gmail.com> wrote:
> Hello,
>
> This is regarding issue #50 on github.
> This is the current output of strace with '-z' option: (for ioctl_nsfs test)
>
> ioctl(-1, NS_GET_OWNER_UID <unfinished ...>
> ioctl(3, NS_GET_USERNS) = 5
> ioctl(5, NS_GET_PARENT <unfinished ...>
>
> Do we want to just print:
>
> ioctl(-1, NS_GET_OWNER_UID <unfinished ...>
> ioctl(5, NS_GET_PARENT <unfinished ...>
Not exactly, these "<unfinished ...>" calls are the symptom of the incorrect
work of the -z option. The problem here is that we print some information on
entering of a syscall (as it could be no longer available on syscall exiting),
so, unless doing something special (as has been proposed by Burkhard Kohl in
[1], for example), we end up with some output being already printed at
the time we see we shouldn't have printed it. So, in order to resolve the
issue #50, we have to resolve the issue #49 first. There were some issues with
that patch (as well as with its followup[2]) that prevented its inclusion:
* no tests;
* the style was quite lacking;
* some of us still hope reviving structured output branch, so, well, there
wasn't too much initiative on making it mergeable.
But otherwise approach looks quite solid and I think that the patch can be
included after some polishing (like, adding tests, indication that the option
is available in strace -V output, configure option that enforces availability
of the feature, testing with various supported libcs such as musl, etc). After
that, we can move on with the design of the return value-based filtering, so
issue #50 can also be resolved.
[1] https://lists.strace.io/pipermail/strace-devel/2017-January/005941.html
[2] https://lists.strace.io/pipermail/strace-devel/2017-June/006510.html
--
Eugene Syromyatnikov
mailto:evgsyr at gmail.com
xmpp:esyr at jabber.{ru|org}
More information about the Strace-devel
mailing list