This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug server/20557] It seems like that switching output file doesn't work.


https://sourceware.org/bugzilla/show_bug.cgi?id=20557

--- Comment #11 from David Smith <dsmith at redhat dot com> ---
(In reply to SteveTsai from comment #10)
> Steve(In reply to David Smith from comment #9)
> > 
> > Let's try something simple and get the udp and tcp tapsets out of the
> > picture. Try the following (which is what flightrec2.exp runs):
> > 
> > # stap -F -o f.out -S 1,3 -e 'probe timer.ms(10) { for (j = 0; j < 1000;
> > j++) printf("1234567890\n") }'
> > 
> > If that just creates 1 big file instead of 3 little ones that rotate, we'll
> > have to go deeper.
> 
> # uname -a
> Linux steve-systemtap 4.4.0-34-generic #53~14.04.1-Ubuntu SMP Wed Jul 27
> 16:56:40 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
> 
> I tried your example. It produce only one big file.

Something odd is going on then. Here's where we dig deeper. Run the following
commands:

# stap -p4 -m renamemod -F -o f.out -S 1,3 -e 'probe timer.ms(10) { for (j = 0;
j < 1000; j++) printf("1234567890\n") } probe timer.sec(5) { exit() }'
# sudo strace -f -ff -o strace.out /usr/local/bin/staprun -o f.out -R -S 1,3
renamemod.ko

If you are running the version of systemtap that came with Ubuntu, you'd change
the last command to:

# sudo strace -f -ff -o strace.out /usr/bin/staprun -o f.out -R -S 1,3
renamemod.ko

That should probably produce around 5 strace.out.PID files. Please attach those
to this bug. When I look for references to f.out.* files in my strace.out.*
files, I see the following:

# egrep 'f.out.[0-9]' strace.out.*
strace.out.29488:open("/home/dsmith/f.out.0",
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 6
strace.out.29491:open("/home/dsmith/f.out.1",
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 6
strace.out.29491:open("/home/dsmith/f.out.2",
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 6
strace.out.29491:unlink("/home/dsmith/f.out.0")          = 0
strace.out.29491:open("/home/dsmith/f.out.3",
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 6
strace.out.29491:unlink("/home/dsmith/f.out.1")          = 0
strace.out.29491:open("/home/dsmith/f.out.4",
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 6
strace.out.29491:unlink("/home/dsmith/f.out.2")          = 0
strace.out.29491:open("/home/dsmith/f.out.5",
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 6

One possibility here might be that opening of 'f.out.1' is failing somehow for
you, so stap keeps writing to 'f.out.0'.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]