From: Ben Lentz <BLentz@channing-bete.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter@vger.kernel.org
Subject: Re: conntrack accounting
Date: Thu, 03 Jan 2008 13:12:11 -0500 [thread overview]
Message-ID: <477D257B.4060901@channing-bete.com> (raw)
In-Reply-To: <477D0553.4010906@netfilter.org>
> I just committed a patch to SVN which implements this for the statistics
> mode. Have a look at the doc/stats/conntrackd.conf example file and
> enable logging to give it a try. This will be available in the upcoming
> conntrack-tool 0.9.6 release. Don't forget to run conntrackd with the -S
> option.
>
This sounds great! However, I appear to be having some trouble. I
checked out, built, and installed conntrack-tools 0.9.6 7164 and
libnetfilter_conntrack-0.0.87 7164 and am running conntrackd -S. I still
have libnfnetlink-0.0.30. I don't seem to be getting any statistics
logging either in Syslog mode or LogFile mode.
- If I set the Stats section to Syslog on, it seems to crash on the
first attempt to log:
select(5, [3 4], NULL, NULL, {0, 199092}) = 1 (in [4], left {0, 111000})
rt_sigprocmask(SIG_BLOCK, [INT TERM CHLD], NULL, 8) = 0
recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000004},
msg_iov(1)=[...], msg_controllen=0, msg_flags=0}, MSG_PEEK) = 164
recvfrom(4, ""..., 8192, 0, {sa_family=AF_NETLINK, pid=0,
groups=00000004}, [12]) = 164
time(NULL) = 1199383171
open("/etc/localtime", O_RDONLY) = 6
fstat64(6, {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
fstat64(6, {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f97000
read(6, ""..., 4096) = 3519
close(6) = 0
munmap(0xb7f97000, 4096) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
- If I set the Stats section to Logfile on (or LogFile filename), it
doesn't crash, but generates a similar error each time it goes to log a
connection. I can correlate connections about to close with
$ sudo watch --interval=0.1 'cat /proc/net/ip_conntrack | grep
"^[a-z]\{3\} *[0-9]* *0"'
to errors in a strace on conntrackd:
rt_sigprocmask(SIG_BLOCK, [INT TERM CHLD], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [INT TERM CHLD], NULL, 8) = 0
gettimeofday({1199383388, 670177}, NULL) = 0
gettimeofday({1199383388, 670286}, NULL) = 0
select(5, [3 4], NULL, NULL, {0, 198979}) = 1 (in [4], left {0, 47000})
rt_sigprocmask(SIG_BLOCK, [INT TERM CHLD], NULL, 8) = 0
recvmsg(4, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000004},
msg_iov(1)=[...], msg_controllen=0, msg_flags=0}, MSG_PEEK) = 164
recvfrom(4, ""..., 8192, 0, {sa_family=AF_NETLINK, pid=0,
groups=00000004}, [12]) = 164
recvfrom(4, 0xbfae01e0, 8192, 0, 0xbfae01ac, 0xbfae01b8) = -1 EAGAIN
(Resource temporarily unavailable)
rt_sigprocmask(SIG_UNBLOCK, [INT TERM CHLD], NULL, 8) = 0
gettimeofday({1199383388, 822810}, NULL) = 0
gettimeofday({1199383388, 822856}, NULL) = 0
Configuration file is as follows:
$ grep -v '^$\|^#\|^\W#' /etc/conntrackd/conntrackd.conf
General {
HashSize 8192
HashLimit 65535
LogFile on
Syslog off
LockFile /var/lock/conntrack.lock
UNIX {
Path /tmp/sync.sock
Backlog 20
}
SocketBufferSize 262142
SocketBufferSizeMaxGrown 655355
}
Stats {
LogFile on
Syslog off
}
IgnoreTrafficFor {
}
IgnoreProtocol {
}
Platform is CentOS 5, kernel 2.6.18.
Please let me know if I've done something dumb or if there's anything I
can do to provide more useful debugging information. It's been a long
while since I've been in gdb, so I might need some help with that...
next prev parent reply other threads:[~2008-01-03 18:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-30 2:39 conntrack accounting Ben Lentz
2008-01-03 15:54 ` Pablo Neira Ayuso
2008-01-03 18:12 ` Ben Lentz [this message]
2008-01-04 3:25 ` Ben Lentz
2008-01-04 21:35 ` Ben Lentz
2008-01-05 12:39 ` Pablo Neira Ayuso
[not found] ` <477DA84A.3030304@channing-bete.com>
[not found] ` <477EAEF0.4000300@channing-bete.com>
2008-01-05 12:45 ` Pablo Neira Ayuso
2008-01-05 14:22 ` Ben Lentz
2008-01-05 14:36 ` Pablo Neira Ayuso
2008-01-05 16:24 ` Jan Engelhardt
2008-01-05 16:44 ` Pablo Neira Ayuso
2008-01-05 18:52 ` Ben Lentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=477D257B.4060901@channing-bete.com \
--to=blentz@channing-bete.com \
--cc=netfilter@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.