From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Aug 18 23:00:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E23B4DB7 for ; Sun, 18 Aug 2013 23:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C0B9121E4 for ; Sun, 18 Aug 2013 23:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7IN01OZ037446 for ; Sun, 18 Aug 2013 23:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7IN01IN037445; Sun, 18 Aug 2013 23:00:01 GMT (envelope-from gnats) Resent-Date: Sun, 18 Aug 2013 23:00:01 GMT Resent-Message-Id: <201308182300.r7IN01IN037445@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, AN 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 F4061CCA for ; Sun, 18 Aug 2013 22:52:01 +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 E104121AA for ; Sun, 18 Aug 2013 22:52:01 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7IMq1B7048996 for ; Sun, 18 Aug 2013 22:52:01 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7IMq0X8048945; Sun, 18 Aug 2013 22:52:00 GMT (envelope-from nobody) Message-Id: <201308182252.r7IMq0X8048945@oldred.freebsd.org> Date: Sun, 18 Aug 2013 22:52:00 GMT From: AN To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/181387: CURRENT crashes with nvidia GPU BLOB : vm_radix_insert: key 23c078 is already present X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 23:00:02 -0000 >Number: 181387 >Category: ports >Synopsis: CURRENT crashes with nvidia GPU BLOB : vm_radix_insert: key 23c078 is already present >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 18 23:00:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: AN >Release: 10-current >Organization: >Environment: FreeBSD FBSD10 10.0-CURRENT FreeBSD 10.0-CURRENT #79 r254497: Sun Aug 18 15:52:31 CDT 2013 root@FBSD10:/usr/obj/usr/src/sys/MYKERNEL amd64 nvidia-driver-319.32 NVidia graphics card binary drivers for hardware OpenGL rendering >Description: complete deadlock and reboot on starting X (startx from command line) --------------------------------------------------------------------------------- Yes, I can confirm, that it builds, installs and runs fine for me. The patch should be placed as x11/nvidia-driver/files/patch-src__nvidia_subr.c, shoudn't it? Many thanks for this work. Regards and a nice weekend, Rainer Hurling --------------------------------------------------------------------------------- I also confirm the patch works on current at r254497 (AN). >How-To-Repeat: startx >Fix: Patch written by: Gary Jennejohn I am only submitting the patch as a PR. http://docs.freebsd.org/cgi/getmsg.cgi?fetch=989426+0+archive/2013/freebsd-current/20130811.freebsd-current http://docs.freebsd.org/cgi/getmsg.cgi?fetch=978445+0+archive/2013/freebsd-current/20130811.freebsd-current The REINPLACE_CMD at line 160 of nvidia-driver/Makefile is incorrect. How do I know that? Because I made a patch which results in a working nvidia-driver-319.32 with r254050. That's what I'm running right now. Here's the patch (loaded with :r in vi, so all spaces etc. are correct): --- src/nvidia_subr.c.orig 2013-08-09 11:32:26.000000000 +0200 +++ src/nvidia_subr.c 2013-08-09 11:33:23.000000000 +0200 @@ -945,7 +945,7 @@ return ENOMEM; } - address = kmem_alloc_contig(kernel_map, size, flags, 0, + address = kmem_alloc_contig(kmem_arena, size, flags, 0, sc->dma_mask, PAGE_SIZE, 0, attr); if (!address) { status = ENOMEM; @@ -994,7 +994,7 @@ os_flush_cpu_cache(); if (at->pte_array[0].virtual_address != NULL) { - kmem_free(kernel_map, + kmem_free(kmem_arena, at->pte_array[0].virtual_address, at->size); malloc_type_freed(M_NVIDIA, at->size); } @@ -1021,7 +1021,7 @@ if (at->attr != VM_MEMATTR_WRITE_BACK) os_flush_cpu_cache(); - kmem_free(kernel_map, at->pte_array[0].virtual_address, + kmem_free(kmem_arena, at->pte_array[0].virtual_address, at->size); malloc_type_freed(M_NVIDIA, at->size); @@ -1085,7 +1085,7 @@ } for (i = 0; i < count; i++) { - address = kmem_alloc_contig(kernel_map, PAGE_SIZE, flags, 0, + address = kmem_alloc_contig(kmem_arena, PAGE_SIZE, flags, 0, sc->dma_mask, PAGE_SIZE, 0, attr); if (!address) { status = ENOMEM; @@ -1139,7 +1139,7 @@ for (i = 0; i < count; i++) { if (at->pte_array[i].virtual_address == 0) break; - kmem_free(kernel_map, + kmem_free(kmem_arena, at->pte_array[i].virtual_address, PAGE_SIZE); malloc_type_freed(M_NVIDIA, PAGE_SIZE); } @@ -1169,7 +1169,7 @@ os_flush_cpu_cache(); for (i = 0; i < count; i++) { - kmem_free(kernel_map, + kmem_free(kmem_arena, at->pte_array[i].virtual_address, PAGE_SIZE); malloc_type_freed(M_NVIDIA, PAGE_SIZE); } Thanks to Gary for the fix. >Release-Note: >Audit-Trail: >Unformatted: