openhpi2 / Open-HPI-base

Open HPI is an open source implementation of the SA Forum's Hardware Platform Interface (HPI). HPI provides an abstracted interface to managing computer hardware, typically for chassis and rack based servers
0 stars 1 forks source link

OpenHPI client (hpitree) segfaults on solaris 5.10 #2130

Open openhpi2 opened 15 years ago

openhpi2 commented 15 years ago

Loaded the Solaris 5.10 on a dl360g5 proliant server. Downloaded and compiled the OpenHPI 2.13.3 on that machine. HP C-class chassis was configured. The daemon started properly. When I tried to get the hardware information using hpitree it segfaulted half way through.

Reported by: *anonymous

openhpi2 commented 15 years ago

The daemon itself continues to run.

Original comment by: dr_mohan

openhpi2 commented 15 years ago

Original comment by: sutula

openhpi2 commented 15 years ago

If hpitree is generating a segmentation fault on Solaris and not on Linux, the problem may be caused by a call to snprintf(), printf(), or fprintf() with a NULL argument. The following code will generate a segmentation fault on Solaris and print "(null)\n" on Linux:

printf("%s\n", NULL);

The list_ functions in hpitree.c directly and indirectly call the ohlookup functions declared in sahpi_enum_utils.h. The ohlookup functions return a pointer to a string if the lookup is successful and a NULL if the lookup fails. Some of the callers of the ohlookup functions don't check for the NULL return value before calling snprintf(), printf(), or fprintf().

If output from hpitree on Linux contains a "(null)", the segmentation fault on Solaris may be due to one of the ohlookup* functions returning NULL.

Original comment by: crinaldo

openhpi2 commented 15 years ago

Original comment by: ricwhite

openhpi2 commented 14 years ago

Original comment by: ricwhite

openhpi2 commented 13 years ago

Original comment by: avpak

openhpi2 commented 12 years ago

Original comment by: avpak

openhpi2 commented 12 years ago

Original comment by: avpak

openhpi2 commented 12 years ago

Original comment by: dr_mohan

openhpi2 commented 9 years ago

Original comment by: dr_mohan

openhpi2 commented 9 years ago

This was filed on 2009-03-09 with a milestone in the 3.1.x release. We do not know if this problem exists in later releases of Solaris (11.2 and 12.* etc). But moving the milestone to a future release for now as it will not be fixed in 3.1.x release

Original comment by: dr_mohan