All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Riemer <sebastian.riemer-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
To: David Dillow <dave-i1Mk8JYDVaaSihdK6806/g@public.gmane.org>
Cc: Hal Rosenstock
	<hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: OpenSM 3.3.16 at 100% CPU load, "console off"
Date: Wed, 09 Oct 2013 15:53:29 +0200	[thread overview]
Message-ID: <52555FD9.5030805@profitbricks.com> (raw)
In-Reply-To: <1381325445.27365.4.camel-a7a0dvSY7KqLUyTwlgNVppKKF0rrzTr+@public.gmane.org>

On 09.10.2013 15:30, David Dillow wrote:
> On Wed, 2013-10-09 at 09:28 -0400, Hal Rosenstock wrote:
>>> >From strace:
>>> poll([{fd=0, events=POLLIN}], 1, 1000)  = 1 ([{fd=0, revents=POLLIN}])
>>> read(0, "", 4096)                       = 0
>>> poll([{fd=0, events=POLLIN}], 1, 1000)  = 1 ([{fd=0, revents=POLLIN}])
>>> read(0, "", 4096)                       = 0
>>> poll([{fd=0, events=POLLIN}], 1, 1000)  = 1 ([{fd=0, revents=POLLIN}])
>>> read(0, "", 4096)                       = 0
>>
>> So this doesn't block for 1 second and that's why the CPU is 100% ?
> 
> Looks like it is spinning on a closed socket (or stdin) -- calling
> poll() on such will return immediately...
> 

Thanks for the responses!

I've seen in the code that the local console is initialized but is not
released correctly. Should be done in osm_console_exit().

Something like this:

       if (p_oct->in_fd >= 0) {
               p_oct->in = NULL;
               p_oct->out = NULL;
               p_oct->in_fd = -1;
               p_oct->out_fd = -1;
       }

I guess what happened was that "console local" was set, changed in the
config to "console off" and the service has been restarted. Restarting
the service again didn't help.

It is strange that the console_init_flag is still set. The function
osm_console() returns 0 if poll() fails. If it would return something
else, then the console_init_flag would be set to 0 again and there would
be no issue anymore I suppose.

Cheers,
Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-10-09 13:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09 11:10 OpenSM 3.3.16 at 100% CPU load, "console off" Sebastian Riemer
     [not found] ` <525539A4.8090700-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2013-10-09 13:28   ` Hal Rosenstock
     [not found]     ` <52555A04.8080606-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-10-09 13:30       ` David Dillow
     [not found]         ` <1381325445.27365.4.camel-a7a0dvSY7KqLUyTwlgNVppKKF0rrzTr+@public.gmane.org>
2013-10-09 13:53           ` Sebastian Riemer [this message]
2013-10-09 14:00       ` Hal Rosenstock
     [not found]         ` <52556172.2070707-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-10-09 14:45           ` Sebastian Riemer
     [not found]             ` <52556BEE.5070409-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2013-10-09 15:15               ` Hal Rosenstock
     [not found]                 ` <525572FE.5080805-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2013-10-09 15:52                   ` Sebastian Riemer
     [not found]                     ` <52557BCF.6030302-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2013-10-09 16:51                       ` Hal Rosenstock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52555FD9.5030805@profitbricks.com \
    --to=sebastian.riemer-eikl63zcoxah+58jc4qpia@public.gmane.org \
    --cc=dave-i1Mk8JYDVaaSihdK6806/g@public.gmane.org \
    --cc=hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.