Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VagrantPlaybookCheck machine has lots of leftover processes #2314

Closed
sxa opened this issue Sep 14, 2021 · 2 comments
Closed

VagrantPlaybookCheck machine has lots of leftover processes #2314

sxa opened this issue Sep 14, 2021 · 2 comments
Assignees

Comments

@sxa
Copy link
Member

sxa commented Sep 14, 2021

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                  
17374 vagrant3  20   0 4156428 2.641g 2.600g S   1.3  8.5   1780:30 VBoxHeadless                             
20466 vagrant4  20   0 3933688 2.556g 2.517g S   3.0  8.2   2783:18 VBoxHeadless                             
20112 vagrant2  20   0 3933688 2.550g 2.513g S   3.0  8.2   6917:38 VBoxHeadless                             
 8475 vagrant3  20   0 3933688 2.550g 2.513g S   3.0  8.2   7064:02 VBoxHeadless                             
17128 vagrant1  20   0 2720268 1.399g 1.360g S   1.3  4.5 236:11.86 VBoxHeadless                             
 4764 vagrant1  20   0 2723852 1.337g 1.298g S   1.6  4.3 249:06.73 VBoxHeadless         

There are also large numbers of VBoxSVC and VBoxNetDHCP processes on the machine at the moment:

root@infra-ibmcloud-vagrant-x64:~# ps -ef | grep -i vboxheadless
vagrant1  4764  4057  1 Sep02 ?        04:09:07 /usr/lib/virtualbox/VBoxHeadless --comment ansible_adoptopenjdkU20_1630581706988_49312 --startvm c541a720-fef0-4f2b-8cce-aecd00cf6461 --vrde config
vagrant3  8475  6711  3 Apr13 ?        4-21:44:03 /usr/lib/virtualbox/VBoxHeadless --comment ansible_adoptopenjdkSol10_1618313824967_7624 --startvm 3043a5f2-7845-44f1-96bb-687227435aef --vrde config
vagrant1 17128  4057  1 Sep02 ?        03:56:12 /usr/lib/virtualbox/VBoxHeadless --comment ansible_adoptopenjdkU20_1630596096683_38909 --startvm c15f69a4-814a-49c2-ab93-3175ad624b9a --vrde config
vagrant3 17374  6711  1 Jul02 ?        1-05:40:31 /usr/lib/virtualbox/VBoxHeadless --comment ansible_adoptopenjdkC7_1625230132007_11414 --startvm 4ed9dddb-e40e-482b-8b94-1885af4f8c9d --vrde config
vagrant2 20112 19432  3 Apr15 ?        4-19:17:40 /usr/lib/virtualbox/VBoxHeadless --comment ansible_adoptopenjdkSol10_1618479598684_62917 --startvm c62cda4e-7a26-43dc-a2de-3b54d2ba93e3 --vrde config
vagrant4 20466 19700  2 Jul06 ?        1-22:23:19 /usr/lib/virtualbox/VBoxHeadless --comment ansible_adoptopenjdkSol10_1625593467769_74471 --startvm 9f6611c5-ea39-48b4-984e-c5246466d991 --vrde config
root     31452 29983  0 06:16 pts/0    00:00:00 grep --color=auto -i vboxheadless
root@infra-ibmcloud-vagrant-x64:~# ps -ef | grep VBoxSVC | wc -l
171
root@infra-ibmcloud-vagrant-x64:~# ps -ef | grep VBoxNetDHCP | wc -l
300
root@infra-ibmcloud-vagrant-x64:~# 
  • Please put the system name in the title of this issue.

  • Link to any log file showing the problem:

  • Please describe the issue:

@sxa sxa added the systemdown label Sep 14, 2021
@sxa sxa self-assigned this Sep 14, 2021
@sxa
Copy link
Member Author

sxa commented Sep 23, 2021

If a combination of vagrant global-status and vagrant-halt in each VMs directory fails to clear up everything, this sequence of operations should remove most of them
vboxmanage list vms | cut -d\" -f2 | while read BOX; do VBoxManage controlvm $BOX poweroff; vboxmanage unregistervm --delete $BOX; done.
Once that is complete (May require -KILL) then the remaining processes can be terminated with ps -ef | egrep VBoxSVC\|VBoxNetDHCP | awk '{print$2}' | xargs kill

@sxa sxa closed this as completed Sep 23, 2021
@sxa
Copy link
Member Author

sxa commented Oct 8, 2021

Machine was leaking network interfaces and got up to vboxnet127

20:38:45 ==> adoptopenjdkC6: Clearing any previously set network interfaces...

20:38:50 There was an error while executing `VBoxManage`, a CLI used by Vagrant
20:38:50 for controlling VirtualBox. The command and stderr is shown below.
20:38:50 
20:38:50 Command: ["hostonlyif", "create"]
20:38:50 
20:38:50 Stderr: 0%...
20:38:50 Progress state: NS_ERROR_FAILURE
20:38:50 VBoxManage: error: Failed to create the host-only adapter
20:38:50 VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: VBoxNetAdpCtl: ioctl failed for /dev/vboxnetctl: Cannot allocate memory
20:38:50 VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
20:38:50 VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 94 of file VBoxManageHostonly.cpp

20:38:51 Build step 'Execute shell' marked build as failure

20:39:18 Finished: FAILURE

Fixed with for A in $(seq 1 127); do VBoxManage hostonlyif remove vboxnet$A; done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant