Date: Mon, 19 Aug 2002 09:30:04 -0700 (PDT) From: Maksim Yevmenkin <m_evmenkin@yahoo.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/41784: vmware2 causes panic on recent -current Message-ID: <200208191630.g7JGU4u9071886@www.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 41784 >Category: ports >Synopsis: vmware2 causes panic on recent -current >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 19 09:40:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Maksim Yevmenkin >Release: 5.0-CURRENT FreeBSD >Organization: >Environment: FreeBSD beetle.digisle.com 5.0-CURRENT FreeBSD 5.0-CURRENT #32: Fri Aug 16 16:16:01 PDT 2002 max@beetle.digisle.com:/usr/src/sys/i386/compile/BEETLE i386 >Description: The emulators/vmware2 port does not work on -current. The system panics with the following trace. GNU gdb 5.2.0 (FreeBSD) 20020627 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-undermydesk-freebsd"... panic: bremfree: bp 0xc5536e30 not locked panic messages: --- panic: mutex vm page queue mutex not owned at ../../../vm/vm_page.c:1275 syncing disks... panic: bremfree: bp 0xc5536e30 not locked Uptime: 1m18s pfs_vncache_unload(): 5 entries remaining /dev/vmmon: Module vmmon: unloaded Dumping 191 MB ata0: resetting devices .. done 16 32[CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] 48[CTRL-C to abort] [CTRL-C to abort] [CTRL-C to abort] 64 80 96 112 128 144 160 176 --- #0 doadump () at ../../../kern/kern_shutdown.c:213 213 dumping++; (kgdb) bt #0 doadump () at ../../../kern/kern_shutdown.c:213 #1 0xc01934ed in boot (howto=260) at ../../../kern/kern_shutdown.c:345 #2 0xc0193718 in panic () at ../../../kern/kern_shutdown.c:493 #3 0xc01d41a7 in bremfree (bp=0xc02ea5e5) at ../../../kern/vfs_bio.c:633 #4 0xc02666f7 in ffs_fsync (ap=0xcaf4d81c) at ../../../ufs/ffs/ffs_vnops.c:213 #5 0xc0265d17 in ffs_sync (mp=0xc1812400, waitfor=2, cred=0xc0d70f00, td=0xc0312f00) at vnode_if.h:545 #6 0xc01e6ab8 in sync (td=0xc0312f00, uap=0x0) at ../../../kern/vfs_syscalls.c:129 #7 0xc019310c in boot (howto=256) at ../../../kern/kern_shutdown.c:254 #8 0xc0193718 in panic () at ../../../kern/kern_shutdown.c:493 #9 0xc0189ffc in _mtx_assert (m=0xc02e2388, what=0, file=0xc187bb40 "ю*╓аЬ*╓а", line=256) at ../../../kern/kern_mutex.c:800 #10 0xc02839e0 in vm_page_wire (m=0xc02e2388) at ../../../vm/vm_page.c:1275 #11 0xc182b79b in ?? () #12 0xc182b978 in ?? () #13 0xc182a374 in ?? () #14 0xc182b226 in ?? () #15 0xc0167a72 in spec_ioctl (ap=0xc02e2388) at ../../../fs/specfs/spec_vnops.c:322 #16 0xc0167658 in spec_vnoperate (ap=0x0) at ../../../fs/specfs/spec_vnops.c:124 #17 0xc02729b8 in ufs_vnoperatespec (ap=0x0) at ../../../ufs/ufs/ufs_vnops.c:2788 #18 0xc01ee5c1 in vn_ioctl (fp=0x100, com=3246897984, data=0xcaf4dc14, td=0xc187bb40) at vnode_if.h:437 #19 0xc01b5f0c in ioctl (td=0xc187bb40, uap=0xcaf4dd10) at file.h:222 #20 0xc182ca5c in ?? () #21 0xc191bfba in ?? () #22 0xc02b9d41 in syscall (frame= {tf_fs = 47, tf_es = 47, tf_ds = 47, tf_edi = 136771792, tf_esi = 0, tf_eb p = -1077937624, tf_isp = -889922188, tf_ebx = 10, tf_edx = 681095168, tf_ecx = 207, tf_eax = 54, tf_trapno = 12, tf_err = 2, tf_eip = 675667748, tf_cs = 31, tf _eflags = 12946, tf_esp = -1077938716, tf_ss = 47}) at ../../../i386/i386/trap.c:1050 #23 0xc02aa78d in Xint0x80_syscall () at {standard input}:140 ---Can't read userspace from dump, or kernel process--- >How-To-Repeat: Install emulators/vmware2 port and try to run it. The system will panic as soon as virtual machine is powered on. >Fix: The following patch for vmware2/work/vmware-distrib/vmmon-only/freebsd/hostif.c fixes problem for me. I not an expert in FreeBSDn VM, so i'm not sure about GIANT_REQUIRED part. --- hostif.c.1 Sun Aug 18 10:06:38 2002 +++ hostif.c Sun Aug 18 10:29:08 2002 @@ -110,12 +110,18 @@ paddr = (vm_offset_t)addr; m = PHYS_TO_VM_PAGE(paddr); +#if __FreeBSD_version >= 500038 + vm_page_lock_queues(); +#endif #if __FreeBSD_version >= 500021 GIANT_REQUIRED; #elif __FreeBSD_version >= 500013 mtx_lock(&vm_mtx); #endif vm_page_wire(m); +#if __FreeBSD_version >= 500038 + vm_page_unlock_queues(); +#endif #if __FreeBSD_version >= 500021 #elif __FreeBSD_version >= 500013 mtx_unlock(&vm_mtx); @@ -132,12 +138,18 @@ paddr = (vm_offset_t)addr; m = PHYS_TO_VM_PAGE(paddr); +#if __FreeBSD_version >= 500038 + vm_page_lock_queues(); +#endif #if __FreeBSD_version >= 500021 GIANT_REQUIRED; #elif __FreeBSD_version >= 500013 mtx_lock(&vm_mtx); #endif vm_page_unwire(m, 1); +#if __FreeBSD_version >= 500038 + vm_page_unlock_queues(); +#endif #if __FreeBSD_version >= 500021 #elif __FreeBSD_version >= 500013 mtx_unlock(&vm_mtx); @@ -1087,6 +1099,9 @@ return NULL; } paddr = vtophys(addr); +#if __FreeBSD_version >= 500038 + vm_page_lock_queues(); +#endif #if __FreeBSD_version >= 500021 GIANT_REQUIRED; #elif __FreeBSD_version >= 500013 @@ -1096,6 +1111,9 @@ ka->map = PHYS_TO_VM_PAGE(paddr); vm_page_wire(ka->map); pmap_kenter(ka->kaddr, paddr); +#if __FreeBSD_version >= 500038 + vm_page_unlock_queues(); +#endif #if __FreeBSD_version >= 500021 #elif __FreeBSD_version >= 500013 mtx_unlock(&vm_mtx); @@ -1109,6 +1127,9 @@ if (ka->map==NULL) return 0; +#if __FreeBSD_version >= 500038 + vm_page_lock_queues(); +#endif #if __FreeBSD_version >= 500021 GIANT_REQUIRED; #elif __FreeBSD_version >= 500013 @@ -1117,6 +1138,9 @@ vm_page_unwire(ka->map, 1); pmap_kremove(ka->kaddr); kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); +#if __FreeBSD_version >= 500038 + vm_page_unlock_queues(); +#endif #if __FreeBSD_version >= 500021 #elif __FreeBSD_version >= 500013 mtx_unlock(&vm_mtx); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208191630.g7JGU4u9071886>