Hide Forgot
Clone of the upstream issue https://code.google.com/p/conman/issues/detail?id=15 > Reported by markkawi..., Nov 27, 2012 > > What steps will reproduce the problem? > > Create a conman.conf file with 4,096 or more "console" entries, all using IPMI SOL, and try to run conmand. It will crash. > > What is the expected output? What do you see instead? > > > What version of the software are you using? On what operating system? > > ConMan 0.2.7, CentOS 5.5 (kernel 2.6.18) > > Please provide any additional information below. > > The relevant defines: > > #define IPMI_ENGINE_CONSOLES_PER_THREAD 128 > #define IPMICONSOLE_THREAD_COUNT_MAX 32 > > When there are 4,096 or more consoles using IPMI SOL, the following line is run: > > num_threads = ((num_consoles - 1) / IPMI_ENGINE_CONSOLES_PER_THREAD) + 1; > > (this is on line 96 of the file server-ipmi.c. The math works out to: ((4096 - 1) / 128) + 1. That goes to 33 when num_consoles is >= 4096. But 33 is greater than IPMICONSOLE_THREAD_COUNT_MAX, and libipmiconsole refuses to initialize the engine. > > The workaround is to make sure that num_threads never exceeds IPMICONSOLE_THREAD_COUNT_MAX: > > Mark-Pettits-Twitter-Laptop:~/conman/conman$ git diff > diff --git a/server-ipmi.c b/server-ipmi.c > index ba2ec65..2b7775a 100644 > --- a/server-ipmi.c > +++ b/server-ipmi.c > @@ -93,6 +93,7 @@ void ipmi_init(int num_consoles) > return; > } > num_threads = ((num_consoles - 1) / IPMI_ENGINE_CONSOLES_PER_THREAD) + 1; > + num_threads = MIN(num_threads, IPMICONSOLE_THREAD_COUNT_MAX); > > if (ipmiconsole_engine_init(num_threads, 0) < 0) { > log_err(0, "Unable to start IPMI SOL engine");
From devel side, it is trivially easy to do this.
I have a working patch for this, but can't commit it: $ rhpkg commit --clog -p ... remote: *** Resolves: remote: *** Unapproved: remote: *** rhbz#1022496 (pm_ack+, rhel-6.5.0-, rhel-6.6.0+, rhel-6.5.z?) remote: *** No approved Bugzilla IDs referenced in log message or changelog for ecb7e7702661689c7bbbaa38c69067de80772299 remote: *** Unapproved Bugzilla IDs referenced in log message or changelog for ecb7e7702661689c7bbbaa38c69067de80772299 remote: *** Commit ecb7e7702661689c7bbbaa38c69067de80772299 denied remote: *** Current checkin policy requires: remote: (rhel-6.6.z == + or (rhel-6.6.0 == + and blocker == +)) Please set required flags (blocker+, or rhel-6.7.0+), and I will commit the change.
Created attachment 1120192 [details] The patch which fixes this
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2017-0761.html