Junk *.tmp files in /tmp after compilation

Michael Meeks michael.meeks at suse.com
Thu Jan 3 07:48:12 PST 2013


On Thu, 2013-01-03 at 13:12 +0100, Jean-Baptiste Faure wrote:
> I jump into this discussion because I sent the same question.

	:-)

> Each time I build LO 4.0, I get ~459 new temporary files that are not
> removed. I guess they are created during automated tests at the end of
> the build. All files have .tmp extension, many of them (~222) are empty,
> ~119 are recognized as RTF files, ~14 are ODF documents, ~74 are
> archives but probably ooxml files, ~16 are images in various formats,
> others have unknown type.

	Sounds like the best guess then is unit tests; here's how to help hunt
down where they get leaked:

	clean /tmp/

	run 'make check' - see if that leaks the files - if so, it's the
'check' rule :-) Try narrowing that down; does 'make check' inside sw/
dump stuff in /tmp (actually I'd try that first - it'd be faster.

	When we have a reasonably small rule that creates the problem; then we
should do:

	'strace -f -s 256 -o /tmp/slog make check'

	And then search for a known leaked tmp file in that log - then work the
process id (the first item on each line) back - somewhere there is a
'clone(...) = <pid>' type call where <pid> is the pid of the process
that wrote that file.

	Searching for the 'execve' shortly after that clone would give you the
process name of the process that did it.

	Perhaps run that process in isolation to check. Then we'll need to
investigate that process further, if it's a unit test in it - it'd be
good to find a leak: we can presumably improve our test coverage by
fixing it :-)

	Thanks !

		Michael.
	
-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list