Moodle Community Sites

Python exception viewing CVS file

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Component/s: CVS repository
  • Labels:
    None

Description

Viewing the following link....

http://cvs.moodle.org/contrib/plugins/mod/certificate/lib.php?revision=1.21.2.13&view=markup

Results in...

Traceback (most recent call last):
File "/usr/local/viewvc/lib/viewvc.py", line 3668, in main
request.run_viewvc()
File "/usr/local/viewvc/lib/viewvc.py", line 388, in run_viewvc
self.view_func(self)
File "/usr/local/viewvc/lib/viewvc.py", line 1447, in view_markup
generate_page(request, "markup", data)
File "/usr/local/viewvc/lib/viewvc.py", line 840, in generate_page
template.generate(request.server.file(), data)
File "/usr/local/viewvc/lib/ezt.py", line 326, in generate
self._execute(self.program, ctx)
File "/usr/local/viewvc/lib/ezt.py", line 455, in _execute
step[0](step[1], ctx)
File "/usr/local/viewvc/lib/ezt.py", line 460, in _cmd_print
_write_value(value, args, ctx)
File "/usr/local/viewvc/lib/ezt.py", line 636, in _write_value
apply(value, [ctx] + list(args))
File "/usr/local/viewvc/lib/viewvc.py", line 1250, in _call_
dir = compat.mkdtemp()
File "/usr/lib/python2.3/tempfile.py", line 308, in mkdtemp
_os.mkdir(file, 0700)
OSError: [Errno 31] Too many links: '/tmp/tmppA793k'

Activity

Hide
Martin Dougiamas added a comment -

Seems OK now ...

Show
Martin Dougiamas added a comment - Seems OK now ...
Hide
Howard Miller added a comment -

Still exactly the same for me. Tried on three different machines at home / at work, and asked a couple of other people to try it too. Logged in or not makes no difference.

Show
Howard Miller added a comment - Still exactly the same for me. Tried on three different machines at home / at work, and asked a couple of other people to try it too. Logged in or not makes no difference.
Hide
Martin Dougiamas added a comment -

Yep I see it too now.

Show
Martin Dougiamas added a comment - Yep I see it too now.
Hide
Martin Dougiamas added a comment -

OK, fixed. There were too many files in /tmp ... tmpwatch was set to keep 10 days worth of files. That's now been reduced to 5.

Show
Martin Dougiamas added a comment - OK, fixed. There were too many files in /tmp ... tmpwatch was set to keep 10 days worth of files. That's now been reduced to 5.
Hide
Eloy Lafuente (stronk7) added a comment -

Hi,

not sure why but /tmp was full again and tmpwatch (executed from cron.daily) wasn't doing its job, so the files in that dir never became reduced (from 32000). And nothing was working (file view, diffs...)

So I've edited the cron.daily script and changed the line to:

/usr/sbin/tmpwatch -x /tmp/.X11-unix -x /tmp/.XIM-unix -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix -fm 72 /tmp

i.e. I've added the fm switches, to force deletion if root hasn't access + to use modify time, instead of access time. Also I've reduced it to 3 days (72) hours. Now there are only 5166 files.

FYI, Jordan, Martin...ciao

Show
Eloy Lafuente (stronk7) added a comment - Hi, not sure why but /tmp was full again and tmpwatch (executed from cron.daily) wasn't doing its job, so the files in that dir never became reduced (from 32000). And nothing was working (file view, diffs...) So I've edited the cron.daily script and changed the line to: /usr/sbin/tmpwatch -x /tmp/.X11-unix -x /tmp/.XIM-unix -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix -fm 72 /tmp i.e. I've added the fm switches, to force deletion if root hasn't access + to use modify time, instead of access time. Also I've reduced it to 3 days (72) hours. Now there are only 5166 files. FYI, Jordan, Martin...ciao
Hide
Eloy Lafuente (stronk7) added a comment -

FYI, reduced to 24h.

/tmp was full again.

Ciao

Show
Eloy Lafuente (stronk7) added a comment - FYI, reduced to 24h. /tmp was full again. Ciao
Hide
Jordan Tomkinson added a comment -

Ah, i wasn't aware of this bug #..

Tim Hunt notified me of this a couple of days ago and i cleaned /tmp also.
I couldnt find any information on how these folders are being managed, other than its something to do with cvs/viewvc
I wrote a small perl script and put it in crontab to clean the rcs* and tmp* folders that have a last access time of more than 24 hours.

Eloy - should my script stay or be removed?

runs at 12pm (moodle hq time) every day.

#!/usr/bin/perl

  1. clean /tmp so viewvc doesnt fill it up

my @files = `/usr/bin/find /tmp/ -atime +1 -mindepth 1 -maxdepth 1 2>/dev/null |grep '/tmp/rcs
|/tmp/tmp'`;

foreach $file (@files) {
chomp($file);
if (($file ne "/tmp") && ($file ne "/tmp/")) { #print "$file\n"; system("/bin/rm -rf $file"); }
}

Show
Jordan Tomkinson added a comment - Ah, i wasn't aware of this bug #.. Tim Hunt notified me of this a couple of days ago and i cleaned /tmp also. I couldnt find any information on how these folders are being managed, other than its something to do with cvs/viewvc I wrote a small perl script and put it in crontab to clean the rcs* and tmp* folders that have a last access time of more than 24 hours. Eloy - should my script stay or be removed? runs at 12pm (moodle hq time) every day. #!/usr/bin/perl
  1. clean /tmp so viewvc doesnt fill it up
my @files = `/usr/bin/find /tmp/ -atime +1 -mindepth 1 -maxdepth 1 2>/dev/null |grep '/tmp/rcs
|/tmp/tmp'`; foreach $file (@files) { chomp($file); if (($file ne "/tmp") && ($file ne "/tmp/")) { #print "$file\n"; system("/bin/rm -rf $file"); } }

People

Dates

  • Created:
    Updated:
    Resolved: