{"id":141,"date":"2016-01-30T11:31:43","date_gmt":"2016-01-30T11:31:43","guid":{"rendered":"http:\/\/www.aixperts.co.uk\/?p=141"},"modified":"2016-01-30T14:20:52","modified_gmt":"2016-01-30T14:20:52","slug":"rmsock-bug-and-workaround","status":"publish","type":"post","link":"https:\/\/www.aixperts.co.uk\/?p=141","title":{"rendered":"rmsock bug and workaround"},"content":{"rendered":"<p>I found a bug in rmsock on AIX 6.1 TL9 recently which caused a server crash. If run on a socket ID that has disappeared, the server just dumps and reboots.<\/p>\n<p>I came up with a work around for identifying process owners of open TCP sockets in AIX without using rmsock. Do the following using the AIX debugger kdb:<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Run &#8216;netstat -A&#8217; with any other flags you desire. Grab the socket ID from the first column and start up &#8216;kdb&#8217;.<br \/>\n&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Run &#8216;sockinfo &lt;sockID from above&gt; tcpcb&#8217; and hit &lt;enter&gt; repeatedly until you get to the bottom<br \/>\n&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Grab the PID number right after the word ACTIVE as below:<\/p>\n<p>proc\/fd: fd: 14<br \/>\nSLOT NAME\u00a0\u00a0\u00a0\u00a0 STATE\u00a0\u00a0\u00a0\u00a0\u00a0 PID\u00a0\u00a0\u00a0 PPID\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ADSPACE\u00a0 CL #THS<\/p>\n<p>pvproc+099400\u00a0 613*oracle\u00a0\u00a0 ACTIVE 2650070 0000001 0000000AEF722590\u00a0\u00a0 0 0001<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Run &#8216;hcal&#8217; on the PID, still inside kdb, to convert to dec:<\/p>\n<p>(0)&gt; hcal 2650070<br \/>\nValue hexa: 02650070\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Value decimal: 40173680<\/p>\n<p>&#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Exit out to a promt and use &#8216;ps&#8217; grepping for the decimal PID to find the process.<\/p>\n<p>All without risking a crash.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I found a bug in rmsock on AIX 6.1 TL9 recently which caused a server crash. If run on a socket ID that has disappeared, the server just dumps and reboots. I came up with a work around for identifying &hellip; <a href=\"https:\/\/www.aixperts.co.uk\/?p=141\">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":[3],"tags":[7,18,20,17,21,19],"class_list":["post-141","post","type-post","status-publish","format-standard","hentry","category-aix","tag-aix","tag-bug","tag-kdb","tag-rmsock","tag-sockinfo","tag-tcp"],"_links":{"self":[{"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=141"}],"version-history":[{"count":3,"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions"}],"predecessor-version":[{"id":147,"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/141\/revisions\/147"}],"wp:attachment":[{"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aixperts.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}