RPC server does not clean /tmp folder

I’m running autotune for a device having only 256MB /tmp partition (tmpfs)
Alter several hours of running autotune I got error - no space left on device

I noticed that autotune process generates lots of small tmp files under /tmp, e.g.

drwx------  2 atomicpi atomicpi   80 Jul 19 19:21 tmp72arx5u7
drwx------  2 atomicpi atomicpi   80 Jul 19 19:21 tmp8uq6rs7d
drwx------  2 atomicpi atomicpi   80 Jul 19 19:21 tmpd849iv0d
drwx------  2 atomicpi atomicpi   80 Jul 19 19:21 tmpn0pk_1og
drwx------  2 atomicpi atomicpi   80 Jul 19 19:21 tmpnfnbzl6a
drwx------  2 atomicpi atomicpi   80 Jul 19 19:21 tmpo8xxeund
drwx------  2 atomicpi atomicpi   80 Jul 19 19:21 tmptbo2z2q6
drwx------  2 atomicpi atomicpi   80 Jul 19 19:21 tmpy75djtis

Each folder contains 2 files (tar and so) total about 20KB. As a result the garbage is growing at about 200KB per min rate.

Workaround (delete tmp files which are older than 10 min every minute) :

$ crontab -l

# m h  dom mon dow   command
* * * * * find /tmp/tmp* -mmin +10 -delete

might be related to https://github.com/dmlc/tvm/pull/3574

2 Likes