From nobody@FreeBSD.org  Thu Oct 31 19:17:19 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id D2A1E5B9
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 31 Oct 2013 19:17:19 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id B18FE2A46
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 31 Oct 2013 19:17:19 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9VJHI6N070912
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 31 Oct 2013 19:17:18 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9VJHISY070909;
	Thu, 31 Oct 2013 19:17:18 GMT
	(envelope-from nobody)
Message-Id: <201310311917.r9VJHISY070909@oldred.freebsd.org>
Date: Thu, 31 Oct 2013 19:17:18 GMT
From: "Matthew X. Economou" <xenophon+freebsd@irtnog.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: "panic: mutex CAM device lock not owned" booting FreeBSD-current (r257451) under Hyper-V
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183535
>Category:       kern
>Synopsis:       "panic: mutex CAM device lock not owned" booting FreeBSD-current (r257451) under Hyper-V
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 31 19:20:00 UTC 2013
>Closed-Date:    Thu Mar 06 13:22:49 UTC 2014
>Last-Modified:  Thu Mar 06 13:22:49 UTC 2014
>Originator:     Matthew X. Economou
>Release:        11.0-CURRENT
>Organization:
IRTNOG
>Environment:
FreeBSD 11.0-CURRENT #1 r257451: Thu Oct 31 11:41:36 EDT 2013
    root@cinip201bsddev.irtnog.net:/usr/obj/usr/src/sys/GENERIC amd64

>Description:
FreeBSD panics at boot time when it begins attaching the Hyper-V synthetic storage driver:

 storvsc0 on vmbus0
 panic: mutex CAM device lock not owned at /usr/src/sys/cam/cam_periph.c:1042
 cpuid = 0
 KDB: stack backtrace:
 db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00f7f7b6b0
 kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe00f7f7b760
 vpanic() at vpanic+0x126/frame 0xfffffe00f7f7b7a0
 panic() at panic+0x43/frame 0xfffffe00f7f7b800
 __mtx_assert() at __mtx_assert+0xc2/frame 0xfffffe00f7f7b810
 cam_periph_runccb() at cam_periph_runccb+0x49/frame 0xfffffe00f7f7b940
 storvsc_attach() at storvsc_attach+0x6d0/frame 0xfffffe00f7f7b9e0
 device_attach() at device_attach+0x3a2/frame 0xfffffe00f7f7ba40
 hv_vmbus_child_device_register() at hv_vmbus_child_device_register+0xba/frame 0xfffffe00f7f7bae0
 vmbus_channel_process_offer() at vmbus_channel_process_offer+0xec/frame 0xfffffe00f7f7bb10
 work_item_callback() at work_item_callback+0x2e/frame 0xfffffe00f7f7bb30
 taskqueue_run_locked() at taskqueue_run_locked+0xf0/frame 0xfffffe00f7f7bb80
 taskqueue_thread_loop() at taskqueue_thread_loop+0x9b/frame 0xfffffe00f7f7bbb0
 fork_exit() at fork_exit+0x84/frame 0xfffffe00f7f7bbf0
 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00f7f7bbf0
 --- trap 0, rip = 0, rsp = 0xfffffe00f7f7bcb0, rbp = 0 ---
 KDB: enter: panic
 [ thread pid 0 tid 100038 ]
 Stopped at      kdb_enter+0x3e: movq    $0,kdb_why

Switching to the ATA driver (hw.ata.disk_enable) results in the same panic:

 storvsc0 on vmbus0
 panic: mutex CAM device lock not owned at /usr/src/sys/cam/cam_periph.c:1042
 cpuid = 0
 KDB: stack backtrace:
 db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00f7fe06b0
 kdb_backtrace() at kdb_backtrace+0x39/frame 0xfffffe00f7fe0760
 vpanic() at vpanic+0x126/frame 0xfffffe00f7fe07a0
 panic() at panic+0x43/frame 0xfffffe00f7fe0800
 __mtx_assert() at __mtx_assert+0xc2/frame 0xfffffe00f7fe0810
 cam_periph_runccb() at cam_periph_runccb+0x49/frame 0xfffffe00f7fe0940
 storvsc_attach() at storvsc_attach+0x6d0/frame 0xfffffe00f7fe09e0
 device_attach() at device_attach+0x3a2/frame 0xfffffe00f7fe0a40
 hv_vmbus_child_device_register() at hv_vmbus_child_device_register+0xba/frame 0xfffffe00f7fe0ae0
 vmbus_channel_process_offer() at vmbus_channel_process_offer+0xec/frame 0xfffffe00f7fe0b10
 work_item_callback() at work_item_callback+0x2e/frame 0xfffffe00f7fe0b30
 taskqueue_run_locked() at taskqueue_run_locked+0xf0/frame 0xfffffe00f7fe0b80
 taskqueue_thread_loop() at taskqueue_thread_loop+0x9b/frame 0xfffffe00f7fe0bb0
 fork_exit() at fork_exit+0x84/frame 0xfffffe00f7fe0bf0
 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00f7fe0bf0
 --- trap 0, rip = 0, rsp = 0xfffffe00f7fe0cb0, rbp = 0 ---
 KDB: enter: panic
 [ thread pid 0 tid 100050 ]
 Stopped at      kdb_enter+0x3e: movq    $0,kdb_why

>How-To-Repeat:
See above.
>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mav 
State-Changed-When: четверг, 6 марта 2014 г. 13:21:47 (UTC) 
State-Changed-Why:  
Fix committed to FreeBSD head at r262789. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183535 
>Unformatted:
