arcress0 / ipmiutil

ipmiutil is an easy to use set of IPMI server management utilities. It can get/set sensor readings & thresholds, automate SEL management, do SOL console, etc. Supports Linux, Windows, BSD, Solaris, MacOSX. The only IPMI project tool that runs natively on Windows. See http://ipmiutil.sf.net for rpms, etc. (formerly called panicsel). It can run driverless in Linux for use on boot media or embedded environments.
BSD 3-Clause "New" or "Revised" License
33 stars 5 forks source link

SDR record 61 is malformed, length 12 is less than minimum 12 #17

Open JoergFF opened 1 year ago

JoergFF commented 1 year ago

Hello,

I forward this bug from Debian[1].

`Hi,

In some cases (Intel S2600STB boards), ipmiutil fails to install the first time: Setting up ipmiutil (3.1.8-4) ... SDR record 61 is malformed, length 12 is less than minimum 12 0061 GetSDR error -25, rlen = 10 dpkg: error processing package ipmiutil (--configure): installed ipmiutil package post-installation script subprocess returned error exit status 231 Processing triggers for man-db (2.11.2-2) ... Errors were encountered while processing: ipmiutil E: Sub-process /usr/bin/dpkg returned an error code (1)

The second time around, it works because /var/lib/ipmiutil/sensor_out.txt now exists.

The issue can be reproduced by removing /var/lib/ipmiutil/sensor_out.txt and running the postinst script again (with -x added here to highlight the problem):

dpkg-reconfigure ipmiutil

The issue here is that "ipmiutil sel" works but "ipmi sensor" does not. https://jff.email/cgit/ipmiutil.git/tree/debian/postinst?h=debian/3.1.9-1#n16 https://jff.email/cgit/ipmiutil.git/tree/debian/postinst?h=debian/3.1.9-1#n22

The fact that a failing "ipmiutil sensor" command prevents the installation is problematic. Would it please be possible to make this failure non-fatal?

https://bugs.launchpad.net/ubuntu/+source/ipmiutil/+bug/1786562 seems to be the same issue, it concerns the same error message with an Intel S2600STB.

PS: maybe there is also an upstream ipmiutil bug to report here? "length 12 is less than minimum 12" sounds like an off-by-one error.

Kind regards,

Louis`

CU Jörg

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040349

arcress0 commented 1 year ago

Jörg,

I looked at this, and it needs a few changes:

Thankfully this firmware issue is fairly rare.
I have the changes coded and will submit a patch soon.

Andy

arcress0 commented 1 year ago

Patch submitted to this github repo (ver 3.1.9-2)

arcress0 commented 9 months ago

Resolved in ipmiutil-3.1.9-2 in github and ipmiutil.sf.net