From: Stefan Wenk <stefan.wenk@gmx.at>
To: Richard Purdie <rpurdie@rpsys.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
netdev@vger.kernel.org,
"bugme-daemon@kernel-bugs.osdl.org"
<bugme-daemon@bugzilla.kernel.org>
Subject: Re: [Bugme-new] [Bug 8405] New: pppd does stops compresion with "Lost compression sync"
Date: Thu, 3 May 2007 19:18:53 +0200 [thread overview]
Message-ID: <200705031918.53753.stefan.wenk@gmx.at> (raw)
In-Reply-To: <1178151786.5860.94.camel@localhost.localdomain>
On Thursday 03 May 2007 02:23, Richard Purdie wrote:
> On Wed, 2007-05-02 at 18:59 +0200, Stefan Wenk wrote:
> > The situation now is similar as without any modifications. Instead of -5
> > (Z_BUF_ERROR)
> > we get back -3 (Z_DATA_ERROR) from zlib_inflate. Here is the kernel log
> >
> > kernel: PPP generic driver version 2.4.2
> > pppd[6101]: pppd 2.4.4 started by root, uid 0
> > pppd[6101]: Using interface ppp0
> > pppd[6101]: Connect: ppp0 <--> /dev/pts/8
> > pppd[6101]: kernel does not support PPP filtering
> > kernel: PPP BSD Compression module registered
> > kernel: PPP Deflate Compression module registered
> > pppd[6101]: Deflate (15) compression enabled
> > pppd[6101]: Cannot determine ethernet address for proxy ARP
> > pppd[6101]: local IP address 192.168.3.2
> > pppd[6101]: remote IP address 192.168.3.1
> > kernel: z_decompress0: inflate returned -3 (),av in 0, av out 1, t in
> > 1520, t out 3070, dp 0, of 1, is 644, os 1504
> > kernel: z_decompress0: inflate returned -3 ()
> > pppd[6101]: Lost compression sync: disabling compression
> > pppd[6101]: Terminating on signal 2
> > pppd[6101]: Child process pppd (charshunt) (pid 6131) terminated with
> > signal 2 pppd[6101]: Modem hangup
> > pppd[6101]: Connect time 0.2 minutes.
> > pppd[6101]: Sent 2969 bytes, received 2774 bytes.
> > pppd[6101]: Connection terminated.
> > pppd[6101]: Exit.
> >
> > Attached you find the corresponding pppdump file.
>
> Thanks, the interesting bit is that overflow=1. The Z_DATA_ERROR is
> probably coming from zlib_inflateSyncPacket() suggesting a logic error.
>
> I managed to find a null modem cable, create this setup and occasionally
> reproduce the problem. I think the change I suggested was half way there
> but there is another problem. Could you try this patch and see if it
> fixes your errors?
>
> I haven't seen the problem occur here on my box with the patch below
> applied. Having said that, I was testing against a box running 2.6.11.2
> and I did see similar looking compression errors appearing on that just
> before I was about to send this after stressing the link for an hour.
> This could mean there is some more subtle problem (not related to the
> inflate patch). It is sending Reset requests rather than Term Requests
> though so perhaps its some other problem. Lets see what you find with
> the patch below...
>
> Cheers,
>
> Richard
>
> Index: linux-2.6.20-rc4/lib/zlib_inflate/inflate.c
> ===================================================================
> --- linux-2.6.20-rc4.orig/lib/zlib_inflate/inflate.c
> +++ linux-2.6.20-rc4/lib/zlib_inflate/inflate.c
> @@ -743,12 +745,14 @@ int zlib_inflate(z_streamp strm, int flu
>
> strm->data_type = state->bits + (state->last ? 64 : 0) +
> (state->mode == TYPE ? 128 : 0);
> - if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
> - ret = Z_BUF_ERROR;
>
> if (flush == Z_PACKET_FLUSH && ret == Z_OK &&
> - (strm->avail_out != 0 || strm->avail_in == 0))
> + strm->avail_out != 0 && strm->avail_in == 0)
> return zlib_inflateSyncPacket(strm);
> +
> + if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
> + ret = Z_BUF_ERROR;
> +
> return ret;
> }
With this modification the reported problem with the lost compression sync is
fixed indeed. Thank you! I have tried to stress the nullmodem link and on
application level everthing looks fine now. But I do also sometimes see CCP
Reset Requests which are sent by the box with the 2.6.21 kernel. This
problem seems to be fixed on the TCP layer, so the applications do not
recognise. I can't tell is this the ordinary behaviour as I have never looked
at the PPP level in such detail before. I do agree with you that if this is a
problem it does not look to be related with the issue which you fixed now.
Ciao Stefan
prev parent reply other threads:[~2007-05-03 17:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200704292001.l3TK1P6d000716@fire-2.osdl.org>
2007-04-29 21:20 ` [Bugme-new] [Bug 8405] New: pppd does stops compresion with "Lost compression sync" Andrew Morton
2007-04-30 12:08 ` Stefan Wenk
2007-04-30 13:31 ` Richard Purdie
2007-04-30 19:12 ` Stefan Wenk
2007-05-01 3:20 ` Stefan Wenk
2007-05-01 3:36 ` Andrew Morton
2007-05-01 7:27 ` Stefan Wenk
2007-05-01 21:22 ` Richard Purdie
2007-05-02 16:59 ` Stefan Wenk
2007-05-03 0:23 ` Richard Purdie
2007-05-03 17:18 ` Stefan Wenk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200705031918.53753.stefan.wenk@gmx.at \
--to=stefan.wenk@gmx.at \
--cc=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).