Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Aug 2015 08:57:40 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Joel Dahl <joel@vnode.se>, sbruno@freebsd.org
Cc:        current@freebsd.org
Subject:   Re: Kernel panic with fresh current, probably nfs related
Message-ID:  <914810061.28949434.1440248260373.JavaMail.zimbra@uoguelph.ca>
In-Reply-To: <20150822115519.GA79434@ymer.vnode.se>
References:  <20150822115519.GA79434@ymer.vnode.se>

next in thread | previous in thread | raw e-mail | index | archive | help
Joel Dahl wrote:
> Hi,
> 
> I hit a kernel panic running a fresh -CURRENT today. This machine is my home
> NFS
> server and it exports src and obj to a bunch of other machines. During an
> installkernel on one of the other machines (using the src and obj exports
> from
> the NFS server) the NFS server kernel paniced.
> 
> I took a quick photo of the stack backtrace, since I didn't have time to
> investigate further (but I haven't rebooted the machine yet, it's still
> sitting at the db> prompt:
> 
>   http://mirror.vnode.se/upload/panic001-20150822.JPG
> 
> Any ideas?
> 
I'm going to guess that you're using an "em" net driver, since that is the
only one that sets if_hw_tsomax > IP_MAXPACKET (65535) from what I can see.

Sean, EM_TSO_SIZE is defined as (65535 + sizeof(struct ether_vlan_header)),
which makes it > IP_MAXPACKET. The value of if_hw_tsomax must be <= IP_MAXPACKET
and I'm guessing this is what caused the above panic. (Someday it would be
nice if TSO segments > IP_MAXPACKET could be handled, but that will take changes
in the ip layer and router software so that a bogus ip_len field doesn't cause
problems.)

if_hw_tsomax needs to be the maximum segment size that the driver can accept
from IP. Since the driver adds any MAC header after accepting the TSO segment
from the IP layer, it shouldn't include MAC header(s) in the value for if_hw_tsomax.
(If its limit includes MAC header(s), it needs to subtract those out when setting
 if_hw_tsomax, not add them.)

Since I am working up a patch for the value of if_hw_tsomaxsegcount, I think I'll
add a check for > IP_MAXPACKET for if_hw_tsomax as well.

rick

> --
> Joel
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?914810061.28949434.1440248260373.JavaMail.zimbra>