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");
Original issue reported on code.google.com by markkawi...@gmail.com on 27 Nov 2012 at 7:16
Original issue reported on code.google.com by
markkawi...@gmail.com
on 27 Nov 2012 at 7:16