Page MenuHomePhabricator

Remote SVN repository imports over SSH do not tidy up temporary directories
Closed, ResolvedPublic

Description

Phabricator: rP9d051cddd3679d4a580738721624e536b03f6843
OS: FreeBSD-10.2 RELEASE (jailed)

Steps to reproduce:

  1. Add an external repository with path like svn+ssh://user@host/svn/project-name.
  2. Make sure it's busy, so it syncs every 15s.
  3. ls /tmp after minutes, hours, 1 day, 2 days,...

I've had a very huge amount of temporary directories after a few weeks, some of them still containing .passphrase-ssh-key (now tidied up, so I only have 4 days old directories there, that's "only" 88k of them). I noticed that having hundreds of thousands of directory entries in /tmp also affects Phabricator stability, because ExecFuture might fail if it uses setTimeout and /tmp (like in PhabricatorImageTransformer::applyMemeWithImagemagick where the timeout is just set to 10 seconds). The contents of passphrase-ssh-key is the secret key used by phd to sync from my external Subversion repositories.

I also suspect that this is not only caused by the Subversion import, but temporary files are not tidied up somewhere else, too (because of directories that do not contain passphrase-ssh-key and are empty). Maybe they are caused by temporary files while browsing sources in Diffusion. I cannot tell exactly.

Event Timeline

epriestley triaged this task as Normal priority.
epriestley added a project: Prioritized.

I appear to have found a reproduction case for this in the cluster.

I believe this is fixed now, but reproduction has always been somewhat elusive so I'm not completely certain. Please let us know if you still see issues after updating. Thanks for the report!