RE: segmentation fault
"Ramon Tarruella" <[email protected]> Wed, 31 Mar 2004 17:32:48 -0400
| Newsgroups | gmane.network.net-policy.user |
|---|---|
| Message-ID | <[email protected]> |
Ok Michael I solved the problem, check this: 1) I reinstalled everything again, but this time I didn't use the net-snmp RPM(net-snmp-5.0.9-3.src.rpm) I build it from source(latest CVS), so from some strange reason the net-snmp RPM don't work with net-policy, will be great if one of the developers check that. 2) I add to the ./configure command of net-snmp , opensnmp and net-policy --sysconfdir=/etc which is not specified in the INSTALL file, don't know if this is necesary for all users, but at least for RH9 it looks it's needed. 3) I used the same old opensnmp 0.3.6 code, no changes, it looks the problem was not there. 4) I will need your help on how can I add the service snmpd to the service list, I used: chkconfig --add snmpd but it says file does not exist, one of the reason I was using the net-snmp rpm was because it autoadd it to the service list and everytime you turn on machine the service load, but building it from source it doesn't add this, so how can I add this? As I understand the snmpd service must be running for net-policy to work, but right now I don't know how to make it run, Wait for your answer Thanks, Ramon Tarruella -----Mensaje original----- De: net-policy-users-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:net-policy-users-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]En nombre de Michael Baer Enviado el: martes, 30 de marzo de 2004 20:28 Para: Ramon Tarruella CC: net-policy-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Asunto: Re: segmentation fault >>>>> "RT" == Ramon Tarruella <[email protected]> writes: RT> Yes Michael I ran make clean, as I told you I reinstall RT> everything again in a pc with a fresh and new RH9 which is probably why it didn't occur to me at the time I read your message but did later thinking about segfault problems in opensnmp. Segfaults are notoriously hard to find and this is especially true of multi-threaded programs. Sometimes were the gdb trace shows the failure is actually a different thread, or the problem is caused elsewhere and shows up at varying times and places. That said, the most likely cause of the trace you sent earlier is multiple deletes of the same PDU object. The bad news is, I looked through the changelog and noticed that the major internal messaging re-architecture that I thought happened mid last year actually happened in November. These changes would directly affect when and where PDU objects are deleted and they were, in part, made because of memory handling problems like the one it appears you're having. Back-porting these changes would be quite difficult and time consuming. The possible good news is that you can try to use a cvs version of opensnmp with source code that has the internal message changes, and some DB changes but without the CG API changes. Although I am not sure it will work with the old np-distd code, there is a good chance that it will and, assuming my assumptions so far are correct, it would also solve the segfault problem you are getting. To do this you would need to checkout the cvs code from before February this year. Do the standard sourceforge anonymous cvs login: cvs -d:pserver:[email protected]:/cvsroot/opensnmp login and then checkout the source using the date, -D, flag: cvs -z3 -d:pserver:[email protected]:/cvsroot/opensnmp co -D 1/30/2004 opensnmp hope this helps, Mike RT> instalation, and again I get the same segmentation fault. I RT> really don't know what's happening the only thing I can RT> think is about the way I build the opensnmp code I used: RT> ./configure --with-db=/usr/local/BerkeleyDB.4.1/lib make RT> make install RT> I also tried adding the following specifications: RT> --sysconfdir=/etc --prefix=/usr RT> Everytime I tried this different specifications I ran make RT> clean fisrt RT> I also tried the opensnmp rpms, with the respective devel RT> rpms RT> I tried everything and still with the problem, so I will RT> need your help regarding the output messages I sent you, RT> considering you made that codes you are the one that can RT> suggest from where comes the problem. RT> The last thing that comes in my mind is that I'am using the RT> net-snmp rpms, so don't know if that can affect, I had to RT> use the rpms, because I was having problems adding the snmpd RT> deamon to the deamons start list, when I build it from RT> source. RT> Please tell me if SNMP have something to do with this RT> problem, or as you can saw in the segmentation fault RT> messages, it's a particular of OPENSNMP. I don't care if I RT> have to reinstall everything again, if it's necesary, but RT> first need to make sure what the problem is. RT> Considering you didn't get these messages, maybe it's RT> something I'am doing wrong. RT> Here is the detailed list of everything I did, just like RT> it's in the INSTALL file: RT> cd /root/.gnome-desktop/instalacion/PERL/RPMS rpm -i RT> perl-DBI-1.32-5.i386.rpm cd RT> /root/.gnome-desktop/instalacion/MYSQL/RPMS rpm -i RT> MySQL-server-4.0.13-0.i386.rpm rpm -i RT> MySQL-client-4.0.13-0.i386.rpm rpm -i RT> MySQL-devel-4.0.13-0.i386.rpm rpm -i RT> MySQL-bench-4.0.13-0.i386.rpm rpm -i RT> MySQL-embedded-4.0.13-0.i386.rpm rpm -i RT> MySQL-Max-4.0.13-0.i386.rpm rpm -i RT> MySQL-shared-4.0.13-0.i386.rpm rpm -i RT> MySQL-shared-compat-4.0.13-0.i386.rpm rpm -i RT> mysql++-1.7.9-4.rh9.i386.rpm RT> mysql --user=root GRANT ALL PRIVILEGES ON *.* TO RT> [email protected] IDENTIFIED BY 'administrador' WITH GRANT RT> OPTION; RT> unzip RT> /root/.gnome-desktop/instalacion/PERL/TAR-GZ/Apache-DBI-0.91.tar.gz RT> in /usr/local cd /usr/local/Apache-DBI-0.91 perl Makefile.PL RT> make make install RT> cd /root/.gnome-desktop/instalacion/PERL/RPMS rpm -i RT> perl-CGI-2.81-88.i386.rpm rpm -i RT> perl-DBD-MySQL-2.1021-3.i386.rpm RT> unzip RT> /root/.gnome-desktop/instalacion/OTROS/TAR-GZ/libsmi-0.3.0.tar.gz RT> in /usr/local cd /usr/local/libsmi-0.3.0 ./configure make RT> make install echo "/usr/local/lib" >> /etc/ld.so.conf echo RT> "/usr/lib" >> /etc/ld.so.conf ldconfig RT> unzip RT> /root/.gnome-desktop/instalacion/OTROS/TAR-GZ/db-4.1.25.tar.gz RT> in /usr/local cd /usr/local/db-4.1.25/build_unix RT> ../dist/configure --enable-cxx make make install echo RT> "/usr/local/BerkeleyDB.4.1/lib" >> /etc/ld.so.conf ldconfig RT> updatedb RT> unzip RT> /root/.gnome-desktop/instalacion/OTROS/TAR-GZ/opensnmp.tar.gz RT> in /usr/local cd /usr/local/opensnmp ./configure RT> --with-db=/usr/local/BerkeleyDB.4.1/lib make make install RT> updatedb RT> cd /root/.gnome-desktop/instalacion/OTROS/RPMS rpm -i RT> compat-db-3.3.11-4.i386.rpm cd RT> /root/.gnome-desktop/instalacion/PERL/RPMS rpm -i RT> perl-Term-ReadKey-2.20-1mz.i386.rpm rpm -i RT> perl-Tk-800.022-11.i386.rpm cd RT> /root/.gnome-desktop/instalacion/NETSNMP/RPMS rpm -i RT> net-snmp-5.0.9-3.i386.rh9.rpm rpm -i RT> net-snmp-devel-5.0.9-3.i386.rh9.rpm rpm -i RT> net-snmp-perlmods-5.0.9-3.i386.rh9.rpm RT> edit /etc/rc.d/init.d/snmpd replace /etc/init.d/functions RT> with /etc/rc.d/init.d/functions replace todos los /usr/local RT> with /usr/ RT> cd /usr/share/snmp/ snmpconf -g basic_setup agregar a RT> /usr/share/snmp/snmpd.conf -> master agentx net-snmp-config RT> --create-snmpv3-user -a 'administrador' -x 'administrador' RT> 'root' net-snmp-config --create-snmpv3-user -a RT> 'administrador' -x 'administrador' 'ramon2' net-snmp-config RT> --create-snmpv3-user -a 'administrador' -x 'administrador' RT> 'ramon' chkconfig --add snmpd service snmpd start updatedb RT> unzip RT> /root/.gnome-desktop/instalacion/NETPOLICY/TAR-GZ/net-policy-20030912.tar.gz RT> in /usr/local cd /usr/local/net-policy-20030912 ./configure RT> --with-db=/usr/local/BerkeleyDB.4.1 RT> --with-cxxflags="-I/usr/incl ude/sqlplus" RT> --with-sqluser=root --with-sqlpassword=administrador RT> --sysconfd ir=/etc make su make install RT> cd perl make clean perl Makefile.PL make make install RT> edit /etc/httpd/conf/httpd.conf add: RT> # RT> # keep database connections alive RT> # RT> PerlModule Apache::DBI RT> # RT> # the NET-POLICY configuration manager RT> # RT> <Location /net-policy> RT> SetHandler perl-script PerlHandler RT> NetPolicy::htmlmanager RT> PerlSetVar sql_user root RT> PerlSetVar sql_pass administrador RT> </Location> RT> service httpd restart np-setup -u root -p administrador RT> chkconfig --add net-policy service net-policy start RT> cerberus: RT> ln -s RT> /usr/src/linux-2.4.20-8/configs/kernel-2.4.20-i686.config RT> /usr/src/linux-2.4.20-8/.config DESCOMPRIMIR RT> /root/.gnome-desktop/instalacion/OTROS/TAR-GZ/iptables-1.2.7a.tar.bz2 RT> a /usr/local cd /usr/local/iptables-1.2.7a make RT> install-devel cd RT> /root/.gnome-desktop/instalacion/NETPOLICY/RPMS rpm -i RT> np-cerberus-1.0.1-1.i386.rpm chkconfig --add np-cerberus RT> service np-cerberus start RT> plutoplus: RT> cd /root/.gnome-desktop/instalacion/NETPOLICY/RPMS rpm -i RT> np-plutoplus-1.0.1-1.i386.rpm chkconfig --add np-plutoplus RT> service np-plutoplus start RT> Anything I miss? Something not ok? RT> Wait for your answer RT> Thanks a lot RT> Ramon Tarruella RT> -----Mensaje original----- De: Michael Baer RT> [mailto:[email protected]] Enviado el: lunes, 29 RT> de marzo de 2004 19:20 Para: Ramon Tarruella CC: RT> net-policy-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Asunto: Re: RT> segmentation fault RT> I re-read the error message you sent earlier and another RT> thought occurred to me. Have you run 'make clean; make' in RT> the opensnmp/ directory? The change I sent previously will RT> not likely work without a make clean. Ramon> Michael, the problem is that I need to work with old Ramon> net-policy version : before-mayor-dbchanges, the reason: Ramon> as I understand the new version of net-policy is not Ramon> ready yet, so in resume I need something that works. So, Ramon> if I swith to new net-policy version will I have the Ramon> ability of making the policy configuration and send them Ramon> to the clients? Also what about cerberus and plutoplus, Ramon> will they work with new net-policy version? Ramon> Please understand my actual situation, in some weeks I'am Ramon> going to make a presentation in my university. I will Ramon> show the audience most of the project that are beeing Ramon> developed right now, where IPSEC and security is involved Ramon> and I will mention net-policy too, so I need a version of Ramon> net-policy that works, doesn't matter if it has special Ramon> features. So what can I do at this point: the old version Ramon> is not working because the problem with opensnmp and the Ramon> new version is not ready, I need to show something that Ramon> has this: Ramon> A GUI that configure and distributed the policy to the Ramon> clients Probe using ethereal, that both clients are Ramon> sending the encrypted data(cerberus and plutoplus) Ramon> So in you opinion what can I do? The new net-policy Ramon> version will solve my problem? Ramon> Wait for your answer Ramon> Thanks Ramon> Ramon Tarruella Ramon> -----Mensaje original----- De: Ramon> net-policy-users-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Ramon> [mailto:net-policy-users-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]En Ramon> nombre de Michael Baer Enviado el: lunes, 29 de marzo de Ramon> 2004 14:04 Para: Ramon Tarruella CC: Ramon> [email protected]; Ramon> Net-policy-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Asunto: Re: Ramon> segmentation fault >>>>> "Ramon" == Ramon Tarruella <[email protected]> writes: Ramon> Michael this problem was never solved, I'am working again Ramon> with net-policy, after 5 months, with the Ramon> before-mayor-dbchanges version + with the corrected file Ramon> opensnmp/app/snmpEngine.C:27 from the CVS you told me and Ramon> still receiving segmentation fault for: Ramon> hmmm, there has been a number of changes in OpenSNMP and Ramon> there is a new release, 0.3.7. I'm not seeing this error Ramon> with the current source code that I'm using (and it would Ramon> be difficult for me to try to work with the old source Ramon> code). The problem with using the 0.3.7 version with Ramon> your code is that the CG API's have changed (in fact, the Ramon> CG changes are the main changes between .3.7 and .3.6) Ramon> and a before-major-dbchanges version of np-distd is not Ramon> going to work with the current version of OpenSNMP. Ramon> The current version of np-distd should work with the old Ramon> version of the other net-policy applications (e.g. use a Ramon> current np-distd, current OpenSNMP, and old net-policy Ramon> for everything else). But it may be more work for you to Ramon> try to make this Frankenstein set of code work (and Ramon> difficult for us to help you) than it would be for you to Ramon> switch to using all of the newer source code. -- [email protected] OpenSNMP/NetSNMP ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Net-policy-users mailing list Net-policy-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/net-policy-users ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click