From owner-freebsd-stable@freebsd.org Sun Dec 10 20:42:28 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 1AD68E9B5E7 for ; Sun, 10 Dec 2017 20:42:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 A60A726BB for ; Sun, 10 Dec 2017 20:42:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id vBAKgJd1034029 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 10 Dec 2017 22:42:22 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua vBAKgJd1034029 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id vBAKgHhS034028; Sun, 10 Dec 2017 22:42:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 10 Dec 2017 22:42:17 +0200 From: Konstantin Belousov To: Peter Jeremy Cc: freebsd-stable@freebsd.org Subject: Re: Unkillable process in "vm map (user)" Message-ID: <20171210204217.GC2272@kib.kiev.ua> References: <20171210200931.GS23931@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171210200931.GS23931@server.rulingia.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home 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: Sun, 10 Dec 2017 20:42:28 -0000 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 ?