Zhouhuai Shen | 1 Jul 04:17 2008
Picon

Core dump in net-snmp 5.3.1 - Linux

Hi,

I have seen a core dump when I ran some tests on net-snmp 5.3.1. Does anyone know about this problem and if there is already a patch to fix this issue? The following is the core dump:

--------------------------------------------------------------------------------

Thread Backtraces:

Thread 1 (process 2465):

#0  netsnmp_add_varbind_to_cache (asp=0x100b58d8, vbcount=1,

    varbind_ptr=0x100a21a0, tp=0xffffffff) at snmp_agent.c:1869

#1  0x30153c88 in netsnmp_reassign_requests (asp=0x100b58d8)

    at snmp_agent.c:2337

#2  0x30153e78 in handle_getnext_loop (asp=0xffffffff) at snmp_agent.c:2901

#3  0x30155298 in check_delayed_request (asp=0x100b58d8) at snmp_agent.c:2684

#4  0x301553dc in netsnmp_check_outstanding_agent_requests ()

    at snmp_agent.c:2579

#5  0x30155708 in netsnmp_remove_delegated_requests_for_session (

    sess=0x100b58d8) at snmp_agent.c:1435

#6  0x301732e4 in close_agentx_session (session=0x100b58d8, sessid=-1)

    at mibgroup/agentx/master_admin.c:154

#7  0x3015f5c4 in agentx_got_response (operation=269096904,

    session=0x100b58d8, reqid=<value optimized out>,

    pdu=<value optimized out>, magic=<value optimized out>)

    at mibgroup/agentx/master.c:248

#8  0x301e2e74 in snmp_sess_timeout (sessp=<value optimized out>)

    at snmp_api.c:6206

#9  0x301e2f44 in snmp_timeout () at snmp_api.c:6018

#10 0x10004c0c in main (argc=269087568, argv=<value optimized out>)

    at snmpd.c:1244

--------------------------------------------------------------------------------

Cheers, Henry


Click here Buy, rent, invest property online today.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
gauravmeh2004 | 1 Jul 06:01 2008

Re: Multithreaded : IS IT Safe to create new thread for updating CONTAINERS

I agree to your point that we need to take lock on every place of my mib module (whose code is generated by
mib2c) which access the CONTAINER (*_set_reserve1() , *_set_reserve2()....., *_set_free(), *_set_undo(),*_get_value()...)
But could u just let me know that do in any case locking to be done in netsnmp code and api's.

Br
Gaurav
----- Original Message -----
From: Dave Shield <D.T.Shield <at> liverpool.ac.uk>
To: gauravmeh2004 <at> indiatimes.com
Cc: net-snmp-coders <at> lists.sourceforge.net
Sent: Mon, 30 Jun 2008 13:38:44 +0530 (IST)
Subject: Re: Multithreaded : IS IT Safe to create new thread for updating CONTAINERS

2008/6/30  <gauravmeh2004 <at> indiatimes.com>:
> ..... But i am not sure where all to use mutexs.
> I am using mutexes in following places :
> updateCurrentAlarmTable_MyOwnMethod()
> initialize_table_currentAlarmTable()
>
> Do i also need to take lock on following methods provided by netsnmp
> currentAlarmTable_set_reserve1()
> currentAlarmTable_set_reserve2()
> currentAlarmTable_set_action()
> currentAlarmTable_set_commit()
> currentAlarmTable_set_free()
> currentAlarmTable_set_undo()
> currentAlarmTable_get_value()
> as they also access CONTAINER

Bear in mind that I am not an expert in multi-threaded programming.
But I would expect that you would need a mutex lock around *every*
bit of code that works with row data obtained from the table container,

That's the code in your MIB module *and* any similar code within
the relevant handler routines.

I am not familiar with the module framework you are using,
but I would expect that most of the places you mention would
indeed need to be protected.

  The question to bear in mind throughout is:

        "would it matter if  updateCurrentAlarmTable_MyOwnMethod()
        cleared all the rows from the table at this precise moment?"

If the table being emptied would break a given section of code,
then that code needs to be protected.

Or at least, that's my understanding.
Someone who actually knows about such things might be
able to advise you differently.

Dave

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Zhouhuai Shen | 1 Jul 02:25 2008
Picon

coredump in the function netsnmp_add_varbind_to_cache()

Hi,

I had a coredump when I run net-snmp 5.3.1. Does anyone know about this issue and any possible patch has been done to fix this? My coredump is as the following:

=====================================

#0  netsnmp_add_varbind_to_cache (asp=0x100b58d8, vbcount=1,

    varbind_ptr=0x100a21a0, tp=0xffffffff) at snmp_agent.c:1869

#1  0x30153c88 in netsnmp_reassign_requests (asp=0x100b58d8)

    at snmp_agent.c:2337

#2  0x30153e78 in handle_getnext_loop (asp=0xffffffff) at snmp_agent.c:2901

#3  0x30155298 in check_delayed_request (asp=0x100b58d8) at snmp_agent.c:2684

#4  0x301553dc in netsnmp_check_outstanding_agent_requests ()

    at snmp_agent.c:2579

#5  0x30155708 in netsnmp_remove_delegated_requests_for_session (

    sess=0x100b58d8) at snmp_agent.c:1435

#6  0x301732e4 in close_agentx_session (session=0x100b58d8, sessid=-1)

    at mibgroup/agentx/master_admin.c:154

#7  0x3015f5c4 in agentx_got_response (operation=269096904,

    session=0x100b58d8, reqid=<value optimized out>,

    pdu=<value optimized out>, magic=<value optimized out>)

    at mibgroup/agentx/master.c:248

#8  0x301e2e74 in snmp_sess_timeout (sessp=<value optimized out>)

    at snmp_api.c:6206

#9  0x301e2f44 in snmp_timeout () at snmp_api.c:6018

#10 0x10004c0c in main (argc=269087568, argv=<value optimized out>)

    at snmpd.c:1244

================================================

Thanks a lot, Henry

Download today! Free Windows Live software. Chat, search, share pics and more.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Dave Shield | 1 Jul 10:18 2008
Picon

Re: Net SNMP 5.4.1

2008/6/30 Umesh Kamath <umkamath <at> in.ibm.com>:

> 1)  Apart from installed directory ( /etc/iexpress/net-snmp-5.4.1 ), which
> are all the files that i need to copy from Development machine to test and
> Prod.

Assuming that you configured the build environment using

   configure --prefix=/etc/iexpress/net-snmp-5.4.1

then copying this subtree to the target system should be sufficient.
Otherwise, watch the output of "make install" to see the full list
of files to be copied.

> 2) Apart from /usr/sbin/snmptrapd and  /usr/sbin/snmpd symbolic files ,
> which are all symbolic(link) files  generated during  installation ??

Hmmm...   you indicated above that you've installed the software into
/etc/iexpress.    So how come you've got symbolic links from /usr/bin ?

It sounds as if you've got some sort of special installation setup,
not a standard

    configure ; make ; make install

In which case, you need to talk to the people who are responsible for
this mechanism.   We can't advise on environments that we know
nothing about.

> 3) How   i  can make assure that copying of installed directory works fine.

By running tests on the final system :-)

Dave

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Dave Shield | 1 Jul 10:28 2008
Picon

Re: DisMan mteTriggers Not Firing

2008/6/30 Jamuel Starkey <jstarkey <at> visagemobile.com>:

> To trap when a process is in error, then look for prErrorFlag !=0:
> monitor -o prName -o prErrMessage "procTable" prErrorFlag == 0

I presume you mean "prErrorFlag != 0",  but otherwise, OK.

> To look for error-clear, then look for prErrorFlag == 0

Yup

> monitor -S -o prName "procTable" prErrorFlag == 0

Close....

> /etc/snmp/snmpd.conf: line 78: Error: duplicate trigger name
>
> So I'm guessing I can't have two monitors for the same "procTable" OID.

Almost.
"procTable" is not an OID - it's a textual identifier - a name for the trigger.
And this name must be unique.

Try
    monitor -o prName -o prErrMessage "procTable" prErrorFlag == 0
    monitor -S -o prName "procTable reset" prErrorFlag == 0

> Also does the monitor expression syntax allow for logical OR or AND
> conditionals e.g.
> monitor "procTable" prErrorFlag !=0 && prNames == "sendmail"

No.
The DisMan Event MIB work with a single comparison of one OID
(exact or wildcarded) against a constant value (typically numeric).

Handling more complex expressions is the role of the DisMan
Expression MIB, which would allow you to combine different
tests (of related OIDs) into a single expression.
   The result of that could then be used in an Event-MIB comparison.

There is a preliminary implementation of the Expression MIB
in the Net-SNMP agent, but I can't remember how complete it is.
Probably not very.
   I seem to spend all my time answering questions on these lists,
which doesn't leave much room to developing new code :-(

Dave

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Dave Shield | 1 Jul 10:35 2008
Picon

Re: Multithreaded : IS IT Safe to create new thread for updating CONTAINERS

2008/7/1  <gauravmeh2004 <at> indiatimes.com>:
> I agree to your point that we need to take lock on every place of my mib module
> (whose code is generated by mib2c) which access the CONTAINER

Not just your code - you will need to look at any relevant helpers as well.
Remember that the Net-SNMP agent is not designed for multi-threaded
operation, so you cannot assume that *any* code is thread-safe.

> But could u just let me know that do in any case locking to be done in netsnmp code and api's.

No - I cannot provide any more assistance on this issue.
You are taking the agent outside the scope of its current design,
so you are in uncharted territory.    I am already committing more
time than I can realistically spare to answering questions on this list.
   Adding mutli-threaded support (even in a very restricted way)
is a non-trivial task, and one that I have no experience of.

If you feel that your coding experience is up to this, then it would be
very useful to hear of your experiences, so that others can learn
from them.

   If you suspect that this may be beyond your capabilities, then
you should probably consider hiring a consultant to do the work
for you.   But you cannot reasonably expect us to provide this sort
of consultancy for free.

You are the one that wants multi-threaded support.
The onus is therefore on you to provide it.

Dave

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Dave Shield | 1 Jul 13:18 2008
Picon

Re: undefined reference when compiled net-snmp-5.4.1 with flag --without-kmem-usage on FreeBSD 6.2

2008/6/25 Xinran Wang <xinrwang <at> cisco.com>:
> I configured net-snmp 5.4.1 on FreeBSD 6.2 with the following command "
>
> "./configure --disable-embedded-perl --disable-privacy
> --without-kmem-usage --prefix=/usr/local "
>
> And got compilation error ....
> How to fix this ?

I've done some investigation, and it appears that the MIB module
'host/hr_swrun' relies on certain kernel-processing code, which
is omitted when '--without-kmem-usage' is specified.

The simplest solution in the short-term would probably
be to run:

./configure --disable-embedded-perl --disable-privacy
        --without-kmem-usage --prefix=/usr/local
        --with-out-mib-modules=host/hr_swrun

Untangling the hr_swrun code properly is going to take
a bit longer.

Dave

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Yu Watanabe | 1 Jul 14:44 2008

Monitoring disk usage percentage on Windows

TO : ALL

Hello 

I would like to monitor following statistics on Windows XP.
    1. CPU usage (percentage)
    2. Disk usage (percentage)
    3. Memory usage (percentage)

However, there seems to be any tokens which corresponds
to these criteria when I see "snmp -H" command.
( It seems to be possible on linux )

Could someone give me an advice with this ?

Best Regards,
Yu Watanabe

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Yu Watanabe | 1 Jul 14:47 2008

Monitoring stats on Windows

Sorry I have written a wrong subject.

I have modified to the correct subject.

Yu Watanabe さんは書きました:
>TO : ALL
>
>Hello 
>
>I would like to monitor following statistics on Windows XP.
>    1. CPU usage (percentage)
>    2. Disk usage (percentage)
>    3. Memory usage (percentage)
>
>However, there seems to be any tokens which corresponds
>to these criteria when I see "snmp -H" command.
>( It seems to be possible on linux )
>
>Could someone give me an advice with this ?
>
>Best Regards,
>Yu Watanabe
>
>
>-------------------------------------------------------------------------
>Check out the new SourceForge.net Marketplace.
>It's the best place to buy or sell services for
>just about anything Open Source.
>http://sourceforge.net/services/buy/index.php
>_______________________________________________
>Net-snmp-users mailing list
>Net-snmp-users <at> lists.sourceforge.net
>Please see the following page to unsubscribe or change other options:
>https://lists.sourceforge.net/lists/listinfo/net-snmp-users
>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Terry Martin | 1 Jul 14:45 2008

RE: Monitoring disk usage percentage on Windows

Nmnjmnmiikikjn bjtreq

Sent by Good Messaging (www.good.com)


 -----Original Message-----
From:   Yu Watanabe [mailto:yu.watanabe <at> jp.fujitsu.com]
Sent:   Tuesday, July 01, 2008 08:41 AM Eastern Standard Time
To:     net-snmp-users <at> lists.sourceforge.net
Subject:        Monitoring disk usage percentage on Windows

TO : ALL

Hello

I would like to monitor following statistics on Windows XP.
    1. CPU usage (percentage)
    2. Disk usage (percentage)
    3. Memory usage (percentage)

However, there seems to be any tokens which corresponds
to these criteria when I see "snmp -H" command.
( It seems to be possible on linux )

Could someone give me an advice with this ?

Best Regards,
Yu Watanabe


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users <at> lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Gmane