[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-bugs
Subject:    [ net-snmp-Bugs-3495624 ] exec does not call program anymore on large system timeshift
From:       SourceForge.net <noreply () sourceforge ! net>
Date:       2012-03-08 15:41:07
Message-ID: E1S5fSn-0003J1-Rw () sfs-ml-1 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Bugs item #3495624, was opened at 2012-02-29 02:48
Message generated for change (Comment added) made by 
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3495624&group_id=12694

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
> Status: Closed
> Resolution: Fixed
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Nobody/Anonymous (nobody)
Summary: exec does not call program anymore on large system timeshift

Initial Comment:
Running a smnpd 5.4.2.1 on openSUSE 11.1 (i586) "Linux oms0 2.6.27.7-9-pae #1 SMP \
2008-12-04 18:10:04 +0100 i686 i686 i386 GNU/Linux" calling scripts via extend fails \
if a large shift in system time occurs. It is sending out old values (from cache?!) \
even it is written in documentation there is no cache for exec. That is correct until \
time shift occurs. From that point on snmpd is NEVER ever calling all of that \
programs anymore!

The scenario for that time shift is PC has to be battery less (no CMOS baterry), so \
the kernel is setting date to dec. 2008 and ntp later on ( after around two minutes) \
to current time 2012. If snmpd is started up and initializing with 2008 the test case \
fails.

1) snmpd.conf 
exec disk0 /bin/sh /root/oms/SNMPDaemon/bin/getDiskState.sh -drive 0
exec disk1 /bin/sh /root/oms/SNMPDaemon/bin/getDiskState.sh -drive 1
exec raidUnit /bin/sh /root/oms/SNMPDaemon/bin/getRAIDUnitState.sh

(simple bash script polling raid configuration)

2.1) strace for good mode:
write(3, "Connection from UDP: [192.168.192.5]->[192.168.192.5]:-30573\n", 61) = 61
gettimeofday({1330434179, 177301}, NULL) = 0
gettimeofday({1330434179, 177394}, NULL) = 0
pipe([10, 11])                          = 0
pipe([12, 13])                          = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, \
child_tidptr=0xb740b968) = 19993 close(10)                               = 0
close(13)                               = 0
close(11)                               = 0
select(13, [12], NULL, NULL, {1, 0})    = 1 (in [12], left {0, 888000})
read(12, "OK\n", 102399)                = 3
select(13, [12], NULL, NULL, {1, 0})    = 1 (in [12], left {0, 996000})
--- SIGCHLD (Child exited) @ 0 (0) ---
read(12, "", 102396)                    = 0
waitpid(19993, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG) = 19993
close(12)                               = 0
gettimeofday({1330434179, 293306}, NULL) = 0
sendmsg(9, {msg_name(16)={sa_family=AF_INET, sin_port=htons(34963), \
sin_addr=inet_addr("192.168.192.5")}, \
msg_iov(1)=[{"01\2\1\1\4\vsnmpthaless\242\37\2\2De\2\1\0\2\1\0000\0230\21\6\v+\6\1\4\1\217e\10\1e\3\4\2OK", \
51}], msg_controllen=24, {cmsg_len=24, cmsg_level=SOL_IP, cmsg_type=, ...}, \
msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 51 gettimeofday({1330434179, 293561}, \
NULL) = 0 gettimeofday({1330434179, 293608}, NULL) = 0
gettimeofday({1330434179, 293648}, NULL) = 0
select(10, [4 8 9], [], [], {4, 546572}) = 1 (in [9], left {4, 508000})

2.2) strace for wrong working:
write(3, "Connection from UDP: [192.168.192.13]->[192.168.192.5]:-17028\n", 62) = 62
gettimeofday({1330434179, 315632}, NULL) = 0
gettimeofday({1330434179, 315716}, NULL) = 0
sendmsg(9, {msg_name(16)={sa_family=AF_INET, sin_port=htons(48508), \
sin_addr=inet_addr("192.168.192.5")}, \
msg_iov(1)=[{"01\2\1\1\4\vsnmpthaless\242\37\2\2=\200\2\1\0\2\1\0000\0230\21\6\v+\6\1\4\1\217e\10\1e\1\4\2OK", \
51}], msg_controllen=24, {cmsg_len=24, cmsg_level=SOL_IP, cmsg_type=, ...}, \
msg_flags=0}, MSG_DONTWAIT|MSG_NOSIGNAL) = 51 gettimeofday({1330434179, 315917}, \
NULL) = 0 gettimeofday({1330434179, 315958}, NULL) = 0
gettimeofday({1330434179, 315996}, NULL) = 0
select(10, [4 8 9], [], [], {20898, 502580}) = 1 (in [9], left {20898, 502580})


3.1) external view via script (good case):
oms0:~/oms/SNMPDaemon # while [[ 1 ]];do fuser bin/getRAIDUnitState.sh ;done
bin/getRAIDUnitState.sh: 15022
bin/getRAIDUnitState.sh: 15022
bin/getRAIDUnitState.sh: 15022
bin/getRAIDUnitState.sh: 15338
bin/getRAIDUnitState.sh: 15338
bin/getRAIDUnitState.sh: 15338
bin/getRAIDUnitState.sh: 15658
bin/getRAIDUnitState.sh: 15658
bin/getRAIDUnitState.sh: 15658
bin/getRAIDUnitState.sh: 15658

3.2) bad case:
oms1:~/oms/SNMPDaemon # while [[ 1 ]];do lsof|egrep '(getRAID|getDisk)' ;done
<no output>

4) a log file with "-Dhelper,nsExtendTable,cache_timer,verbose" as attachement

Thank you for helping

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

> Comment By: https://www.google.com/accounts ()
Date: 2012-03-08 07:41

Message:
This effect does not occur in the 5.8.dev branch neither nor in the 5.7.1
latest official source release.

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

Comment By: https://www.google.com/accounts ()
Date: 2012-03-08 07:41

Message:
Thanks for the bug report!
We've fixed the problem in the 5.7.x code branch  and the main development
tree, so it should be fixed in future releases of the Net-SNMP package.

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

Comment By:  (bvassche)
Date: 2012-02-29 03:07

Message:
A patch that should fix this has been checked in a few days ago on the
master branch. It would help if you could test the code on the master
branch and see if it fixes this issue.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3495624&group_id=12694

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Net-snmp-bugs mailing list
Net-snmp-bugs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-bugs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic