Bug 171192 - snmptrapd keeps dying
Summary: snmptrapd keeps dying
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: net-snmp
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Radek Vokal
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-10-19 09:29 UTC by Nigel Horne
Modified: 2007-11-30 22:11 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2005-10-26 13:28:20 UTC


Attachments (Terms of Use)

Description Nigel Horne 2005-10-19 09:29:25 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

Description of problem:
smtptrapd keeps dying. I realise that as a bug report this isn't much help, but this is a place holder to add more information as I get it, and in case you have any clues why it's so flakey.

Version-Release number of selected component (if applicable):
net-snmp-5.2.1.2-FC3.1

How reproducible:
Always

Steps to Reproduce:
1. /sbin/service snmptrapd start
2. Wait for about 15 minutes
3.
  

Actual Results:  snmptrapd stopped

Expected Results:  snmptrapd should be running.

Additional info:

Comment 1 Nigel Horne 2005-10-19 10:19:17 UTC
This may help you. What does error code 141 mean?


[root@AG-IPMM init.d]# /usr/sbin/snmptrapd -f -Lsd -p /var/run/snmptrapd.pid
[root@AG-IPMM init.d]# echo $?
141
[root@AG-IPMM init.d]#



Comment 2 Nigel Horne 2005-10-19 10:34:22 UTC
I ran it with strace and got this debug output which should help you to track
the problem:
...
fstat64(9, {st_mode=S_IFREG|0644, st_size=96573, ...}) = 0
old_mmap(NULL, 96573, PROT_READ, MAP_PRIVATE, 9, 0) = 0xb7cdc000
close(9)                                = 0
open("/lib/libnss_dns.so.2", O_RDONLY)  = 9
read(9, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\r\0"..., 512) = 
512
fstat64(9, {st_mode=S_IFREG|0755, st_size=22592, ...}) = 0
old_mmap(NULL, 20612, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 9, 0) 
= 0xab5000
old_mmap(0xab9000, 8192, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 9, 0x3000) = 0xab9000
close(9)                                = 0
mprotect(0xab9000, 4096, PROT_READ)     = 0
munmap(0xb7cdc000, 96573)               = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 9
connect(9, {sa_family=AF_INET, sin_port=htons(53), 
sin_addr=inet_addr("195.110.64.205")}, 28) = 0
fcntl64(9, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
gettimeofday({1129717732, 439091}, NULL) = 0
poll([{fd=9, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
send(9, "\\\303\1\0\0\1\0\0\0\0\0\0\003254\0013\003168\003192\7"..., 44, 0) 
= 44
poll([{fd=9, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
ioctl(9, FIONREAD, [121])               = 0
recvfrom(9, "\\\303\201\203\0\1\0\0\0\1\0\0\003254\0013\003168\0031"..., 
1024, 0, {sa_family=AF_INET, sin_port=htons(53), 
sin_addr=inet_addr("195.110.64.205")}, [16]) = 121
close(9)                                = 0
time([1129717732])                      = 1129717732
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
send(7, "<30>Oct 19 11:28:52 snmptrapd[84"..., 318, MSG_NOSIGNAL) = 318
open("/etc/hosts", O_RDONLY)            = 9
fcntl64(9, F_GETFD)                     = 0
fcntl64(9, F_SETFD, FD_CLOEXEC)         = 0
fstat64(9, {st_mode=S_IFREG|0644, st_size=184, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb7cf3000
read(9, "# Do not remove the following li"..., 4096) = 184
read(9, "", 4096)                       = 0
close(9)                                = 0
munmap(0xb7cf3000, 4096)                = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 9
connect(9, {sa_family=AF_INET, sin_port=htons(53), 
sin_addr=inet_addr("195.110.64.205")}, 28) = 0
fcntl64(9, F_GETFL)                     = 0x2 (flags O_RDWR)
fcntl64(9, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
gettimeofday({1129717732, 568905}, NULL) = 0
poll([{fd=9, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1
send(9, "z\r\1\0\0\1\0\0\0\0\0\0\003254\0013\003168\003192\7in-"..., 44, 0) 
= 44
poll([{fd=9, events=POLLIN, revents=POLLIN}], 1, 5000) = 1
ioctl(9, FIONREAD, [121])               = 0
recvfrom(9, "z\r\201\203\0\1\0\0\0\1\0\0\003254\0013\003168\003192\7"..., 
1024, 0, {sa_family=AF_INET, sin_port=htons(53), 
sin_addr=inet_addr("195.110.64.205")}, [16]) = 121
close(9)                                = 0
pipe([9, 11])                           = 0
pipe([12, 13])                          = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
child_tidptr=0xb7ef4708) = 9137
--- SIGCHLD (Child exited) @ 0 (0) ---
close(9)                                = 0
close(13)                               = 0
write(11, "192.168.3.254\nUDP: [192.168.3.25"..., 375) = -1 EPIPE (Broken 
pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
+++ killed by SIGPIPE +++


Comment 3 Nigel Horne 2005-10-19 10:38:36 UTC
My hunch is that snmptrapd can't cope with a traphandler going away, which is
why it receives the sigpipe. snmptrapd should trap SIGPIPE, syslog the error
when it received SIGPIPE, and then continue; it shouldn't crash.

Comment 4 Radek Vokal 2005-10-26 13:28:20 UTC
I didn't manage to reproduce this bug with the latest rawhide net-snmp version.
Seems to be gone there, try to recompile rawhide version for your fc3 (should
work without any problems)


Note You need to log in before you can comment on or make changes to this bug.