Arnaud Quette
2014-Feb-25 21:23 UTC
[Nut-upsuser] Arch Linux and Tripp Lite web snmp card issues.
2014-02-25 12:58 GMT+01:00 Charles Lepple <clepple at gmail.com>:> On Feb 24, 2014, at 11:48 PM, Jason R Begley wrote: > > > 0.073855 load_mib2nut: trying classic method with 'delta_ups' mib > > 0.073878 Entering nut_snmp_get_str() > > 0.073899 nut_snmp_get((null)) > > 0.073918 nut_snmp_walk((null)) > > Arnaud, > > The gen-snmp-subdriver.sh script is setting mib2nut[i]->oid_auto_check to > NULL for new drivers (with no instructions on what to use in place of > NULL). However, this seems to be only used with the "classic method" for > detecting an UPS. > > Is the intent to phase out the classic method, or should we just add an > explicit NULL check in load_mib2nut()? > > The full stack trace is below: > > > Program received signal SIGSEGV, Segmentation fault. > > 0xb7da9470 in __strchr_sse2_bsf () from /usr/lib/libc.so.6 > > (gdb) bt > > #0 0xb7da9470 in __strchr_sse2_bsf () from /usr/lib/libc.so.6 > > #1 0xb7f05758 in snmp_parse_oid () from /usr/lib/libnetsnmp.so.30 > > #2 0x0804afd8 in nut_snmp_walk () > > #3 0x0804b261 in nut_snmp_get () > > #4 0x0804bab6 in nut_snmp_get_str () > > #5 0x0804be7b in load_mib2nut () > > #6 0x0804bfd2 in upsdrv_initups () > > #7 0x08049fb4 in main ( >Hi Charles, gen-snmp-subdriver.sh simply hasn't done its job, for some reasons. well, 1 clear is that's it not a completed effort... at all but, still IIRC, it should have produced at least a bit more @Jason: how have you called the script? could you please also send an archive including: - the results of the adapted commands on #L73, #L74 https://github.com/networkupstools/nut/blob/master/scripts/subdriver/gen-snmp-subdriver.sh - your mib file cheers, Arno -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140225/e9d414ac/attachment.html>
Charles Lepple
2014-Feb-26 00:03 UTC
[Nut-upsuser] Arch Linux and Tripp Lite web snmp card issues.
On Feb 25, 2014, at 4:23 PM, Arnaud Quette wrote:> gen-snmp-subdriver.sh simply hasn't done its job, for some reasons. > well, 1 clear is that's it not a completed effort... at all > but, still IIRC, it should have produced at least a bit moreHi Arnaud, I may not have been specific enough in my description. The crash that Jason saw is with the version of snmp-ups that is currently in Git - including the new 'xppc' MIB, but the NULL pointer in question is also in 'delta_ups'. Given that mib2nut[i]->oid_auto_check is only used for the "classic" OID check, I think we can just add a special case to check for NULL, and continue the loop if oid_auto_check has not been provided.> @Jason: how have you called the script? > could you please also send an archive including: > - the results of the adapted commands on #L73, #L74 > https://github.com/networkupstools/nut/blob/master/scripts/subdriver/gen-snmp-subdriver.sh > - your mib fileJason, this would still be useful to address the issue of gen-snmp-subdriver not parsing things correctly. -- Charles Lepple clepple at gmail -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140225/1a46c096/attachment.html>
Jason R Begley
2014-Feb-26 00:45 UTC
[Nut-upsuser] Arch Linux and Tripp Lite web snmp card issues.
Sorry, I just now figured out how to get a usable output. -Option one doesn't work at all for me. snmp_build: unknown failuresnmpget: Error building ASN.1 representation (Can't build OID for variable) COUNT = 0 / 0 Creating /usr/share/snmp/mibs/ups-mib.txt-mib.h Creating /usr/share/snmp/mibs/ups-mib.txt-mib.c Done. -Option 2 is attached. I ran the following to get the output. snmpwalk -Os -v2c -c XXXXXX XXXXXXXXXXXX .1.3.6.1.4.1.850.100 -m //usr/share/snmp/mibs/TRIPPLITE-MIB.txt > snmpwalk-Os.log snmpwalk -On -v2c -c XXXXXX XXXXXXXXXXXX .1.3.6.1.4.1.850.100 -m /usr/share/snmp/mibs/TRIPPLITE-MIB.txt > snmpwalk-On.log ./gen-snmp-subdriver.sh -s .1.3.6.1.4.1.850.100 snmpwalk-On.log snmpwalk-Os.log Thanks again for the help, Jason On 2/25/2014 7:03 PM, Charles Lepple wrote:> On Feb 25, 2014, at 4:23 PM, Arnaud Quette wrote: > >> gen-snmp-subdriver.sh simply hasn't done its job, for some reasons. >> well, 1 clear is that's it not a completed effort... at all >> but, still IIRC, it should have produced at least a bit more > > Hi Arnaud, > > I may not have been specific enough in my description. > > The crash that Jason saw is with the version of snmp-ups that is > currently in Git - including the new 'xppc' MIB, but the NULL pointer > in question is also in 'delta_ups'. > > Given that mib2nut[i]->oid_auto_check is only used for the "classic" > OID check, I think we can just add a special case to check for NULL, > and continue the loop if oid_auto_check has not been provided. > >> @Jason: how have you called the script? >> could you please also send an archive including: >> - the results of the adapted commands on #L73, #L74 >> https://github.com/networkupstools/nut/blob/master/scripts/subdriver/gen-snmp-subdriver.sh >> - your mib file > > Jason, > > this would still be useful to address the issue of gen-snmp-subdriver > not parsing things correctly. > > -- > Charles Lepple > clepple at gmail > > > > > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140225/5488e027/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: trippups1.tar.gz Type: application/gzip Size: 2493 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140225/5488e027/attachment.bin>
Arnaud Quette
2014-Feb-26 20:56 UTC
[Nut-upsuser] Arch Linux and Tripp Lite web snmp card issues.
2014-02-26 1:03 GMT+01:00 Charles Lepple <clepple at gmail.com>:> On Feb 25, 2014, at 4:23 PM, Arnaud Quette wrote: > > gen-snmp-subdriver.sh simply hasn't done its job, for some reasons. > well, 1 clear is that's it not a completed effort... at all > but, still IIRC, it should have produced at least a bit more > > > Hi Arnaud, >Hi Charles> I may not have been specific enough in my description. >I completely overlooked that point while focusing on the new subdrv consideration. sorry... The crash that Jason saw is with the version of snmp-ups that is currently> in Git - including the new 'xppc' MIB, but the NULL pointer in question is > also in 'delta_ups'. > > Given that mib2nut[i]->oid_auto_check is only used for the "classic" OID > check, I think we can just add a special case to check for NULL, and > continue the loop if oid_auto_check has not been provided. >you're fully right indeed! but the root cause (and solution) is probably deeper: https://github.com/networkupstools/nut/commit/8428fa57614ffe777191d9ae127b53d964bca6f3 however, there is still some doc completion needed for the subdriver generation. and lot more on this still-too-experimental code :-/ all in all, I'll have to complete quickly #20 specs: https://github.com/networkupstools/nut/issues/20 @Jason: could you please try with the latest git master? @Jason: how have you called the script?> could you please also send an archive including: > - the results of the adapted commands on #L73, #L74 > > https://github.com/networkupstools/nut/blob/master/scripts/subdriver/gen-snmp-subdriver.sh > - your mib file > > > Jason, > > this would still be useful to address the issue of gen-snmp-subdriver not > parsing things correctly. >to be continued... Arno -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140226/7b186de6/attachment.html>