On Wed, Sep 02, 2009 at 12:22:00PM -0400, Daniel Richard G. wrote: > After a few hundred cycles of testing, this patch is looking solid. > Running with checksumming enabled, and debugging disabled, error.log and > db.log remain at zero size. > > Oh, but there was one minor issue. I was previously seeing this warning > come up repeatedly in error.log: > > Tue Sep 1 18:10:46 2009|warn [25867]: Use of uninitialized value > $cache_status in concatenation (.) or string at apt-cacher2 line 1053. > > That's from the print() statement in writeaccesslog(). Apparently, the > $cache_status variable in handle_connection() was not getting set to > anything. I worked around this by initializing the variable with a > value, but I don't think this is what should be happening. Not only are > there checks further down that seem to account for an unset value---of > 50K+ lines in the access.log file here, almost 92% of them show the > initial value that I put in.
Could you try this patch and see if it is fixed for you. Mark commit a7a4b37b889cfde38ed8f864a5a38e03bdff23a6 Author: Mark Hindley <[email protected]> Date: Thu Sep 10 10:29:06 2009 +0100 Need global lock for all filestate decisions diff --git a/apt-cacher b/apt-cacher index c33b487..5203b9a 100755 --- a/apt-cacher +++ b/apt-cacher @@ -565,6 +565,7 @@ sub handle_connection { $cached_head = "$cfg->{cache_dir}/headers/$new_filename"; $complete_file = "$cfg->{cache_dir}/private/$new_filename.complete"; + &set_global_lock(': file download decision'); # file state decisions, lock that area debug_message("looking for $cached_file"); if (&is_index_file($filename)) { @@ -655,14 +656,13 @@ sub handle_connection { } if($oldhead && str2time($ifmosince) >= str2time($oldhead)) { + release_global_lock(); &sendrsp(304, 'Not Modified'); debug_message("File not changed: $ifmosince"); next REQUEST; } } - &set_global_lock(': file download decision'); # file state decisions, lock that area - my $fromfile; # handle for return_file() # download or not decision. Also releases the global lock -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

