This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: consistent printf race conditions
Hi, Nicholas -
halcyonic wrote:
> Scripts below. [...]
> probe syscall.close.return { [...]
> printf("{\"execname\":\"%s\",\"fd\":%d,\"op\":\"%s\",\"pid\":%d,\"ppid\":%d,\"return\":%d,\"timestamp\":%d,\"uid
> \":%d}\n",clean_string(execname()),$fd,clean_string("CLOSE"),pid(),ppid(),$return,gettimeofday_ms(),uid())
> [...]
What does clean_string() look like? Does it by any chance run
sprintf() or similar?
> Here's some output surrounding one of those errors (changed some
> values for security):
Could you try stap -b (bulk mode), resulting in some per-cpu trace files,
and then stap_merge'ing them back together?
- FChE