From owner-freebsd-net@FreeBSD.ORG Tue Feb 17 18:07:19 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23342262 for ; Tue, 17 Feb 2015 18:07:19 +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 DA459AFC for ; Tue, 17 Feb 2015 18:07:18 +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 t1HI7Ijw021726 for ; Tue, 17 Feb 2015 18:07:18 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 t1HI7Ibs021725; Tue, 17 Feb 2015 18:07:18 GMT (envelope-from root) Date: Tue, 17 Feb 2015 18:07:18 +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: <605e6b6bb917b389bcc33d39c04388a3@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: Y2JjMTcyODJkYzgxM2NkZDFjY2RhOGRmMTlkIFTjg1Y= 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 18:07:19 -0000 hiren added a comment. >>! In D1711#92, @rrs wrote: > Hiren: > > There also should have been a printf before the panic string > printf( "spin lock %p (%s) held by %p (tid %d) too long\n", > m, m->lock_object.lo_name, td, td->td_tid); > > Can we see what that lovely printf has displayed? Ah, my bad for not providing that earlier here: spin lock 0xffffffff81364180 (callout) held by 0xfffff8000dc0e920 (tid 100111) too long panic: spin lock held too long Now, (kgdb) print *(struct callout *)0xffffffff81364180 $8 = {c_links = {le = {le_next = 0xffffffff80d03d28, le_prev = 0xb0000}, sle = {sle_next = 0xffffffff80d03d28}, tqe = {tqe_next = 0xffffffff80d03d28, tqe_prev = 0xb0000}}, c_time = 0, c_precision = 4, c_arg = 0x0, c_func = 0, c_lock = 0x0, c_flags = 0, c_cpu = 0} if I print it's le_next, that node's le_prev is not pointing to 0xffffffff81364180 (kgdb) print *(struct callout *)0xffffffff80d03d28 $9 = {c_links = {le = {le_next = 0x74756f6c6c6163, le_prev = 0x6f207265626d754e}, sle = {sle_next = 0x74756f6c6c6163}, tqe = {tqe_next = 0x74756f6c6c6163, tqe_prev = 0x6f207265626d754e}}, c_time = 7307497714779234406, c_precision = 7809632219779637363, c_arg = 0x61206c656568776c, c_func = 0x20657a697320646e, c_lock = 0x6f656d697420666f, c_flags = 690517109, c_cpu = 1701998624} Also, trying to print le_next or le_prev is not working: (kgdb) print *(struct callout *)0x6f207265626d754e Cannot access memory at address 0x6f207265626d754e (kgdb) print *(struct callout *)0x74756f6c6c6163 Cannot access memory at address 0x74756f6c6c6163 Is something wrong here or I am failing to understand this. (The latter has a higher probability) > > In theory the lo_name should be "callout" and the %p should point to &cc_cpu[0].cc_lock > > Can we validate that these align correctly too? How do I validate it? 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