output overwritten with the -ff option when the pid rolls over the pix_max (and you have many processes)

Dmitry V. Levin ldv at altlinux.org
Thu Feb 20 15:42:39 UTC 2014


On Thu, Feb 20, 2014 at 04:35:02PM +0100, Philippe Ombredanne wrote:
> This is a bug that can happen rarely, but is easy to reproduce.
> If you trace forks with -ff and -o and you have more processes created
> than the maximum number of pids, eventually the saved traces of some
> pids will be overwritten

That's how strace_fopen() works.  Do you suggest appending instead of
truncating the output file in case of -ff -o?

> The simple workaround is to increase the pid max.
> 32768 is the typical default value on most Linux installations. It can
> be increased to 4194303 which is the highest
> supported value on 32 bit systems and should be high enough for many use cases.
>     $ echo 4194303 > /proc/sys/kernel/pid_max
> 
> This is still a bug though and the output should not be overwritten IMHO


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20140220/1ce21f16/attachment.bin>


More information about the Strace-devel mailing list