{"id":2717,"date":"2017-03-09T11:08:23","date_gmt":"2017-03-09T02:08:23","guid":{"rendered":"http:\/\/www.joewein.net\/blog\/?p=2717"},"modified":"2017-03-10T12:19:25","modified_gmt":"2017-03-10T03:19:25","slug":"jwhois-uses-100-of-cpu-on-centos","status":"publish","type":"post","link":"https:\/\/joewein.net\/blog\/2017\/03\/09\/jwhois-uses-100-of-cpu-on-centos\/","title":{"rendered":"JWHOIS uses 100% of CPU on CentOS"},"content":{"rendered":"<p>Occasionally we hit a bug where the &#8216;whois&#8217; command hangs on one of our CentOS servers and goes CPU-bound. This has been happening on several CentOS versions, including 6.8. Specifically, this is a problem in jwhois, the whois client included in CentOS.<\/p>\n<p>Apparently, CentOS (and RHEL, on whose source code it&#8217;s based) is missing a number of fixes that have been added to other Linux versions including Fedora over the last couple of years. So the problem is actually known and a fix has been available for years, it&#8217;s just not included in the product.<\/p>\n<p>Comparing the change logs for jwhois between <a href=\"http:\/\/www.rpmfind.net\/linux\/RPM\/centos\/6.8\/x86_64\/Packages\/jwhois-4.0-19.el6.x86_64.html\">CentOS<\/a> and <a href=\"https:\/\/www.rpmfind.net\/linux\/RPM\/fedora\/25\/x86_64\/j\/jwhois-4.0-46.fc24.x86_64.html\">Fedora<\/a>, everything matches up to and including build 4.0-18 in September 2009, but then the two diverge.<\/p>\n<p>On Jan 26, 2010, Fedora received a fix (&#8220;Use select to wait for input (patch by Joshua Roys &lt;joshua.roys AT gtri.gatech.edu&gt;)&#8221;) for a new 4.0-19 build that resolved bug #469412 for precisely this issue. There are many more changes in Fedora&#8217;s jwhois after that, unlike its RHEL and CentOS equivalent, which in all the years since then received only a single update. This is also called 4.0-19, but it was made on Jun 23, 2011 and it includes only two fixes for unrelated issues that were fixed in Fedora&#8217;s jwhois updates 4.0-24 (Dec 20, 2010) and 4.0-26 (Mar 15, 2011), but not the earlier select fix or fixes for any of the other issues. CentOS is missing the &#8220;jwhois-4.0-select.patch&#8221; and that&#8217;s why WHOIS hangs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Occasionally we hit a bug where the &#8216;whois&#8217; command hangs on one of our CentOS servers and goes CPU-bound. This has been happening on several CentOS versions, including 6.8. Specifically, this is a problem in jwhois, the whois client included &hellip; <a href=\"https:\/\/joewein.net\/blog\/2017\/03\/09\/jwhois-uses-100-of-cpu-on-centos\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,14],"tags":[],"class_list":["post-2717","post","type-post","status-publish","format-standard","hentry","category-linux","category-software"],"_links":{"self":[{"href":"https:\/\/joewein.net\/blog\/wp-json\/wp\/v2\/posts\/2717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/joewein.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joewein.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joewein.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/joewein.net\/blog\/wp-json\/wp\/v2\/comments?post=2717"}],"version-history":[{"count":3,"href":"https:\/\/joewein.net\/blog\/wp-json\/wp\/v2\/posts\/2717\/revisions"}],"predecessor-version":[{"id":2720,"href":"https:\/\/joewein.net\/blog\/wp-json\/wp\/v2\/posts\/2717\/revisions\/2720"}],"wp:attachment":[{"href":"https:\/\/joewein.net\/blog\/wp-json\/wp\/v2\/media?parent=2717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joewein.net\/blog\/wp-json\/wp\/v2\/categories?post=2717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joewein.net\/blog\/wp-json\/wp\/v2\/tags?post=2717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}