Tracker: Bugs

5 long delay at startup in openhpi daemon - ID: 3538125
Last Update: Settings changed ( avpak )

The problem is caused by an incorrect for loop termination condition when looking for custom fields
in the chassis info area. The function failing is init_inventory_area() in plugins/ipmi/ipmi_inventory_event.c.
The if statement for loop termination should be a != test instead of an == test. The exact same for loop
logic exists for the board info area and the product info area in init_inventory_area routine and the if statements
for these two cases correctly use ==.

A delay at startup will occur If the chassis info area does not contain any custom fields.
When there are no custom fields in the chassis info area, the loop runs through
32 bits of iterating at which point the loop variable "i" becomes negative and the loop terminates. This causes
the first request for inventory information to take many minutes to complete.

Attached is a patch to 2.14.0 to fix this.


Jim Mankovich ( jmankovich ) - 2012-06-26 07:50:28 PDT

5

Closed

Fixed

Bryan Sutula

OpenIPMI plugin

3.2.0

Public


Comments ( 5 )

Date: 2012-06-29 11:15:11 PDT
Sender: dr_mohan

Fixed in 2.14.x with checkin revision 7476


Date: 2012-06-29 10:31:47 PDT
Sender: sutulaProject Admin

Mohan, feel free if you wish. To do Jim any good, will you also plan to
create a new release of 2.14?


Date: 2012-06-29 10:04:15 PDT
Sender: dr_mohan

Looks like this plug-in is already deprecated. If this bug is found in
2.14.x branch then it is better to fix it there too. We may not release
from that branch any time soon, but that is a proper place to fix it. If
there is no objection I will checkin the patch to 2.14.x branch also



Date: 2012-06-26 10:06:48 PDT
Sender: sutulaProject Admin

This is fixed in trunk revision 7474. Because 2.14 is so old, it doesn't
make sense to fix and re-release this there (and all the intervening
releases).

Jim, thanks for the report.


Date: 2012-06-26 09:28:29 PDT
Sender: Shuah Khan

Patch looks good. ipmi_fru_get_chassis_info_custom_len() returns ENOSYS
when it doesn't find any custom fields as stated in ipmi_fru.h comments.
Also iomi plug-in calls this function via cf.get_len from
get_custom_field_cb(), vial len_fun in modify_inventory() which correcly
check the return.

It is not clearly stated, however I am assuming i overflows and becomes
negavtive. Requesting patch submitter to update the bug with test results.


Attached File ( 1 )

Filename Description Download
0001-Fix-Long-Delay-Getting-Initial-Inventory-Info-from-o.patch patch to 2.14.0 Download

Changes ( 8 )

Field Old Value Date By
artifact_group_id 3.1.x 2012-07-12 22:14:32 PDT avpak
status_id Open 2012-06-26 10:06:48 PDT sutula
resolution_id None 2012-06-26 10:06:48 PDT sutula
artifact_group_id 2.14.0 2012-06-26 10:06:48 PDT sutula
allow_comments 1 2012-06-26 10:06:48 PDT sutula
close_date - 2012-06-26 10:06:48 PDT sutula
assigned_to nobody 2012-06-26 10:06:48 PDT sutula
File Added 447113: 0001-Fix-Long-Delay-Getting-Initial-Inventory-Info-from-o.patch 2012-06-26 07:50:34 PDT jmankovich