Bug#516525: apt-cacher: possibly broken pipelining

2009-04-04 Thread Mark Hindley
On Tue, Mar 17, 2009 at 12:13:34PM +0100, Patrice Pillot wrote:
> Mark Hindley a écrit :
> > I am at a slight disadvantage here as I can't actually reproduce this
> > behaviour which makes debugging and testing difficult.
> > 
> > Could you try this patch instead and see if it is better?
> > 
> 
> Well, this doesn't work any better. But as I tried your patch it
> happened I discovered something that might be of interest.

Can you try this one instead. It addresses the only problem  can see
with the logs.


diff --git a/apt-cacher b/apt-cacher
index 48741b6..feee576 100755
--- a/apt-cacher2
+++ b/apt-cacher2
@@ -844,14 +844,20 @@ sub return_file {
$headstring .= 'Connection: '.($concloseflag ? 'Close' : 
'Keep-Alive')."\r\n";
 
# keep only parts interesting for apt
-   for(<$in>) {
-   if(/^Last-Modified|Content|Accept|ETag|Age/) {
-   $headstring.=$_;
-   if(/^Content-Length:\ *(\d+)/) {
-   $explen=$1;
+   if ($code==200) {
+   for(<$in>) {
+   chomp;
+   if(/^Last-Modified|Content|Accept|ETag|Age/) {
+   $headstring.=$_."\r\n";
+   if(/^Content-Length:\ *(\d+)/) {
+   $explen=$1;
+   }
}
}
}
+   else {
+   $headstring.="Content-Length: 0\r\n";
+   }
close($in);
&release_global_lock;
 
@@ -861,7 +867,7 @@ sub return_file {
debug_message("Header sent: $headstring");
 
# Stop after sending the header with errors
-   return if HTTP::Status::is_server_error($code);
+   return if HTTP::Status::is_error($code);
 
}
else {



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#516525: apt-cacher: possibly broken pipelining

2009-04-05 Thread Patrice Pillot
Mark Hindley a écrit :
> Can you try this one instead. It addresses the only problem  can see
> with the logs.
> 
> 
> diff --git a/apt-cacher b/apt-cacher
> index 48741b6..feee576 100755
> --- a/apt-cacher2
> +++ b/apt-cacher2
> @@ -844,14 +844,20 @@ sub return_file {
>   $headstring .= 'Connection: '.($concloseflag ? 'Close' : 
> 'Keep-Alive')."\r\n";
>  
>   # keep only parts interesting for apt
> - for(<$in>) {
> - if(/^Last-Modified|Content|Accept|ETag|Age/) {
> - $headstring.=$_;
> - if(/^Content-Length:\ *(\d+)/) {
> - $explen=$1;
> + if ($code==200) {
> + for(<$in>) {
> + chomp;
> + if(/^Last-Modified|Content|Accept|ETag|Age/) {
> + $headstring.=$_."\r\n";
> + if(/^Content-Length:\ *(\d+)/) {
> + $explen=$1;
> + }
>   }
>   }
>   }
> + else {
> + $headstring.="Content-Length: 0\r\n";
> + }
>   close($in);
>   &release_global_lock;
>  
> @@ -861,7 +867,7 @@ sub return_file {
>   debug_message("Header sent: $headstring");
>  
>   # Stop after sending the header with errors
> - return if HTTP::Status::is_server_error($code);
> + return if HTTP::Status::is_error($code);
>  
>   }
>   else {
> 

I'm sorry, it still doesn't do the job. apt-updating on the apt-cacher
server gives me an error :

r...@ataz [517] ~$ aptitude -v update && aptitude -syv dist-upgrade
Ign file: binary/ Release.gpg
Ign file: binary/ Translation-fr
Ign file: binary/ Release
Ign file: binary/ Packages
Prendre : 1 http://localhost testing/updates Release.gpg [197B]
Ign http://localhost testing/updates/main Translation-fr
Err http://localhost testing/updates/contrib Translation-fr
  Erreur de lecture du serveur - read (104 Connexion ré-initialisée par
le correspondant)
Ign http://localhost testing/updates/non-free Translation-fr
Prendre : 2 http://localhost testing Release.gpg [197B]
Prendre : 3 http://localhost testing/main Translation-fr [646kB]
Ign http://localhost testing/non-free Translation-fr
Ign http://localhost testing/contrib Translation-fr
Prendre : 4 http://localhost testing-proposed-updates Release.gpg [197B]
Ign http://localhost testing-proposed-updates/main Translation-fr
Ign http://localhost testing-proposed-updates/non-free Translation-fr
Ign http://localhost testing-proposed-updates/contrib Translation-fr
Prendre : 5 http://localhost testing/updates Release [37,7kB]
Prendre : 6 http://localhost testing Release [78,3kB]
Prendre : 7 http://localhost testing-proposed-updates Release [54,5kB]
Ign http://localhost testing/updates/main Packages/DiffIndex
Ign http://localhost testing/updates/contrib Packages/DiffIndex
Ign http://localhost testing/updates/non-free Packages/DiffIndex
Ign http://localhost testing/updates/main Sources/DiffIndex
Ign http://localhost testing/updates/contrib Sources/DiffIndex
Ign http://localhost testing/updates/non-free Sources/DiffIndex
Prendre : 8 http://localhost testing/main Packages/DiffIndex [2038B]
Prendre : 9 http://localhost testing/non-free Packages/DiffIndex [2023B]
Atteint http://localhost testing/contrib Packages/DiffIndex
Prendre : 10 http://localhost testing/main Sources/DiffIndex [2038B]
Prendre : 11 http://localhost testing/non-free Sources/DiffIndex [2023B]
Atteint http://localhost testing/contrib Sources/DiffIndex
Atteint http://localhost testing-proposed-updates/main Packages/DiffIndex
Ign http://localhost testing-proposed-updates/non-free Packages/DiffIndex
Ign http://localhost testing-proposed-updates/contrib Packages/DiffIndex
Atteint http://localhost testing/updates/main Packages
Atteint http://localhost testing/updates/contrib Packages
Atteint http://localhost testing/updates/non-free Packages
Atteint http://localhost testing/updates/main Sources
Atteint http://localhost testing/updates/contrib Sources
Atteint http://localhost testing/updates/non-free Sources
Prendre : 12 http://localhost testing/main 2009-04-05-0239.52.pdiff [12,3kB]
Prendre : 13 http://localhost testing/main 2009-04-05-0239.52.pdiff [12,3kB]
Prendre : 14 http://localhost testing/main 2009-04-05-0239.52.pdiff [12,3kB]
Prendre : 15 http://localhost testing/non-free 2009-04-05-0239.52.pdiff
[625B]
Prendre : 16 http://localhost testing/non-free 2009-04-05-0239.52.pdiff
[625B]
Prendre : 17 http://localhost testing/non-free 2009-04-05-0239.52.pdiff
[625B]
Prendre : 18 http://localhost testing/main 2009-04-05-0239.52.pdiff [9758B]
Prendre : 19 http://localhost testing/main 2009-04-05-0239.52.pdiff [9758B]
Prendre : 20 http://localhost testing/main 2009-04-05-0239.52.pdiff [9758B]
Prendre : 21 http://localhost testing/non-free 2009-04-05-0239.52.pdiff
[644B]

Bug#516525: apt-cacher: possibly broken pipelining

2009-04-08 Thread Patrice Pillot
Hi,

I forgot to mention that lately errors began to appear during the
upgrade phase, not only the update. Here are some lines chunked off the
output of a recent client machine upgrade (ataz is the name of the
machine running apt-cacher):

Err http://ataz testing/main libgtkhtml3.14-19 3.24.5-2
  400 No Request Received
[...]
E: impossible de récupérer
http://ataz:3142/ftp.fr.debian.org/debian/pool/main/g/gtkhtml3.14/libgtkhtml3.14-19_3.24.5-2_i386.deb
 :
400 No Request Received
E: Impossible d'effectuer une correction pour des paquets manquants

Please note that upgrading different client machines through the same
server producted this morning errors (4 to 6 of them) on different
packages on each run which reinforce my suspicion on some sort of server
"overload".

HTH

pp



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#516525: apt-cacher: possibly broken pipelining

2009-03-03 Thread Mark Hindley
On Sun, Mar 01, 2009 at 07:26:58PM -0600, Raphael Geissert wrote:
> Hi,
> 
> Sorry for not replying to your other message; it went to the spam box.
> 
> > What version did you upgrade from?
> 
> lenny's, 1.6.4
> 
> 2009/3/1 Mark Hindley :
> > On Sat, Feb 21, 2009 at 08:49:27PM -0600, Raphael Geissert wrote:
> >> Package: apt-cacher
> >> Version: 1.6.7
> >>
> >> Hi,
> >>
> >> Ever since I upgraded to the above mentioned version of apt-cacher, I 
> >> started
> >> to have 104 Connection reset by peer errors from apt on a machine other 
> >> than
> >> the one where apt-cacher is installed.
> >>
> >> At the moment I have workarounded that bug on the client machine by using
> >> Acquire::http::Pipeline-Depth "0";
> >> in apt.conf
> >>
> >> Neither access.log nor error.log recorded the failed requests.
> >
> > Could you look at bug #517761. The symptoms are similar and I am
> > wondering if it is the same bug.
> >
> 
> Not exactly the same symptoms, on the reporter's case the translations
> files are the ones failing to be downloaded, in my case they are
> random files.

OK, I need more info than this.

Could you run apt-get update with -o Debug::Acquire::http=True
and enable debugging in the config file and send the contents when the
bug shows.

Thanks

Mark



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#516525: apt-cacher: possibly broken pipelining

2009-03-13 Thread Patrice Pillot
Hi,

I'm experiencing the same problem here. The locale is the same on the
client and the box running apt-cacher. They're both running testing.

The box running apt-cacher is updated daily while the client is
generally updated once a week.

Problems began to appear some days ago, after testing began to thaw
(sorry, I can't be more precised, didn't took note since I thought it
was some network problem as they were transient problems then and the
network at work is somewhat strange lately). As a matter of fact,
apt-cacher was upgraded from 1.6.4 -> 1.6.7 on February, 23rd and this
seems to me to be that the problem started to appear erratically
approximately at this moment.

First, the box with apt-cacher began to exhibit the problem from time to
time (maybe twice a week) but it disappeared when re-running 'aptitude
update' and last week-end the same problem exhibited while connecting to
apt-cacher from the remote client (yet I managed to get to update
re-running the aptitude command at once).

But tonight, at home where the network has not been twiked recently,
I've been completely unable to update the client until I used the
workaround given by Raphael (Acquire::http::Pipeline-Depth "0" - many
thanks, Raphael!).

Aptitude always failed on the testing-proposed-updates/contrib line.

As you suggested, I turned debugging on in apt-cacher and ran aptitude
with the Debug::Acquire::http=True option. The log file is attached to
this mail.

HTH

pp


error.log.gz
Description: GNU Zip compressed data


Bug#516525: apt-cacher: possibly broken pipelining

2009-03-15 Thread Mark Hindley
Thanks for this

Could you apply this patch to /usr/share/apt-cacher/apt-cacher and see
if it helps.

Mark

diff --git a/apt-cacher b/apt-cacher
index 48741b6..13e19f0 100755
--- a/apt-cacher2
+++ b/apt-cacher2
@@ -861,7 +861,7 @@ sub return_file {
debug_message("Header sent: $headstring");
 
# Stop after sending the header with errors
-   return if HTTP::Status::is_server_error($code);
+   return if HTTP::Status::is_error($code);
 
}
else {



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#516525: apt-cacher: possibly broken pipelining

2009-03-15 Thread Patrice Pillot
Hi,

Mark Hindley a écrit :
> Could you apply this patch to /usr/share/apt-cacher/apt-cacher and see
> if it helps.

First, let me inform you that yesterday I noticed, after writing my
comment, that the errors were permanent and perceptible even on the
machine that's running apt-cacher, not only from clients.

By the way, the 1.6.8 release transitionned today to squeeze without any
effects regarding this bug.

As for the patch, I'm sorry, but this does not help. Actually, it seems
like I've got even more errors.

After applying the patch, the only difference is that from the 'server'
I still only got the error on testing/proposed-updates/contrib while
from the only client that's still awake tonight I got errors on
updates/contrib, updates's Release.gpg and testing-proposed-updates/non-free

Oups, trying re-running the command once or twice just in case of, it
turns out the bug is appearing and disappearing inconsistently anew like
I nticed it to do some times lately. I join the output I got on the
console for the three runs I just made (with your patch enabled). On the
client the errors are still consistently appearing on the same line, yet.

Reverting the patch to the official release only make the errors being
consistently appearing on both the client and 'server'.

HTH

pp


console-output.gz
Description: GNU Zip compressed data


Bug#516525: apt-cacher: possibly broken pipelining

2009-03-16 Thread Mark Hindley
I am at a slight disadvantage here as I can't actually reproduce this
behaviour which makes debugging and testing difficult.

Could you try this patch instead and see if it is better?

Thanks for your help.

Mark


diff --git a/apt-cacher b/apt-cacher
index 48741b6..7c58fae 100755
--- a/apt-cacher2
+++ b/apt-cacher2
@@ -844,14 +844,19 @@ sub return_file {
$headstring .= 'Connection: '.($concloseflag ? 'Close' : 
'Keep-Alive')."\r\n";
 
# keep only parts interesting for apt
-   for(<$in>) {
-   if(/^Last-Modified|Content|Accept|ETag|Age/) {
-   $headstring.=$_;
-   if(/^Content-Length:\ *(\d+)/) {
-   $explen=$1;
+   if ($code==200) {
+   for(<$in>) {
+   if(/^Last-Modified|Content|Accept|ETag|Age/) {
+   $headstring.=$_;
+   if(/^Content-Length:\ *(\d+)/) {
+   $explen=$1;
+   }
}
}
}
+   else {
+   $headstring.='Content-Length: 0';
+   }
close($in);
&release_global_lock;
 
@@ -861,7 +866,7 @@ sub return_file {
debug_message("Header sent: $headstring");
 
# Stop after sending the header with errors
-   return if HTTP::Status::is_server_error($code);
+   return if HTTP::Status::is_error($code);
 
}
else {



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#516525: apt-cacher: possibly broken pipelining

2009-03-17 Thread Patrice Pillot
Mark Hindley a écrit :
> I am at a slight disadvantage here as I can't actually reproduce this
> behaviour which makes debugging and testing difficult.
> 
> Could you try this patch instead and see if it is better?
> 

Well, this doesn't work any better. But as I tried your patch it
happened I discovered something that might be of interest.

Presently I only made tests on the 'server' machine, that is the one
running apt-cacher since I don't have accessible client for now.

The patch version exhibited many error messages :

r...@ataz [533] /tmp$ aptitude -v update
Ign file: binary/ Release.gpg
Ign file: binary/ Translation-fr
Ign file: binary/ Release
Ign file: binary/ Packages
Atteint http://localhost testing/updates Release.gpg
Err http://localhost testing/updates/main Translation-fr
  Échec de la connexion
Err http://localhost testing/updates/contrib Translation-fr
  Échec de la connexion
Err http://localhost testing/updates/non-free Translation-fr
  Échec de la connexion
Atteint http://localhost testing Release.gpg
Atteint http://localhost testing/main Translation-fr
Err http://localhost testing/non-free Translation-fr
  Échec de la connexion
Err http://localhost testing/contrib Translation-fr
  Échec de la connexion
Atteint http://localhost testing-proposed-updates Release.gpg
Err http://localhost testing-proposed-updates/main Translation-fr
  Échec de la connexion
Err http://localhost testing-proposed-updates/non-free Translation-fr
  Échec de la connexion
Err http://localhost testing-proposed-updates/contrib Translation-fr
  Échec de la connexion
Atteint http://localhost testing/updates Release
Atteint http://localhost testing Release
Atteint http://localhost testing-proposed-updates Release
Ign http://localhost testing/updates/main Packages/DiffIndex
Ign http://localhost testing/updates/contrib Packages/DiffIndex
Ign http://localhost testing/updates/non-free Packages/DiffIndex
Ign http://localhost testing/updates/main Sources/DiffIndex
Ign http://localhost testing/updates/contrib Sources/DiffIndex
Ign http://localhost testing/updates/non-free Sources/DiffIndex
Atteint http://localhost testing/main Packages/DiffIndex
Atteint http://localhost testing/non-free Packages/DiffIndex
Atteint http://localhost testing/contrib Packages/DiffIndex
Atteint http://localhost testing/main Sources/DiffIndex
Atteint http://localhost testing/non-free Sources/DiffIndex
Atteint http://localhost testing/contrib Sources/DiffIndex
Atteint http://localhost testing-proposed-updates/main Packages/DiffIndex
Ign http://localhost testing-proposed-updates/non-free Packages/DiffIndex
Ign http://localhost testing-proposed-updates/contrib Packages/DiffIndex
Atteint http://localhost testing/updates/main Packages
Atteint http://localhost testing/updates/contrib Packages
Atteint http://localhost testing/updates/non-free Packages
Atteint http://localhost testing/updates/main Sources
Atteint http://localhost testing/updates/contrib Sources
Atteint http://localhost testing/updates/non-free Sources
Atteint http://localhost testing-proposed-updates/non-free Packages
Atteint http://localhost testing-proposed-updates/contrib Packages
Lecture des listes de paquets... Fait

État actuel : 0 paquet cassé [+0], 0 mise à jour restante [+0], 22640
nouveaux paquets [+0].

While I wish to check for the exact english translation of the error
messages, I runned apt-cacher with LC_ALL=C and behold, everything run
fine !

I reversed to the official package version and tried with LC_ALL=C and
it worked fine too.

This seems to establish strong connections with #517761 albeit the error
messages are not exactly the same.

pp



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#516525: apt-cacher: possibly broken pipelining

2009-02-21 Thread Raphael Geissert
Package: apt-cacher
Version: 1.6.7

Hi,

Ever since I upgraded to the above mentioned version of apt-cacher, I started 
to have 104 Connection reset by peer errors from apt on a machine other than 
the one where apt-cacher is installed. 

At the moment I have workarounded that bug on the client machine by using
Acquire::http::Pipeline-Depth "0";
in apt.conf

Neither access.log nor error.log recorded the failed requests.

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#516525: apt-cacher: possibly broken pipelining

2009-02-22 Thread Mark Hindley
On Sat, Feb 21, 2009 at 08:49:27PM -0600, Raphael Geissert wrote:
> Package: apt-cacher
> Version: 1.6.7
> 
> Hi,
> 
> Ever since I upgraded to the above mentioned version of apt-cacher, I started 
> to have 104 Connection reset by peer errors from apt on a machine other than 
> the one where apt-cacher is installed. 

What version did you upgrade from?

Mark



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#516525: apt-cacher: possibly broken pipelining

2009-03-01 Thread Mark Hindley
On Sat, Feb 21, 2009 at 08:49:27PM -0600, Raphael Geissert wrote:
> Package: apt-cacher
> Version: 1.6.7
> 
> Hi,
> 
> Ever since I upgraded to the above mentioned version of apt-cacher, I started 
> to have 104 Connection reset by peer errors from apt on a machine other than 
> the one where apt-cacher is installed. 
> 
> At the moment I have workarounded that bug on the client machine by using
> Acquire::http::Pipeline-Depth "0";
> in apt.conf
> 
> Neither access.log nor error.log recorded the failed requests.

Could you look at bug #517761. The symptoms are similar and I am
wondering if it is the same bug.

The reporter has tracked it down to mismatched LANG settings.

What are the LANG settings on your client and server?

Does it fix it to make them match?

Cheers,

Mark



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#516525: apt-cacher: possibly broken pipelining

2009-03-01 Thread Raphael Geissert
Hi,

Sorry for not replying to your other message; it went to the spam box.

> What version did you upgrade from?

lenny's, 1.6.4

2009/3/1 Mark Hindley :
> On Sat, Feb 21, 2009 at 08:49:27PM -0600, Raphael Geissert wrote:
>> Package: apt-cacher
>> Version: 1.6.7
>>
>> Hi,
>>
>> Ever since I upgraded to the above mentioned version of apt-cacher, I started
>> to have 104 Connection reset by peer errors from apt on a machine other than
>> the one where apt-cacher is installed.
>>
>> At the moment I have workarounded that bug on the client machine by using
>> Acquire::http::Pipeline-Depth "0";
>> in apt.conf
>>
>> Neither access.log nor error.log recorded the failed requests.
>
> Could you look at bug #517761. The symptoms are similar and I am
> wondering if it is the same bug.
>

Not exactly the same symptoms, on the reporter's case the translations
files are the ones failing to be downloaded, in my case they are
random files.

> The reporter has tracked it down to mismatched LANG settings.
>
> What are the LANG settings on your client and server?

They both use en_GB.UTF8

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org