Bad File Descriptors

Livio Zanol Puppim <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAOsW+mfqp3qWGqq=p03r7Hpo5k66hqnM9K8dv7oocwCyh4BV3Q@mail.gmail.com>
Hello everybody!

I'm having some issues using net-snmp on freeBSD 11.1. NET-SNMP Version:
5.7.3.

I have some "pass" scripts on my snmpd.conf which call a shell script to
check some information from ipfw.

If I execute the shell script manually the time to response is almost
"instantaneous" if I try to do it a snmpget it takes 1 second or more, and
eventually timeout ...

Sometimes when the daemon keeps running for a long time, it consumes all
CPU and hang.

Using truss "truss -d -D -f -o truss_debug.tmp -p <SNMPD_PID>" I can see a
lot of "ERR # 9 'Bad file descriptor' " messages.

I have found this bug https://sourceforge.net/p/net-snmp/bugs/2596/, that
which is expected to be patched on my net-snmp version.

Can somebody help?

---

partial truss log below:

"
(...)
31737: 8.760443942 0.000050775 getsockname(8,{ AF_INET 0.0.0.0:161
},0x7fffffffe6b8) = 0 (0x0)
31737: 8.760959163 0.000068585 pipe2(0x7ffffffde9d8,0) = 0 (0x0)
31737: 8.761118820 0.000059085 pipe2(0x7ffffffde9d0,0) = 0 (0x0)
31737: 8.761325342 0.000057131 sigprocmask(SIG_BLOCK,{
SIGHUP|SIGINT|SIGQUIT|SIGILL|SIGTRAP|SIGABRT|SIGEMT|SIGFPE|SIGKILL|SIGBUS|SIGSEGV|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2
},{ }) = 0 (0x0)
49714: 8.762116087 0.000000000 <new process>
31737: 8.762141649 0.000709589 fork()            = 49714 (0xc232)
49714: 8.762295510 0.000036108 thr_self(0x804616000) = 0 (0x0)
31737: 8.762325752 0.000043582 sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0)
31737: 8.762519911 0.000098616 close(9)          = 0 (0x0)
49714: 8.762549943 0.000038203 sysarch(AMD64_SET_FSBASE,0x7ffffffc1358) = 0
(0x0)
49714: 8.762716166 0.000080877 sigprocmask(SIG_SETMASK,{ },0x0) = 0 (0x0)
31737: 8.762768128 0.000109651 close(12)         = 0 (0x0)
49714: 8.762878128 0.000029054 close(0)          = 0 (0x0)
31737: 8.762903411 0.000037854 close(10)         = 0 (0x0)
49714: 8.763153793 0.000065512 dup(0x9)          = 0 (0x0)
49714: 8.763300460 0.000054546 close(10)         = 0 (0x0)
49714: 8.763464238 0.000053917 close(1)          = 0 (0x0)
49714: 8.763605318 0.000049867 dup(0xc)          = 1 (0x1)
49714: 8.763740112 0.000048819 close(11)         = 0 (0x0)
49714: 8.763864011 0.000046515 close(2)          = 0 (0x0)
49714: 8.763985326 0.000046445 dup(0x1)          = 2 (0x2)
49714: 8.764134158 0.000047911 getdtablesize()   = 1886130 (0x1cc7b2)
49714: 8.764255961 0.000047073 close(1886129)    ERR#9 'Bad file descriptor'
49714: 8.764371200 0.000041276 close(1886128)    ERR#9 'Bad file descriptor'
49714: 8.764493283 0.000047422 close(1886127)    ERR#9 'Bad file descriptor'
49714: 8.764609709 0.000041276 close(1886126)    ERR#9 'Bad file descriptor'
49714: 8.764718243 0.000040369 close(1886125)    ERR#9 'Bad file descriptor'
49714: 8.764827125 0.000041276 close(1886124)    ERR#9 'Bad file descriptor'
49714: 8.764935869 0.000041346 close(1886123)    ERR#9 'Bad file descriptor'
49714: 8.765045729 0.000041276 close(1886122)    ERR#9 'Bad file descriptor'
49714: 8.765160549 0.000039949 close(1886121)    ERR#9 'Bad file descriptor'
49714: 8.765272435 0.000038343 close(1886120)    ERR#9 'Bad file descriptor'
49714: 8.765375940 0.000038343 close(1886119)    ERR#9 'Bad file descriptor'
49714: 8.765494321 0.000045397 close(1886118)    ERR#9 'Bad file descriptor'
(...)
"


-- 
[]'s

Lívio Zanol Puppim

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.