Your message dated Tue, 21 Oct 2014 15:52:15 +0000 with message-id <[email protected]> and subject line Bug#736531: fixed in nfdump 1.6.12-0 has caused the Debian Bug report #736531, regarding [nfdump] external command and expiration job for nfcapd are executed only once to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 736531: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=736531 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: nfdump Version: 1.6.8p1-1 Severity: serious Tags: patch --- Please enter the report below this line. --- Hello, I configured nfcapd to run expiration and external command on every new file it creates (options -x and -e) however, this operation runs only once (first time) and all consequent file rotations do not execute external command and expiration process: Jan 22 12:39:38 zabbix nfcapd[31437]: Init v9: Max number of v9 tags: 75 Jan 22 12:39:38 zabbix nfcapd[31437]: Init IPFIX: Max number of IPFIX tags: 62 Jan 22 12:39:38 zabbix nfcapd[31437]: Process_v5: New exporter: SysID: 1, engine id 0, type 0, IP: 138.34.6.221, Sampling Mode: 0, Sampling Interval: 1 Jan 22 12:40:38 zabbix nfcapd[31437]: Ident: 'none' Flows: 2622, Packets: 12782, Bytes: 2807144, Sequence Errors: 3, Bad Packets: 0 Jan 22 12:40:38 zabbix nfcapd[31437]: Signal launcher Jan 22 12:40:38 zabbix nfcapd[31437]: Total ignored packets: 0 Jan 22 12:40:38 zabbix nfcapd[31438]: Launcher: Wakeup Jan 22 12:40:38 zabbix nfcapd[31438]: Launcher: ident: none run command: '/root/perl_prog/nf2pg/nf2pg.pl /var/cache/nfdump/nfcapd.201401221239' Jan 22 12:40:38 zabbix nfcapd[31438]: Launcher: fork child. Jan 22 12:40:38 zabbix nfcapd[31438]: Launcher: child exec done. Jan 22 12:40:39 zabbix nfcapd[31438]: Run expire on '/var/cache/nfdump' Jan 22 12:40:39 zabbix nfcapd[31438]: Limits: Filesize <none>, Lifetime 604800 = 1.0 weeks, Watermark: 95% Jan 22 12:40:39 zabbix nfcapd[31438]: Current size: 241070080 = 229.9 MB, Current lifetime: 67178 = 18.7 hours, Number of files: 230 Jan 22 12:40:39 zabbix nfcapd[31438]: expire completed - nothing to expire. Jan 22 12:40:39 zabbix nfcapd[31438]: Launcher: Sleeping Jan 22 12:40:41 zabbix nfcapd[31438]: Launcher: Wakeup Jan 22 12:40:41 zabbix nfcapd[31438]: Launcher: Sleeping Jan 22 12:41:38 zabbix nfcapd[31437]: Ident: 'none' Flows: 2203, Packets: 22807, Bytes: 2994566, Sequence Errors: 0, Bad Packets: 0 Jan 22 12:41:38 zabbix nfcapd[31437]: Signal launcher Jan 22 12:41:38 zabbix nfcapd[31437]: Total ignored packets: 0 Jan 22 12:41:38 zabbix nfcapd[31438]: Launcher: Wakeup Jan 22 12:41:38 zabbix nfcapd[31438]: Launcher: Sleeping Jan 22 12:42:38 zabbix nfcapd[31437]: Ident: 'none' Flows: 2513, Packets: 11841, Bytes: 3113153, Sequence Errors: 3, Bad Packets: 0 Jan 22 12:42:38 zabbix nfcapd[31437]: Signal launcher Jan 22 12:42:38 zabbix nfcapd[31437]: Total ignored packets: 0 Jan 22 12:42:38 zabbix nfcapd[31438]: Launcher: Wakeup Jan 22 12:42:38 zabbix nfcapd[31438]: Launcher: Sleeping I found that the following changes in bin/launcher.c fix that behaviour: _patch_BEGIN_ diff -Naur nfdump-1.6.8p1/bin/launch.c modified/bin/launch.c --- nfdump-1.6.8p1/bin/launch.c 2012-03-09 10:49:39.000000000 -0500 +++ modified/bin/launch.c 2014-01-22 17:59:28.789367209 -0500 @@ -95,17 +95,21 @@ case SIGTERM: // in case the process will not terminate, we // kill the process directly after the 2nd TERM signal + syslog(LOG_DEBUG, "Launcher: SIGTERM"); if ( done > 1 ) exit(234); done++; - break; + return; case SIGHUP: + syslog(LOG_DEBUG, "Launcher: SIGHUP"); launch = 1; - break; + return; case SIGCHLD: + syslog(LOG_DEBUG, "Launcher: SIGCHILD"); child_exit++; - break; + return; } +return; } /* End of IntHandler */ @@ -370,6 +374,15 @@ while ( !done ) { // sleep until we get signaled syslog(LOG_DEBUG, "Launcher: Sleeping"); + //this helps to run signal handler everytime, don't know why :( + act.sa_handler = SignalHandler; + sigemptyset(&act.sa_mask); + act.sa_flags = 0; + sigaction(SIGCHLD, &act, NULL); // child process terminated + sigaction(SIGTERM, &act, NULL); // we are done + sigaction(SIGINT, &act, NULL); // we are done + sigaction(SIGHUP, &act, NULL); // run command + //_END_ of this helps to run signal handler everytime, don't know why :( select(0, NULL, NULL, NULL, NULL); syslog(LOG_DEBUG, "Launcher: Wakeup"); if ( launch ) { // SIGHUP _patch_END_ after this patch applied nfcapd log looks like: Jan 23 07:41:25 zabbix nfcapd[26470]: Ident: 'none' Flows: 11597, Packets: 138316, Bytes: 15393459, Sequence Errors: 3, Bad Packets: 0 Jan 23 07:41:25 zabbix nfcapd[26470]: Signal launcher Jan 23 07:41:25 zabbix nfcapd[26470]: Total ignored packets: 0 Jan 23 07:41:25 zabbix nfcapd[26471]: Launcher: SIGHUP Jan 23 07:41:25 zabbix nfcapd[26471]: Launcher: Wakeup Jan 23 07:41:25 zabbix nfcapd[26471]: Launcher: ident: none run command: '/root/perl_prog/nf2pg/nf2pg.pl /var/cache/nfdump/nfcapd.201401230736' Jan 23 07:41:25 zabbix nfcapd[26471]: Launcher: fork child. Jan 23 07:41:25 zabbix nfcapd[26471]: Launcher: child exec done. Jan 23 07:41:26 zabbix nfcapd[26471]: Run expire on '/var/cache/nfdump' Jan 23 07:41:26 zabbix nfcapd[26471]: Limits: Filesize <none>, Lifetime 604800 = 1.0 weeks, Watermark: 95% Jan 23 07:41:26 zabbix nfcapd[26471]: Current size: 432570368 = 412.5 MB, Current lifetime: 135385 = 1.6 days, Number of files: 454 Jan 23 07:41:26 zabbix nfcapd[26471]: expire completed - nothing to expire. Jan 23 07:41:26 zabbix nfcapd[26471]: Launcher: Sleeping Jan 23 07:41:34 zabbix nfcapd[26471]: Launcher: SIGCHILD Jan 23 07:41:34 zabbix nfcapd[26471]: Launcher: Wakeup Jan 23 07:41:34 zabbix nfcapd[26471]: laucher child exit 1 childs. Jan 23 07:41:34 zabbix nfcapd[26471]: launcher child 24631 exit status: 0 Jan 23 07:41:34 zabbix nfcapd[26471]: laucher waiting childs done. 0 childs Jan 23 07:41:34 zabbix nfcapd[26471]: Launcher: Sleeping Jan 23 07:46:25 zabbix nfcapd[26470]: Ident: 'none' Flows: 13237, Packets: 101872, Bytes: 28040647, Sequence Errors: 3, Bad Packets: 0 Jan 23 07:46:25 zabbix nfcapd[26470]: Signal launcher Jan 23 07:46:25 zabbix nfcapd[26470]: Total ignored packets: 0 Jan 23 07:46:25 zabbix nfcapd[26471]: Launcher: SIGHUP Jan 23 07:46:25 zabbix nfcapd[26471]: Launcher: Wakeup Jan 23 07:46:25 zabbix nfcapd[26471]: Launcher: ident: none run command: '/root/perl_prog/nf2pg/nf2pg.pl /var/cache/nfdump/nfcapd.201401230741' Jan 23 07:46:25 zabbix nfcapd[26471]: Launcher: fork child. Jan 23 07:46:25 zabbix nfcapd[26471]: Launcher: child exec done. Jan 23 07:46:26 zabbix nfcapd[26471]: Run expire on '/var/cache/nfdump' Jan 23 07:46:26 zabbix nfcapd[26471]: Limits: Filesize <none>, Lifetime 604800 = 1.0 weeks, Watermark: 95% Jan 23 07:46:26 zabbix nfcapd[26471]: Current size: 433582080 = 413.5 MB, Current lifetime: 135685 = 1.6 days, Number of files: 455 Jan 23 07:46:26 zabbix nfcapd[26471]: expire completed - nothing to expire. Jan 23 07:46:26 zabbix nfcapd[26471]: Launcher: Sleeping I found that without this change SIGHUP handler is called only for the first time, it could be silly change, since I'm not a C developer at all, but it does its job. First block of changes and syslog() calls is mostly for debugging, which signal is sent to a process. it can be ignored, same as 'break's vs 'return's. Thanks Tim --- System information. --- Architecture: amd64 Kernel: Linux 3.11-2-amd64 Debian Release: jessie/sid 800 unstable http.us.debian.org 800 unstable deb-multimedia.org 500 stable dl.google.com 1 experimental http.us.debian.org --- Package information. --- Depends (Version) | Installed =========================- -============= libc6 (>= 2.4) | librrd4 (>= 1.3.0) | zlib1g (>= 1:1.1.4) | lsb-base (>= 3.0-6) | Package's Recommends field is empty. Package's Suggests field is empty.
--- End Message ---
--- Begin Message ---Source: nfdump Source-Version: 1.6.12-0 We believe that the bug you reported is fixed in the latest version of nfdump, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Jaakko Niemi <[email protected]> (supplier of updated nfdump package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.8 Date: Tue, 21 Oct 2014 18:16:49 +0300 Source: nfdump Binary: nfdump nfdump-dbg nfdump-flow-tools nfdump-sflow Architecture: source amd64 Version: 1.6.12-0 Distribution: unstable Urgency: medium Maintainer: Erik Wenzel <[email protected]> Changed-By: Jaakko Niemi <[email protected]> Description: nfdump - netflow capture daemon nfdump-dbg - netflow capture daemon tools compiled with debugging symbols nfdump-flow-tools - import from flow-tools nfdump-sflow - sflow collector daemon Closes: 736531 754782 Changes: nfdump (1.6.12-0) unstable; urgency=medium . * Non maintainer upload * New upstream release with many critical fixes (Closes: #754782, #736531) * Add services/unit file Checksums-Sha1: c933409ddd09e9c605e10747c9e82572aca7cd8f 1375 nfdump_1.6.12-0.dsc 46f9e65d81f458c4699e93dac551c5e475a0eb05 733604 nfdump_1.6.12.orig.tar.gz 14a4412560160910bd594dc50d4167649e976de8 7508 nfdump_1.6.12-0.debian.tar.xz c9a496ad5f71797bacd09094a859529a1aaa4e89 246884 nfdump_1.6.12-0_amd64.deb 94e3409349502c0ec86a9e408636f6f569eece37 551632 nfdump-dbg_1.6.12-0_amd64.deb de0177e7ea5e9bf10efb0fc49e32ced655f90cf1 68342 nfdump-flow-tools_1.6.12-0_amd64.deb 39d0549639035036c5f2d6b5af7a2bf664d03119 88634 nfdump-sflow_1.6.12-0_amd64.deb Checksums-Sha256: 73d2e02ff9e5a88891f8789f533dc8e28feecf55cb09ec9c4036262009a7196f 1375 nfdump_1.6.12-0.dsc 4b597c3c948b2ac1a4b0b11ffbdc5c8bab8835f14718ad0f7896daeaf7b89204 733604 nfdump_1.6.12.orig.tar.gz 4be1cc9d4170aecd987d59b4f76faa308453a3441623356420294ee7d5657eae 7508 nfdump_1.6.12-0.debian.tar.xz 4e37e2ac31ca6fcd1415b6775cf7f65668d297d1c99d98723ac4b77c758c1b64 246884 nfdump_1.6.12-0_amd64.deb 40ce34ca08d3537e459a60e643e2d2fa396816da5d59f8fbc74e7be47a47ecc0 551632 nfdump-dbg_1.6.12-0_amd64.deb 699aff04e04d736e14e3928e927dcd1ddb3d7340d5376c169b02f54c6d4af521 68342 nfdump-flow-tools_1.6.12-0_amd64.deb 76273a738c3d6d48b9cfbebb6bd3c00e57945472d2f41c6a6d2af05338dd55cb 88634 nfdump-sflow_1.6.12-0_amd64.deb Files: 1f6f1379de349343b19387353fefbe70 1375 net optional nfdump_1.6.12-0.dsc e55a9130c93cfb9ed24b01bccd691bcb 733604 net optional nfdump_1.6.12.orig.tar.gz e205bd9c17b1b9a197b1853ce4187419 7508 net optional nfdump_1.6.12-0.debian.tar.xz 2fe6748382f6594d1daf9819556a2026 246884 net optional nfdump_1.6.12-0_amd64.deb 535cb70974d95945b1785afeb1c9bffb 551632 debug extra nfdump-dbg_1.6.12-0_amd64.deb 5ab48c2a1be9f63bfe7a6c283c5a4b22 68342 net extra nfdump-flow-tools_1.6.12-0_amd64.deb 3a606309cb5feb4f0c3bf1e18432eb7d 88634 net extra nfdump-sflow_1.6.12-0_amd64.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlRGfyAACgkQJMXP5PVSFUEI3ACgilbA9GWm6Fib3IBHsRI4GDU6 sXAAnix/Ng+uy1y6B+Zq6Jj0GjrbFSDQ =cEf7 -----END PGP SIGNATURE-----
--- End Message ---

