From owner-freebsd-questions@freebsd.org Sun Jun 3 19:03:53 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDB6DFEDE9E for ; Sun, 3 Jun 2018 19:03:52 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: from mail-qt0-x232.google.com (mail-qt0-x232.google.com [IPv6:2607:f8b0:400d:c0d::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7962B75D92 for ; Sun, 3 Jun 2018 19:03:52 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: by mail-qt0-x232.google.com with SMTP id h5-v6so30222556qtm.13 for ; Sun, 03 Jun 2018 12:03:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Bu8MPbuog9N5+OQLrysm9qDHH+pVzAJeMkP0HaEfqLg=; b=b7seuneDdK+Wxp+DvwoWDq04DkOS2y/4rbxtgEvIYcnLTdxsuvDRJAAvthHz772Gdj 8TkqR0JfTuIgQOShmlwA3maJp2viMjDzWV8rZS+1oYTeW/qr/0I3fEOcQI9lJg/62pfy BDXZmEs7yZgpLMWBAt4oX5ZdMPBua/jOx+ZAYwv1JhR0kXEWyWDo68VOivpWwzs8GPpy 2q1H0/HIAIuNdOf9PFSgNncp4iK9e1J6VRlM+O2z0nhK2mwYtsmkVSW323pq98yd79SC Q3PaGCF0Mm6bPN3Eo0L5VPljFw+HeBXTFHY4IaNCnHOgkflebDg8lLjpB7PUr23Nw+FW E8eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Bu8MPbuog9N5+OQLrysm9qDHH+pVzAJeMkP0HaEfqLg=; b=HgovfCm7PVq7vSSLQJdP6/HVkiP5HHIAz7HNfQumzV8/+vLrnm4BupA251SgMaYvER L1cCB/eiCrLxSHWciVn03rCyWR8XKr+XFOOCaR+N1mvtU+6zgplSEz6mg9EsVR4+WQzA +Mt3Bm7VD6crYWGZNAC6DrSLi1mvql2S/tme52tx1G6GVTTC/PF7ZKf2RtwTgrRsHb3O nUDbWxF+bCgDZM3zdiKi8h3y0fn9J6IHPGEI/yk+14HVceg+85QkDRdS/w87bXpyYhkI DfK0pItaUDji2Wznnx1eIoVbTRW6xsWU6NdCftqlxSxrfnUe9REGXSMnzN2+lsfIHhiR gKxA== X-Gm-Message-State: APt69E1MRgbPfb+yNrmbX4K5UqvGfErqC6lFFIUJ3pV2UuOgQVh+qRjt R8LdCkv+cW63pNdO+z36wMeGskJSBYuBwO7m2DQ= X-Google-Smtp-Source: ADUXVKIUapZJyNvEeef5Q6nrSX6ZY3x2ze4I+KSsMHxDfOg3iS+ND1tnBqc/i+sNwi1V4GONv2/uVZxmNbm2XYa4hi0= X-Received: by 2002:ac8:686:: with SMTP id f6-v6mr18870469qth.348.1528052631794; Sun, 03 Jun 2018 12:03:51 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:f043:0:0:0:0:0 with HTTP; Sun, 3 Jun 2018 12:03:31 -0700 (PDT) In-Reply-To: References: <9a7f62c4-80aa-7eea-91ec-6712612a0451@pobox.com> From: Michael Schuster Date: Sun, 3 Jun 2018 21:03:31 +0200 Message-ID: Subject: Re: Unable to kill processes using either Ctrl-C or 'kill' To: Duane Whitty Cc: freeBSD Mailing List Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 19:03:53 -0000 On Sun, Jun 3, 2018 at 8:47 PM, Duane Whitty wrote: > On Sun, Jun 3, 2018 at 1:20 PM, James E Keenan wrote: > > > On a FreeBSD-11 host, I am unable to kill processes using either Ctrl-C > or > > 'kill'. > > > > 1. The problem first became manifest when I was attempting to use Vagrant > > to download a Vagrant box from vagrantup.com. The box in question was > a > > VirtualBox called 'generic/freebsd11'. I have successfully downloaded, > > installed and used this box several times already, so I anticipated no > > problems. > > > > ##### > > $ vagrant init generic/freebsd11 > > $ vagrant up --provision | tee vagrant-up-provision.log.20180603100900 > > Bringing machine 'default' up with 'virtualbox' provider... > > ==> default: Checking if box 'generic/freebsd11' is up to date... > > ==> default: Clearing any previously set forwarded ports... > > ==> default: Fixed port collision for 22 => 2222. Now on port 2202. > > ==> default: Clearing any previously set network interfaces... > > ==> default: Preparing network interfaces based on configuration... > > default: Adapter 1: nat > > ==> default: Forwarding ports... > > default: 22 (guest) => 2202 (host) (adapter 1) > > ==> default: Running 'pre-boot' VM customizations... > > ==> default: Booting VM... > > ==> default: Waiting for machine to boot. This may take a few minutes... > > default: SSH address: 127.0.0.1:2202 > > default: SSH username: vagrant > > default: SSH auth method: private key > > ##### > > > > Based on recent experience, I would have expected the "few minutes" to be > > 1 or 2 minutes at most and possibly be accompanied by "retrying" methods. > > > > However, at this point, the screen hung indefinitely. I tried Ctrl-C; > > that command was printed in my terminal but otherwise nothing happened. > > > > 2. I ssh-ed to the host in a fresh terminal and called > > > > ##### > > tail -f vagrant-up-provision.log.20180603100900 > > ##### > > > > That command displayed the output posted above and hung at the same > > point. This process also could not be killed by Ctrl-C. > > > > 3. I then ssh-ed to the host in a third terminal, called 'ps aux', and > > then tried to kill suspect processes with 'kill -9 '. Those > processes > > were not, in fact, killed; their status was changed to 'T' -- "Marks a > > stopped process" according to 'man ps'. Some excerpts from 'ps auxwww': > > > > ##### > > vmuser 7169 0.0 0.1 81356 4444 0 T+ 14:09 0:01.99 > > /usr/local/bin/ruby24 /usr/local/bin/vagrant up --provision > > ... > > jkeenan 67787 0.0 0.0 6296 0 1 WW+ - 0:00.00 > > tail -f /home/vmuser/vagrant-images/generic-freebsd11-201806030939/ > > vagrant-up-provision.log.20180603100900 > > ... > > jkeenan 74119 0.0 0.0 7064 0 2 WW+ - 0:00.00 > > /bin/sh /usr/bin/man ps > > ##### > > > > 4. I have now opened quite a few connections to the host. If I issue a > > command there such as 'man ps' or 'less' that entails paging, I can page > > through the output, but the process does not close by itself and does not > > respond to Ctrl-C. If I then try to kill that process from another > > terminal, the best that happens is that its status gets changed to 'WW+' > -- > > "Marks an idle interrupt thread" and "The process is swapped out". > > > > Internet searches turn up links like this one, > > https://forums.freebsd.org/threads/cant-kill-process-in-the- > > stop-state.56319/, that suggest that there are certain processes that do > > not respond to 'kill' signals. That seems to be what's happening here. > > > > Can anyone suggest the cause of the problem? > > > > Short of requesting that the sysadmin shut down and reboot the system, is > > there anyway for a non-root user to solve this problem? > > > > Thank you very much. > > Jim Keenan > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to "freebsd-questions-unsubscribe > > @freebsd.org" > > > > > Can you get added to sudoers? I realize that still implies a level of root > access but I really don't know of any other way to kill processes which > don't belong to you. I don't see why the sysadmin would need to reboot. > most likely, being root or equivalent won't help in this case. If a processes owner cannot kill it (using -9, which cannot be caught) that implies that the process is hung in the kernel (signal delivery happens when a process leaves kernel context). regards Michael -- Michael Schuster http://recursiveramblings.wordpress.com/ recursion, n: see 'recursion'