From owner-freebsd-stable Fri Jul 23 11: 0:55 1999 Delivered-To: freebsd-stable@freebsd.org Received: from ipt2.iptelecom.net.ua (ipt2.iptelecom.net.ua [212.42.68.2]) by hub.freebsd.org (Postfix) with ESMTP id C21871573E for ; Fri, 23 Jul 1999 11:00:37 -0700 (PDT) (envelope-from sobomax@altavista.net) Received: from vega. (dialup4-8.iptelecom.net.ua [212.42.68.103]) by ipt2.iptelecom.net.ua (8.9.3/8.9.3) with ESMTP id VAA17609; Fri, 23 Jul 1999 21:05:52 +0300 (EEST) Received: from altavista.net (big_brother [192.168.1.1]) by vega. (8.9.3/8.9.3) with ESMTP id UAA00402; Fri, 23 Jul 1999 20:58:29 +0300 (EEST) (envelope-from sobomax@altavista.net) Message-ID: <3798AD44.EF14A396@altavista.net> Date: Fri, 23 Jul 1999 20:58:28 +0300 From: Maxim Sobolev Reply-To: sobomax@altavista.net Organization: Vega International Capital X-Mailer: Mozilla 4.61 [en] (WinNT; I) X-Accept-Language: ru,uk,en MIME-Version: 1.0 To: Alfred Perlstein Cc: stable@FreeBSD.ORG Subject: Re: Tun interface related panic References: Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > On Fri, 23 Jul 1999, Maxim Sobolev wrote: > > > Alfred Perlstein wrote: > > > > > when entering gdb, please try to show me the variables in the > > > tunwrite function, for some reason i think it's barfing becasue > > > of a zero length write but i'm unsure. > > > > > > use the "up" command to get to tunwrite > > > then "list" and try to show me the output > > > of "print uio, top, mp" seperate though. > > > > > > try to give me as many vars as possible in the function via print. > > > > Following is information you have requested (if I did something wrong, please > > let me know with exact instructions): > [Piece of debug print skipped....] > oops, ok, I wasn't clear, I need to know the contents of the structs > that those pointers point to, try this: > > print *uio > print *top > print **mp > > in, the meanwhile, try this patch: > > cvs diff: Diffing . > Index: if_tun.c > =================================================================== > RCS file: /home/ncvs/src/sys/net/if_tun.c,v > retrieving revision 1.51 > diff -u -r1.51 if_tun.c > --- if_tun.c 1999/01/17 20:53:47 1.51 > +++ if_tun.c 1999/07/23 20:42:34 > @@ -521,7 +521,7 @@ > > TUNDEBUG("%s%d: tunwrite\n", ifp->if_name, ifp->if_unit); > > - if (uio->uio_resid < 0 || uio->uio_resid > TUNMRU) { > + if (uio->uio_resid <= 0 || uio->uio_resid > TUNMRU) { > TUNDEBUG("%s%d: len=%d!\n", ifp->if_name, ifp->if_unit, > uio->uio_resid); > return EIO; > > please please tell me if it works for you so I can file a proper PR. Yeah! It works! It seems that I'm the one who have detected this problem because I'm using latest ppp snapshot instead of standard one. I just tested ppp from -stable and discovered that it doesn't make this panic (version of libalias doesn't matter though). However it would be great if you can commit this patch because new version of ppp have some really nice features on which I rely hardly. This also rising a question to the Brian Somers or any other who can look and find what is wrong with the current ppp (PPP Version 2.22 - $Date: 1999/06/23 16:48:19 $). Anyway, to have some belts in the kernel should not make any harm. Following is the ppp output which probably before your patch would kill my box (I never seen this message before - so to speak..): TCP/IP: IN UDP: 208.147.89.229:18422 ---> 192.168.1.1:7070 Error: ip_Input: deflink: wrote 0, got Input/output error If you still want to see prints, you can see it at the end of this message. In the case if my assistance in debugging ppp will be necessary please let me know. Sincerely, Maxim -- "We believe in the Power and the Might!" (Manowar, 1996) ---------------------------------------- Maxim V. Sobolev, Financial Analyst, Vega International Capital Phone: +380-(44)-246-6396 Fax: +380-(44)-220-8715 E-mail: sobomax@altavista.net ICQ: #42290709 ---------------------------------------- (kgdb) up #5 0xc01630f9 in tunwrite (dev=13312, uio=0xc2d15f14, flag=1) at ../../net/if_tun.c:559 559 top->m_pkthdr.len = tlen; (kgdb) print *uio $1 = {uio_iov = 0xc2d15f0c, uio_iovcnt = 1, uio_offset = 38962, uio_resid = 0, uio_segflg = UIO_USERSPACE, uio_rw = UIO_WRITE, uio_procp = 0xc2cc32e0} (kgdb) print *top Cannot access memory at address 0x0. (kgdb) print **mp Cannot access memory at address 0x0. (kgdb) q To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message