From owner-freebsd-stable@freebsd.org Fri Dec 22 09:26:19 2017 Return-Path: Delivered-To: freebsd-stable@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 85981E8B6F8 for ; Fri, 22 Dec 2017 09:26:19 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay01.pair.com (relay01.pair.com [209.68.5.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60D666F1F5 for ; Fri, 22 Dec 2017 09:26:18 +0000 (UTC) (envelope-from pho@holm.cc) Received: from x2.osted.lan (87-58-223-204-dynamic.dk.customer.tdc.net [87.58.223.204]) by relay01.pair.com (Postfix) with ESMTP id 18477D008F8; Fri, 22 Dec 2017 04:26:11 -0500 (EST) Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.9/8.14.9) with ESMTP id vBM9Q8tB035566 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 22 Dec 2017 10:26:08 +0100 (CET) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.9/8.14.9/Submit) id vBM9Q7vR035565; Fri, 22 Dec 2017 10:26:07 +0100 (CET) (envelope-from pho) Date: Fri, 22 Dec 2017 10:26:07 +0100 From: Peter Holm To: Konstantin Belousov Cc: Peter Jeremy , freebsd-stable@freebsd.org Subject: Re: Unkillable process in "vm map (user)" Message-ID: <20171222092607.GA35523@x2.osted.lan> References: <20171210200931.GS23931@server.rulingia.com> <20171210204217.GC2272@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171210204217.GC2272@kib.kiev.ua> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2017 09:26:19 -0000 On Sun, Dec 10, 2017 at 10:42:17PM +0200, Konstantin Belousov wrote: > On Mon, Dec 11, 2017 at 07:09:31AM +1100, Peter Jeremy wrote: > > I was experimenting with ports/devel/libmill (which is a library that > > provides Go-styly functionality for C programs) and managed to create > > an unkillable process by spawning 1000000 "goroutines" (think very > > cheap "thread" or "coroutine") joined by "channels" (think message > > passing pipes). (The program ran basically instantaneously with 10000 > > or 100000 "goroutines", and the Go version has no problems with 1000000 > > goroutines on a much smaller system). > > > > According to SIGINFO, it's blocked on "vm map (user)" but I can't kill > > it. Can anyone suggest a way to unwedge it? > > > > This is on a system running FreeBSD/amd64 11.1-STABLE r324494. > Ensure that you use at least r326188. > > > > > server% procstat -kk 452 > > PID TID COMM TDNAME KSTACK > > 452 102382 chain - mi_switch+0x17c sleepq_switch+0x118 sleepq_wait+0x43 _sx_slock_hard+0x34e _sx_slock+0xd4 vm_map_lookup+0xbd vm_fault_hold+0x194b vm_fault+0x75 trap_pfault+0x107 trap+0x382 calltrap+0x8 > > There is another thread owning the map lock, and seeing what that thread > does is the next step. > > Can you provide a binary to reproduce which does not depend on any > library except the base libs ? Here's some more info, using the original scenario: https://people.freebsd.org/~pho/stress/log/kostik1070.txt - Peter