From owner-freebsd-net@FreeBSD.ORG Tue Feb 17 17:58:59 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7A97DF9 for ; Tue, 17 Feb 2015 17:58:59 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ABC9D9D1 for ; Tue, 17 Feb 2015 17:58:59 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [127.0.1.5]) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9) with ESMTP id t1HHwxnT012639 for ; Tue, 17 Feb 2015 17:58:59 GMT (envelope-from root@phabric-backend.isc.freebsd.org) Received: (from root@localhost) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9/Submit) id t1HHwxlo012638; Tue, 17 Feb 2015 17:58:59 GMT (envelope-from root) Date: Tue, 17 Feb 2015 17:58:59 +0000 To: freebsd-net@freebsd.org From: "hiren (hiren panchasara)" Subject: [Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests). Message-ID: <3cda038b82b597dca5eb5409987900c6@localhost.localdomain> X-Priority: 3 Thread-Topic: D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate the callout code (and potentially for use by other tests). X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: In-Reply-To: References: Thread-Index: Y2JjMTcyODJkYzgxM2NkZDFjY2RhOGRmMTlkIFTjgWM= X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 17:59:00 -0000 hiren added a comment. >>! In D1711#91, @rrs wrote: > Hiren: > > Thats helpful.. as I said this is strange. The callout you posted shows its associated with CPU 0, (c_cpu == 0), and yet > the mtx on that (which is what we are spinning on) is free (its owned == 4). So why would we have crashed > holding the spin lock too long? Unless just as we decided to panic the owner released it. Hmm there is > code in there to check that though.. td = mtx_owner() if (td == NULL) return... > > The c_flags = 22 which is PENDING/ACTIVE and Return unlocked. That means it is *supposed* to be on the > callout wheel someplace. The linked list used is then the LLIST.. i.e. {le_next = 0x0, le_prev = 0xfffffe0000804db8} > > Now if le_next is 0, its the end of the list. > > Can you look back a the previous.. i.e. walk it back > > print *(struct callout *)0xfffffe0000804db8 > > That should print a valid callout as well.. and we should be able to walk back to > the top of the wheel.. by keeping on moving back. Hrm, are there only 2 entries here? (kgdb) print *(struct callout *)0xfffffe0000804db8 $4 = {c_links = {le = {le_next = 0xfffff8000d81dc98, le_prev = 0x0}, sle = {sle_next = 0xfffff8000d81dc98}, tqe = {tqe_next = 0xfffff8000d81dc98, tqe_prev = 0x0}}, c_time = 0, c_precision = 0, c_arg = 0x0, c_func = 0, c_lock = 0x0, c_flags = 0, c_cpu = 0} le_next is back to 0xfffff8000d81dc98. Anything else I should look at? REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, sbruno, imp, adrian, hselasky Cc: julian, hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net