From owner-freebsd-hackers@freebsd.org Sun May 28 08:11:14 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B947ED859F1 for ; Sun, 28 May 2017 08:11:14 +0000 (UTC) (envelope-from joel.bertrand@systella.fr) Received: from rayleigh.systella.fr (rayleigh.systella.fr [213.41.150.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "rayleigh.systella.fr", Issuer "rayleigh.systella.fr" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BF7318C9 for ; Sun, 28 May 2017 08:11:14 +0000 (UTC) (envelope-from joel.bertrand@systella.fr) Received: from [192.168.10.20] ([192.168.10.20]) (authenticated bits=0) by rayleigh.systella.fr (8.15.2/8.15.2/Debian-8) with ESMTPSA id v4S8AlhA002026 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sun, 28 May 2017 10:10:52 +0200 Subject: Deadlock in pkg_jobs_update_universe_item_priority was Re: Issue with pkg upgrade on diskless workstation To: freebsd-hackers@freebsd.org, pkgsrc-users@NetBSD.org References: <20170514082046.GA15092@lonesome.com> From: =?UTF-8?Q?BERTRAND_Jo=c3=abl?= Message-ID: <6c18a445-93c6-8a65-cc0c-eedbef3eabc1@systella.fr> Date: Sun, 28 May 2017 10:10:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.99.2 at rayleigh X-Virus-Status: Clean X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 08:11:14 -0000 Hello, Deadlock I have seen is not related to NFS locks. I have added some debug traces in libpkg and I have seen that pkg enters in deadlock in pkg_jobs_update_universe_item_priority() function. More precisely, a loop doesn't end : line 712 of pkg_jobs_universe.c while (rdeps_func(it->pkg, &d) == EPKG_OK) { HASH_FIND_STR(universe->items, d->uid, found); if (found == NULL) { continue; } LL_FOREACH(found, cur) { ... } } Best regards, JKB