Problems with pppd

YONETANI Tomokazu qhwt+dfly at les.ath.cx
Fri Feb 3 20:36:15 PST 2006


On Fri, Feb 03, 2006 at 12:23:49PM -0600, ejc wrote:
> > Though my laptop has an RJ-11 port, I have no idea how I can make this
> > on-chip modem work.  I need to find a real modem before I can dig in
> > further.  In the meantime I looked at your kernel dump, and I think
> > (IIUC) ppp driver has a serializer problem.  Can you try a kernel with
> > the following options enabled(seems it's commented out now):
> >   options INVARIANTS
> >   options INVARIANT_SUPPORT
> >
> > and run the following command(as root) before running pppd and ping:
> >   sysctl debug.trace_on_panic=1 debug.debugger_on_panic=1
> > if my guess is right, you'll see a panic in lwkt_serialize_enter()
> > (but it may be far before you run the ping command...).
> 
> I did this last night and have uploaded the files to 
> http://www.crackpot.org/~ejc/dragonfly/

Ok, please try the attached patch, with above options enabled
(and leave the last patch applied).
 usage: assuming you have this patch at ~/ppp.patch,
 $ patch -d /sys/net -p0 < ~/ppp.patch
 then recompile your kernel and reboot.

Index: ppp/if_ppp.c
===================================================================
RCS file: /home/source/dragonfly/cvs/src/sys/net/ppp/if_ppp.c,v
retrieving revision 1.28
diff -u -p -r1.28 if_ppp.c
--- ppp/if_ppp.c	11 Dec 2005 13:00:17 -0000	1.28
+++ ppp/if_ppp.c	4 Feb 2006 04:29:19 -0000
@@ -867,9 +867,8 @@ pppoutput(struct ifnet *ifp, struct mbuf
 	        error = 0;
 	    }
 	} else {
-	    lwkt_serialize_enter(sc->sc_if.if_serializer);
+	    ASSERT_SERIALIZED(sc->sc_if.if_serializer);
 	    error = ifq_enqueue(&sc->sc_if.if_snd, m0, &pktattr);
-	    lwkt_serialize_exit(sc->sc_if.if_serializer);
 	}
 	if (error) {
 	    crit_exit();
Index: ppp_layer/ppp_tty.c
===================================================================
RCS file: /home/source/dragonfly/cvs/src/sys/net/ppp_layer/ppp_tty.c,v
retrieving revision 1.14
diff -u -p -r1.14 ppp_tty.c
--- ppp_layer/ppp_tty.c	11 Dec 2005 13:00:17 -0000	1.14
+++ ppp_layer/ppp_tty.c	1 Feb 2006 16:28:58 -0000
@@ -409,7 +409,9 @@ pppwrite(struct tty *tp, struct uio *uio
     m0->m_len -= PPP_HDRLEN;
 
     /* call the upper layer to "transmit" it... */
+    lwkt_serialize_enter(sc->sc_if.if_serializer);
     error = pppoutput(&sc->sc_if, m0, &dst, (struct rtentry *)0);
+    lwkt_serialize_exit(sc->sc_if.if_serializer);
     crit_exit();
     return (error);
 }




More information about the Bugs mailing list