From owner-freebsd-current@freebsd.org Mon Nov 11 12:24:02 2019 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36DD41B4574; Mon, 11 Nov 2019 12:24:02 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47BVRP2wYKz46ps; Mon, 11 Nov 2019 12:24:00 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B84122602EF; Mon, 11 Nov 2019 13:23:52 +0100 (CET) Subject: Re: unkillable process consuming 100% cpu From: Hans Petter Selasky To: sgk@troutmask.apl.washington.edu, Mark Johnston Cc: freebsd-current@freebsd.org, freebsd-x11@freebsd.org References: <20191107202919.GA4565@troutmask.apl.washington.edu> <20191107203223.GF16978@raichu> <20191108220935.GA856@troutmask.apl.washington.edu> <6a4e5993-623a-ebaa-8180-e11c7d48e706@selasky.org> <3e11232b-e2a6-9169-adb0-da0e94523b39@selasky.org> Message-ID: <64e980fa-aa9b-e656-92a1-110d9cbf9059@selasky.org> Date: Mon, 11 Nov 2019 13:22:09 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <3e11232b-e2a6-9169-adb0-da0e94523b39@selasky.org> Content-Type: multipart/mixed; boundary="------------6EF61D4E1FC5F777863650FE" Content-Language: en-US X-Rspamd-Queue-Id: 47BVRP2wYKz46ps X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-4.92 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; HAS_ATTACHMENT(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; DMARC_NA(0.00)[selasky.org]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; IP_SCORE(-2.62)[ip: (-9.16), ipnet: 2a01:4f8::/29(-2.26), asn: 24940(-1.65), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Nov 2019 12:24:02 -0000 This is a multi-part message in MIME format. --------------6EF61D4E1FC5F777863650FE Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 2019-11-11 11:44, Hans Petter Selasky wrote: > Seems like we can optimise away one more write memory barrier. > > If you are building from ports, simply: > > cd work/kms-drm* > cat seqlock.diff | patch -p1 > Hi, Here is one more debug patch you can try. See if you get that print added in the patch in dmesg. --HPS --------------6EF61D4E1FC5F777863650FE Content-Type: text/x-patch; charset=UTF-8; name="kdb.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdb.diff" diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index a6e0a16ae..0697d70f4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c @@ -31,6 +31,8 @@ #include "amdgpu_vm.h" #include "amdgpu_amdkfd.h" +#include + /* Special VM and GART address alignment needed for VI pre-Fiji due to * a HW bug. */ @@ -236,6 +238,12 @@ static int amdgpu_amdkfd_remove_eviction_fence(struct amdgpu_bo *bo, *ef_count = 0; } + if (resv != NULL && + (struct thread *)SX_OWNER(resv->lock.base.sx.sx_lock) != curthread) { + printf("Called unlocked\n"); + kdb_backtrace(); + } + old = reservation_object_get_list(resv); if (!old) return 0; --------------6EF61D4E1FC5F777863650FE--