output overwritten with the -ff option when the pid rolls over the pix_max (and you have many processes)
Philippe Ombredanne
pombredanne at nexb.com
Thu Feb 20 15:52:10 UTC 2014
On Thu, Feb 20, 2014 at 4:42 PM, Dmitry V. Levin <ldv at altlinux.org> wrote:
> 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?
Hum, I am not sure.
Appending would mix things from different process, so the notion of
PID would be lost somehow, except for the time stamp if it is used as
an option.
On the other hand, since we have twice the same PID, the notion of PID
is already somewhat lost anyway.
I wonder if a new file could be created with a unique new name instead ?
Just a thought...
--
Philippe Ombredanne
More information about the Strace-devel
mailing list