From owner-freebsd-stable@FreeBSD.ORG Wed Apr 14 16:28:38 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA452106566C for ; Wed, 14 Apr 2010 16:28:38 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7838F8FC0A for ; Wed, 14 Apr 2010 16:28:38 +0000 (UTC) Received: by wwa36 with SMTP id 36so218342wwa.13 for ; Wed, 14 Apr 2010 09:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=A8XrLrjRUYCfuHNJskrVhwSxTqjsAc1V2qeTI8XjPTs=; b=vO8F733GZF0rYobyUbCMeLOaBLr8Ak0lbE+wE99C5/1Q9jrfdn6prN5S3/1BhKzzY/ eG3G+2/9pHMpRn59euqSFZmAEiImkNLwWDnV3Ic+fSUBTdoohtsYSoGbMPO1GHgF7MFo 70KCRRIdFP0KxH850mfhTWm0UHqRQcioiPAls= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=OFyeULLJy/dr/q/DdMna93oW4EI+Ovj598ETqFSOMywyF0q9bJ2AZeZgLQynHA2Ggo qIIKsdymPlIJ6DmkGGJfmeX/QqsjDmmOoMqZBM3Rk2LQoO8sgr0CNvkkGEpBBylVsD9I UL7FxkiO/TGZxap5YPxU6oVLa1WNZq6gA+BxM= MIME-Version: 1.0 Received: by 10.216.11.8 with HTTP; Wed, 14 Apr 2010 09:28:33 -0700 (PDT) In-Reply-To: <867hoajsaw.fsf@zhuzha.ua1> References: <201004081313.o38DD4JM041821@lava.sentex.ca> <201004081446.o38EkU7h042296@lava.sentex.ca> <20100408181741.GI5734@michelle.cdnetworks.com> <20100408183900.GJ5734@michelle.cdnetworks.com> <86d3y54tb0.fsf@kopusha.onet> <867hoajsaw.fsf@zhuzha.ua1> Date: Wed, 14 Apr 2010 09:28:33 -0700 Received: by 10.216.164.132 with SMTP id c4mr1343894wel.15.1271262517429; Wed, 14 Apr 2010 09:28:37 -0700 (PDT) Message-ID: From: Jack Vogel To: Mikolaj Golub Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Brandon Gooch , pyunyh@gmail.com, freebsd-stable@freebsd.org, Brandon Gooch Subject: Re: em driver regression X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 16:28:39 -0000 Oh, didn't realize you were running the lem code :) Will make the changes shortly, thanks for your debugging efforts. Jack On Wed, Apr 14, 2010 at 2:29 AM, Mikolaj Golub wrote: > > On Sun, 11 Apr 2010 23:40:03 +0300 Mikolaj Golub wrote: > > MG> Hi, > > MG> Today I have upgraded the kernel in my VirtualBox (3.1.51.r27187) to > the > MG> latest current and have "em0: Watchdog timeout -- resetting" issue. My > MG> previous kernel was for Mar 12. > > MG> Tracking the revision where the problem appeared I see that the issue > is not > MG> observed for r203834 and starts to observe after r205869. > > MG> Interestingly, if I enter ddb and then exit (sometimes I needed to do > this > MG> twice) the errors stop and network starts working. > > Adding some prints I observed the following: > > Apr 14 07:14:08 hasta kernel: em0: lem_init_locked started (ticks 813, > watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: lem_init_locked returned at 3 (ticks > 818, watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: setting watchdog_check to TRUE in > lem_mq_start_locked 1 (ticks 818, watchdog_ > time: 0) > Apr 14 07:14:08 hasta kernel: em0: lem_init_locked started (ticks 818, > watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: lem_init_locked returned at 3 (ticks > 823, watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: setting watchdog_check to TRUE in > lem_mq_start_locked 1 (ticks 828, watchdog_ > time: 0) > Apr 14 07:14:08 hasta kernel: em0: lem_txeof started (ticks: 923, > watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: lem_txeof returned at 3 (ticks: 923, > watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: lem_txeof started (ticks: 1023, > watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: lem_txeof returned at 3 (ticks: 1023, > watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: Watchdog timeout -- resetting (ticks: > 1023, watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: lem_init_locked started (ticks 1024, > watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: lem_init_locked returned at 3 (ticks > 1028, watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: lem_txeof started (ticks: 1128, > watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: lem_txeof returned at 1 (ticks: 1128, > watchdog_time: 0) > Apr 14 07:14:08 hasta kernel: em0: Watchdog timeout -- resetting (ticks: > 1128, watchdog_time: 0) > ... > > So althogh adapter->watchdog_check was set TRUE, adapter->watchdog_time was > never set. > > I see that before r205869 watchdog_time was set in em_xmit but lem_xmit > does > not contain this. After adding back this line to lem_xmit (see the first > patch > below) the problem has gone on my box. > > Also seeing that in the current em_mq_start_locked() both watchdog_check > and > watchdog_time are set I tried another patch adding watchdog_time setting in > lem_mq_start_locked() too (see the second patch below). This has also fixed > the issue for me but I don't know if this is a correct fix and if this is > the > only place where watchdog_time should be set (there are other places in the > function and in the code where watchdog_check is set to TRUE but > watchdog_time > is not set). > > -- > Mikolaj Golub > >