Skip to contentSkip to conversation

netsnmp: bump to 5.7.1 LTS

PATCH Superseded Luca Ceresoli 4 participants 13 messages Dec 6, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netsnmp: bump to 5.7.1 LTS

---
 package/netsnmp/netsnmp.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
package/netsnmp/netsnmp.mk +1 -1
index 5d789b9..959e39f 100644
@@ -4,7 +4,7 @@
 #
 #############################################################
 
-NETSNMP_VERSION = 5.6.1.1
+NETSNMP_VERSION = 5.7.1
 NETSNMP_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/net-snmp
 NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz
 NETSNMP_INSTALL_STAGING = YES
Signature · 1 line
1.7.5.4
#2 lore raw

PATCH 1/1 netsnmp: bump to 5.7.1 LTS

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Quoted 7 lines · Luca Ceresoli
Quoted 7 lines
package/netsnmp/netsnmp.mk +1 -1
-NETSNMP_VERSION = 5.6.1.1
+NETSNMP_VERSION = 5.7.1

NETSNMP_SITE =

http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/net-snmp
NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz NETSNMP_INSTALL_STAGING = YES

Gustavo> NAK.
Gustavo> The 5.7 series (up to 5.7.1) fails miserably with a segfault on Gustavo> powerpc.

Uhh, that's bad. Any idea what's causing it?

I already committed the bump. I'll revert again if we cannot fix it.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 1/1 netsnmp: bump to 5.7.1 LTS

In reply to Gustavo Zacarias
Quoted 6 lines · Gustavo Zacarias
Quoted 4 lines · Luca Ceresoli
package/netsnmp/netsnmp.mk +1 -1
-NETSNMP_VERSION = 5.6.1.1
+NETSNMP_VERSION = 5.7.1

NETSNMP_SITE =

Quoted 6 lines
Quoted 3 lines

http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/net-snmp
NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz NETSNMP_INSTALL_STAGING = YES

NAK.
The 5.7 series (up to 5.7.1) fails miserably with a segfault on powerpc.

Thanks for your information.

Did you report this to the net-snmp mailing list to get help and, hopefully, a fix?
It's disappointing that all buildroot users must stick to an old version of a package because it's not working in some configurations.

Luca

--------------------------------------------------------------------------
Luca Ceresoli
Comelit R&D - Progettazione Software

COMELIT??
?
?
Phone???????
Fax??????????
Mail?????????luca.ceresoli at comelit.it
Web????????http://www.comelitgroup.com/
YouTube??http://www.youtube.com/comelitgroup
--------------------------------------------------------------------------
Buon Natale - Merry Christmas - Joyeux Noel - Feliz Navidad - Feliz Natal - Vrolijk Kerstfeest - Fr?hliche Weihnachten
Comelit informa che gli uffici saranno chiusi da sabato 24 dicembre 2011 a luned? 9 gennaio 2012
Comelit informs that the office will be closed from 24th December 2011 till 8th January 2012 included
Comelit vous informe que ses bureaux seront ferm?s du 24 D?cembre 2011 au 8 Janvier inclus
Prima di stampare pensa all'ambiente / Think about environment before printing
AVVISO DI CONFIDENZIALIT?
Questo messaggio ed i suoi eventuali allegati pu? contenere informazioni confidenziali, di propriet?, legalmente protette.? destinato all'utilizzo esclusivo del destinatario sopra indicato; privatezza e confidenzialit? non sono modificati da eventuali errori di trasmissione. Se il messaggio non ? a lei destinato, non deve utilizzarlo, diffonderlo, copiarlo con qualunque mezzo, o intraprendere azioni basandosi su di esso. Se ha ricevuto questo messaggio per errore, la preghiamo di volerlo distruggere (unitamente ad eventuali copie dello stesso) e di volerci cortesemente informare del fatto scrivendo al mittente. CONFIDENTIALITY NOTICE
This message and its attachments (if any) may contain confidential, proprietary or legally privileged information and it is intended only for the use of the addressee named above. No confidentiality or privilege is waived or lost by any erroneous transmission. If you are not the intended recipient of this message you are hereby notified that you must not use, disseminate, copy it in any form or take any action in reliance on it. If you have received this message in error, please, delete it (and any copies of it) and kindly inform the sender.

#4 lore raw

PATCH 1/1 netsnmp: bump to 5.7.1 LTS

Quoted 4 lines · Luca Ceresoli
Quoted 3 lines

NAK.
The 5.7 series (up to 5.7.1) fails miserably with a segfault on powerpc.

Quoted 8 lines

Thanks for your information.

Did you report this to the net-snmp mailing list to get help and, hopefully, a fix?
It's disappointing that all buildroot users must stick to an old version of a package because it's not working in some configurations.

Luca

Not yet, i need a meaningful trace rather than just pointing fingers. I'll try to give it some time today but no promises, i'm pretty stretched lately.
Regards.

#5 lore raw

PATCH 1/1 netsnmp: bump to 5.7.1 LTS

In reply to Luca Ceresoli
Quoted 4 lines · Luca Ceresoli
Quoted 3 lines

NAK.
The 5.7 series (up to 5.7.1) fails miserably with a segfault on powerpc.

Quoted 8 lines

Thanks for your information.

Did you report this to the net-snmp mailing list to get help and, hopefully, a fix?
It's disappointing that all buildroot users must stick to an old version of a package because it's not working in some configurations.

Luca

Digging up found that bad mojo with closedir() and uclibc was to blame. It's already been reported and a patch available at
http://sourceforge.net/tracker/?func=detail&aid=3436528&group_id=12694&atid=312694
Tested working so add up the patch, respin and we're good to go. Regards.

#6 lore raw

PATCH 1/1 netsnmp: bump to 5.7.1 LTS

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Hi,

Gustavo> Digging up found that bad mojo with closedir() and uclibc was Gustavo> to blame. It's already been reported and a patch available at Gustavo> http://sourceforge.net/tracker/?func=detail&aid=3436528&group_id=12694&atid=312694
Gustavo> Tested working so add up the patch, respin and we're good to Gustavo> go. Regards.

Thanks, but I don't think that's the culprint as closedir() in uClibc checks for NULL pointers (and have done so for 10 years).

int closedir(DIR * dir)

{
        int fd;

        if (!dir) {
                __set_errno(EBADF);
                return -1;
        }

        ..
}
Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH 1/1 netsnmp: bump to 5.7.1 LTS

Quoted 4 lines · Peter Korsgaard

Thanks, but I don't think that's the culprint as closedir() in uClibc checks for NULL pointers (and have done so for 10 years).

int closedir(DIR * dir)

Quoted 10 lines
{
        int fd;

        if (!dir) {
                __set_errno(EBADF);
                return -1;
        }

        ..
}

Simple testcase for my failure:
Run snmpd with a basic config and run a snmpwalk against localhost "snmpwalk -v 1 -c something localhost".
The snmpd daemon will die before the walk is done. Rebuilding net-snmp with the patch fixes it.
And a gdb backtrace points at closedir() exactly. Powerpc e300c3 target with latest gcc/binutils and uclibc 0.9.32. Regards.

#8 lore raw

PATCH 1/1 netsnmp: bump to 5.7.1 LTS

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Hi,

Gustavo> Simple testcase for my failure:
Gustavo> Run snmpd with a basic config and run a snmpwalk against localhost Gustavo> "snmpwalk -v 1 -c something localhost".
Gustavo> The snmpd daemon will die before the walk is done. Gustavo> Rebuilding net-snmp with the patch fixes it.
Gustavo> And a gdb backtrace points at closedir() exactly. Gustavo> Powerpc e300c3 target with latest gcc/binutils and uclibc 0.9.32.

Sorry, I missed the fact that include/dirent.h annotates closedir() with __attribute__((nonnull)), which probably makes GCC drop the redundant if (!dir) check.

I don't see any specific requirement in susv3 that it should handle NULL pointers, so the patch seems OK:

http://www.bcs.zp.ua/manuals/en/susv3/functions/closedir.html

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

PATCH 1/1 netsnmp: bump to 5.7.1 LTS

In reply to Luca Ceresoli
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Luca" == Luca Ceresoli <[email protected]> writes:

Luca> ---

 Luca>  package/netsnmp/netsnmp.mk |    2 +-

Luca> 1 files changed, 1 insertions(+), 1 deletions(-)

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#10 lore raw

PATCH v2 1/1 netsnmp: bump to 5.7.1 LTS

In reply to Luca Ceresoli

---
Changed in v2:
- added patch to fix crash on uClibc. Thanks Gustavo Zacarias for reporting, with request to test it as I do not have a target where I can reproduce the problem.

PS: Peter, I wonder if Gustavo should have a SoB line on this patch, since he did a significant part of the work. If it is the case, is it something that I should have done, or is this your role as a maintainer? Thanks.

 package/netsnmp/netsnmp-swinst-crash.patch |   17 +++++++++++++++++
 package/netsnmp/netsnmp.mk                 |    2 +-
 2 files changed, 18 insertions(+), 1 deletions(-)
 create mode 100644 package/netsnmp/netsnmp-swinst-crash.patch
package/netsnmp/netsnmp-swinst-crash.patch new file +17 -0
new file mode 100644
index 0000000..f7298a6
@@ -0,0 +1,17 @@
+Fixes runtime error with uClibc (and possibly others).
+
+Original patch and bug description:
+http://sourceforge.net/tracker/?func=detail&aid=3436528&group_id=12694&atid=312694
+
+--- net-snmp-5.7.1/agent/mibgroup/host/data_access/swinst_pkginfo.c
++++ /home/fabled//net-snmp-5.7.1.patched/agent/mibgroup/host/data_access/swinst_pkginfo.c
+@@ -140,7 +140,8 @@
+         memcpy( entry->swDate, cp, date_len );
+         entry->swDate_len = date_len;
+     }
+-    closedir( d );
++    if (d != NULL)
++        closedir( d );
+ 
+     DEBUGMSGTL(("swinst:load:arch"," loaded %d entries\n",
+                 (int)CONTAINER_SIZE(container)));
package/netsnmp/netsnmp.mk +1 -1
index 5d789b9..959e39f 100644
@@ -4,7 +4,7 @@
 #
 #############################################################
 
-NETSNMP_VERSION = 5.6.1.1
+NETSNMP_VERSION = 5.7.1
 NETSNMP_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/net-snmp
 NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz
 NETSNMP_INSTALL_STAGING = YES
Signature · 1 line
1.7.5.4
#11 lore raw

PATCH v2 1/1 netsnmp: bump to 5.7.1 LTS

Quoted 1 line · Luca Ceresoli
Quoted 6 lines

PS: Peter, I wonder if Gustavo should have a SoB line on this patch, since he
did a significant part of the work. If it is the case, is it something
that I should have done, or is this your role as a maintainer? Thanks.

It's actually something i should do as above :)
Thanks!