Thread (11 messages) 11 messages, 3 authors, 2007-05-03

Re: [Bugme-new] [Bug 8405] New: pppd does stops compresion with "Lost compression sync"

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2007-05-01 03:36:19

On Tue, 1 May 2007 05:20:10 +0200 Stefan Wenk [off-list ref] wrote:
quoted
What is more interesting is that the pppd server log is logging errors.
There are LCP EchoReq and EchoRep. Later a LCP ProtoRej messages occurs and
then the connection is broken. I have attached a pppdump file of the client
side if it helps. This file can be read e.g. by wireshark.
I should have mentioned that I have made some other modifications in order to 
see the kernel logging. This was because I could not find the documentation 
how to turn debugging on for ppp_deflate and because I'm only seeing printk 
of type KERN_ERR and not those with KERN_DEBUG. So I might be missing some 
additional KERN_DEBUG loggings. If somebody can point me to the documentation 
how to get KERN_DEBUG to the log file I can make the test again.
From the commend line: `dmesg -n 8'.
The really big fix is to boot with the ignore_loglevel boot option.  This will
turn on all messages and will defeat any userspace attempt to turn the
loglevel down.
Here is the full diff 
Thanks for persisting with this.  The problem is rather serious.
quoted hunk ↗ jump to hunk
--- ppp_deflate.c.orig  2007-04-23 20:47:08.000000000 +0200
+++ ppp_deflate.c       2007-04-30 19:38:19.000000000 +0200
@@ -174,7 +174,7 @@ static int z_comp_init(void *arg, unsign

        state->seqno = 0;
        state->unit  = unit;
-       state->debug = debug;
+       state->debug = 1;

        zlib_deflateReset(&state->strm);
@@ -393,7 +393,7 @@ static int z_decomp_init(void *arg, unsi

        state->seqno = 0;
        state->unit  = unit;
-       state->debug = debug;
+       state->debug = 1;
        state->mru   = mru;

        zlib_inflateReset(&state->strm);
@@ -487,12 +487,18 @@ int z_decompress(void *arg, unsigned cha
         */
        for (;;) {
                r = zlib_inflate(&state->strm, Z_PACKET_FLUSH);
-               if (r != Z_OK) {
+//             if (r != Z_OK) {
+                if ((r != Z_OK) && (r != Z_BUF_ERROR)) {
                        if (state->debug)
-                               printk(KERN_DEBUG "z_decompress%d: inflate 
returned %d (%s)\n",
+                               printk(KERN_ERR "z_decompress%d: inflate 
returned %d (%s)\n",
                                       state->unit, r, (state->strm.msg? 
state->strm.msg: ""));
                        return DECOMP_FATALERROR;
                }
+                if (r == Z_BUF_ERROR) {
+                             printk(KERN_ERR "z_decompress%d: Would have 
triggered an error as inflate returned %d (%s)\n",
+                             state->unit, r, (state->strm.msg? 
state->strm.msg: ""));
+                }
(that was wordwrapped).

What does it do?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help