Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Oct 2015 23:05:11 +0200 (CEST)
From:      Christian Kratzer <ck-lists@cksoft.de>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Rick Macklem <rmacklem@uoguelph.ca>, freebsd-stable@freebsd.org
Subject:   Re: smbfs crashes since approx. 10.1-RELEASE
Message-ID:  <alpine.BSF.2.20.1510072256360.71292@noc1.cksoft.de>
In-Reply-To: <3563189.eDHDcCgW5L@ralph.baldwin.cx>
References:  <alpine.BSF.2.20.1510051157450.16263@noc1.cksoft.de> <2148690.gx9M0ZzrG1@ralph.baldwin.cx> <alpine.BSF.2.20.1510070844030.16263@noc1.cksoft.de> <3563189.eDHDcCgW5L@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi John,

On Wed, 7 Oct 2015, John Baldwin wrote:
>>    mtx_lock = 1444181401}
>
> Ok, so that is a destroyed mutex.  This means it is probably not Giant, and
> it might be some mutex in smb_iod_main() that shows up in smb_iod_thread() due
> to inlining.
>
> Actually, we know this from your earlier mail:
>
>                if (evp->ev_type & SMBIOD_EV_SYNC) {
>                        SMB_IOD_EVLOCK(iod);
>                        wakeup(evp);
>                        SMB_IOD_EVUNLOCK(iod);
>
> Line 624 is that SMB_IOD_EVUNLOCK().
>
> Hmm, does 'p *evp' work at frame 10?  If not, can you try building the
> devel/gdb port from a recent ports tree with the 'KGDB' option enabled and
> use 'kgdb710' instead of 'kgdb' to see if you can print out '*evp'?

kgdb hangs when chaning to frame10.  I will build the port later (svn ports checkout in progress)

I have cloned the VM so that I have this isolated from my production network.

>> (kgdb)
>> --snipp--
>>
>> I can build a GENERIC kernel with INVARIANTS enabled on the box to see if we get a better assertions next time this happens.
>
> That would be great, but please keep the existing core and kernel.  We might
> be able to figure this out from that still.
>
> Also, go ahead and put this patch in and let me know if you ever see the
> printf logged.  If you do, that could explain this panic (and we might need
> a more involved fix to avoid memory leaks).
>
> Index: smb_iod.c
> ===================================================================
> --- smb_iod.c   (revision 288952)
> +++ smb_iod.c   (working copy)
> @@ -624,6 +624,13 @@
>                        SMB_IOD_EVUNLOCK(iod);
>                } else
>                        free(evp, M_SMBIOD);
> +               if (iod->iod_flags & SMBIOD_SHUTDOWN) {
> +                       if (!STAILQ_EMPTY(&iod->iod_evlist))
> +                               printf("%s: shutdown with pending events\n",
> +                                   __func__);
> +                       }
> +                       return;
> +               }
>        }
> #if 0
>        if (iod->iod_state == SMBIOD_ST_VCACTIVE) {

The vm is now runnning lates 10-stable kernel with above patch and invariants enabled.

Give it about 2 days to produce the next crash.

Greetings
Christian

-- 
Christian Kratzer                   CK Software GmbH
Email:   ck@cksoft.de               Wildberger Weg 24/2
Phone:   +49 7032 893 997 - 0       D-71126 Gaeufelden
Fax:     +49 7032 893 997 - 9       HRB 245288, Amtsgericht Stuttgart
Mobile:  +49 171 1947 843           Geschaeftsfuehrer: Christian Kratzer
Web:     http://www.cksoft.de/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1510072256360.71292>