I keep my /tmp mounted in tmpfs as a very small (50M) volume. Obviously emerge-delta-webrsync requires more space than that to reconstruct the latest tarball. I would like to be able to set TMPDIR to a larger volume (e.g., /var/tmp) so that it is used instead. To accomplish this, I have changed line 433 to the following: TEMPDIR=$(mktemp -t -d delta-webrsync-XXXXXX) I believe this would make the program more flexible and would behave as expected for people familier with mktemp and TMPDIR.
I personally think we should use PORTAGE_TMPDIR instead, like in other parts of the script.
Created attachment 167358 [details, diff] Patch to use PORTAGE_TMPDIR instead
I noticed that kjournald was running a 45% and stayed there (keeping the whole system running slowly). Eventually after researching reports of kjournald hight-cpu issues, I did a df, looking for disk problems. /tmp was full. At /tmp/delta-webrsync-WrZd3P, was a file called portage-20081217.tar which was over 100MB. emerge-delta-webrsync was running on cron and had a proccess called patcher that wouldn't quit until I killed it. I examined emerge-delta-webrsync and too saw that it would allways use /tmp instead of $TMPDIR for big files. I think this incident should be classified critical rather than trivial, because someone with less experience wouldn't easily determine that emerge-delta-webrsync was at the root of a problem such as the scenario outlined above. I agree the fix is trivial, thought.
Created attachment 189963 [details, diff] Use only one TMPDIR, based on PORTAGE_TMPDIR And another patch. This time I totally removed TEMPDIR var in favor of using TMPDIR everywhere - and also made TMPDIR use random directory name (I'm not sure about that). Please note that I haven't really tested this yet, 'cause I've already done webrsync this morning. I'd probably have to take a look at TMPDIR removal, too, so the patch is mainly FYI.
(In reply to comment #4) > Created an attachment (id=189963) [details] > Use only one TMPDIR, based on PORTAGE_TMPDIR > > And another patch. This time I totally removed TEMPDIR var in favor of using > TMPDIR everywhere - and also made TMPDIR use random directory name (I'm not > sure about that). > > Please note that I haven't really tested this yet, 'cause I've already done > webrsync this morning. I'd probably have to take a look at TMPDIR removal, too, > so the patch is mainly FYI. > The 2010 version 3.5.1-r3 still has this problem. After updating, the /tmp directory filled up and patcher was stuck.
(In reply to comment #4) > Created attachment 189963 [details, diff] [details, diff] > Use only one TMPDIR, based on PORTAGE_TMPDIR There's a similar fix in git now: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9bf5900fb2fff77a89b91dd5f38478aaa635ef66
This is fixed in version 3.6.