Unkillable process in "vm map (user)"

Peter Holm peter at holm.cc
Fri Dec 22 09:26:19 UTC 2017


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


More information about the freebsd-stable mailing list