{"action":"created","issue":{"url":"https://api.github.com/repos/mininet/mininet/issues/513","labels_url":"https://api.github.com/repos/mininet/mininet/issues/513/labels{/name}","comments_url":"https://api.github.com/repos/mininet/mininet/issues/513/comments","events_url":"https://api.github.com/repos/mininet/mininet/issues/513/events","html_url":"https://github.com/mininet/mininet/issues/513","id":71490492,"number":513,"title":"2.2.1 CPULimitedHost stopping bug","user":{"login":"JudsonWilson","id":4259626,"avatar_url":"https://avatars.githubusercontent.com/u/4259626?v=3","gravatar_id":"","url":"https://api.github.com/users/JudsonWilson","html_url":"https://github.com/JudsonWilson","followers_url":"https://api.github.com/users/JudsonWilson/followers","following_url":"https://api.github.com/users/JudsonWilson/following{/other_user}","gists_url":"https://api.github.com/users/JudsonWilson/gists{/gist_id}","starred_url":"https://api.github.com/users/JudsonWilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JudsonWilson/subscriptions","organizations_url":"https://api.github.com/users/JudsonWilson/orgs","repos_url":"https://api.github.com/users/JudsonWilson/repos","events_url":"https://api.github.com/users/JudsonWilson/events{/privacy}","received_events_url":"https://api.github.com/users/JudsonWilson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-28T06:06:15Z","updated_at":"2015-04-30T19:39:09Z","closed_at":null,"body":"Using version 2.2.1 release, when I attempt to use a CPULimitedHost, as follows:\r\n\r\n    net = Mininet(topo=topo, host=CPULimitedHost, link=TCLink)\r\n\r\nshutting down the net\r\n\r\n```python\r\n   net.stop()\r\n```\r\n\r\n produces the following error:\r\n\r\n```python\r\nh0 *** gave up after 3 retries\r\n--------------------------------------------------------------------------------\r\nCaught exception.  Cleaning up...\r\n--------------------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"buffersizing.py\", line 609, in <module>\r\n    main()\r\n  File \"buffersizing.py\", line 595, in main\r\n    net.stop()\r\n  File \"build/bdist.linux-x86_64/egg/mininet/net.py\", line 533, in stop\r\n    host.terminate()\r\n  File \"build/bdist.linux-x86_64/egg/mininet/node.py\", line 249, in terminate\r\n    self.cleanup()\r\n  File \"build/bdist.linux-x86_64/egg/mininet/node.py\", line 704, in cleanup\r\n    retry( retries=3, delaySecs=1, fn=self.cgroupDel )\r\n  File \"build/bdist.linux-x86_64/egg/mininet/util.py\", line 208, in retry\r\n    exit( 1 )\r\n  File \"/usr/lib/python2.7/site.py\", line 375, in __call__\r\n    raise SystemExit(code)\r\n```\r\n\r\nRemoving the CPULimtedHost option makes the problem go away."},"comment":{"url":"https://api.github.com/repos/mininet/mininet/issues/comments/97941110","html_url":"https://github.com/mininet/mininet/issues/513#issuecomment-97941110","issue_url":"https://api.github.com/repos/mininet/mininet/issues/513","id":97941110,"user":{"login":"lantz","id":744379,"avatar_url":"https://avatars.githubusercontent.com/u/744379?v=3","gravatar_id":"","url":"https://api.github.com/users/lantz","html_url":"https://github.com/lantz","followers_url":"https://api.github.com/users/lantz/followers","following_url":"https://api.github.com/users/lantz/following{/other_user}","gists_url":"https://api.github.com/users/lantz/gists{/gist_id}","starred_url":"https://api.github.com/users/lantz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lantz/subscriptions","organizations_url":"https://api.github.com/users/lantz/orgs","repos_url":"https://api.github.com/users/lantz/repos","events_url":"https://api.github.com/users/lantz/events{/privacy}","received_events_url":"https://api.github.com/users/lantz/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T19:39:09Z","updated_at":"2015-04-30T19:39:09Z","body":"A few comments - apologies for repeating myself!\r\n\r\n0. As noted, this probably isn't a problem with Mininet but with your environment. Try to reproduce it in the official Mininet 2.2.1 VM. I don't have an EC2 account at the moment unfortunately.\r\n1. `CPULimitedHost` isn't useful by itself unless you specify the `cpu` fraction.\r\n2. Make sure that `cgroups` is installed and working on your system (e.g. make sure that `/sys/fs/cgroup/{cpu,cpuacct...}` are all there and that the utilities are installed and working)\r\n3. You should run with `setLogLevel('debug')` (aka -v debug )and take a look at the commands and output to make sure that everything is operating as expected.\r\n4. You should make sure that `sudo mn --host cfs -v debug` works.\r\n4a. Since that doesn't do anything useful, you may wish to consider `sudo mn --host cfs,cpu=.2` instead.\r\n4b. You may wish to look at `mininet/mininet/test/test_hifi -v`\r\n5. Since you're a grad student, you will probably find it easy to figure out what is going wrong and fix it yourself! And share it with other people in your class and/or your TAs. ;-)\r\n"}}