Bug 224840 - net-mgmt/flow-tools: Capture process crashes on FreeBSD 11.1
Summary: net-mgmt/flow-tools: Capture process crashes on FreeBSD 11.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Muhammad Moinur Rahman
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2018-01-02 16:28 UTC by Andrew
Modified: 2019-08-08 08:38 UTC (History)
6 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
flow-capture.core (193.75 KB, application/x-gzip)
2018-01-02 16:28 UTC, Andrew
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew 2018-01-02 16:28:06 UTC
Created attachment 189341 [details]
flow-capture.core

After I upgraded from 10.3 to 11.1, I noticed that flow-capture keeps crashing, each time it tries to save a flow file archive (save a tmp- file into a ft- one). I attached the core dump it creates, which reports "Program terminated with signal 11, Segmentation fault".

Running flow-capture in a FreeBSD 10.3 jail (on a FreeBSD 11.1 kernel) solves the problem, thus I guess it might be something related to the userland.
Comment 1 Andrew 2018-01-22 17:07:45 UTC
In order to get more info from the core dump, I just rebuilt the port with the DEBUG option and... the issue seems to be gone away!
I'm not a developer, thus I can't figure out what can be the cause of that. Anyone can help me understand? Thanks.
Comment 2 DorlasUfa 2018-04-25 17:34:08 UTC
I have the same problem on 11.1.
Rebuild with WITH_DEBUG=yes and SegFaults in gone away.
Comment 3 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2018-11-18 22:32:15 UTC
Can anyone give some dump? On the other hand let me resurrect flow-tools-ng. Will take a couple of days.
Comment 4 Andrew 2018-11-18 22:48:28 UTC
(In reply to Muhammad Moinur Rahman from comment #3)
Thank you very much: actually we started using this port because net-mgmt/flow-tools-ng disappeared.

I attached a dump to my first post, wasn’t it useful?
Comment 5 Dylan 2019-02-25 11:32:55 UTC
I'm reporting the same bug because this still doesn't seem to be fixed? Flow-capture dies when it receives a flow file archive from the flow sensor when installed on either Freebsd 11.1 or 11.2 (both running in jails on a FreeBSD 11.2 host). Spinning up a new Freebsd 10.4 jail on the 11.2 host solves the problem.

I used the flow-tools pkg. I didn't try building from the ports tree using the DEBUG solution above because I was getting an error message when trying to build from ports tree "Ports Collection support for your FreeBSD version has ended" in my version of FreeBSD.
Comment 6 commit-hook freebsd_committer freebsd_triage 2019-03-21 21:55:40 UTC
A commit references this bug:

Author: bofh
Date: Thu Mar 21 21:55:32 UTC 2019
New revision: 496516
URL: https://svnweb.freebsd.org/changeset/ports/496516

Log:
  net-mgmt/flow-tools: Update version 0.68=>0.68.6

  - The original development has stalled. After tthatt Andrew tried to work
  on this project but I believe that has also stalled. Hence I have created
  a git repo applied some FreeBSD patches and released a new version.

  PR:		224840

Changes:
  head/net-mgmt/flow-tools/Makefile
  head/net-mgmt/flow-tools/distinfo
  head/net-mgmt/flow-tools/files/flow_capture.in
  head/net-mgmt/flow-tools/files/flow_fanout.in
  head/net-mgmt/flow-tools/files/patch-configs_Makefile
  head/net-mgmt/flow-tools/files/patch-configure
  head/net-mgmt/flow-tools/files/patch-flow-header.c
  head/net-mgmt/flow-tools/files/patch-ftpaths.h
  head/net-mgmt/flow-tools/files/patch-lib-ftfile.c
  head/net-mgmt/flow-tools/files/patch-lib_ftchash.c
  head/net-mgmt/flow-tools/files/patch-lib_ftio.c
  head/net-mgmt/flow-tools/files/patch-lib_ftlib.h
  head/net-mgmt/flow-tools/files/patch-lib_ftsym.c
  head/net-mgmt/flow-tools/files/patch-lib_fttlv.c
  head/net-mgmt/flow-tools/files/patch-lib_support.c
  head/net-mgmt/flow-tools/files/patch-src_flow-export.c
  head/net-mgmt/flow-tools/files/patch-src_flow-fanout.c
  head/net-mgmt/flow-tools/files/pkg-deinstall.in
  head/net-mgmt/flow-tools/files/pkg-install.in
  head/net-mgmt/flow-tools/pkg-descr
  head/net-mgmt/flow-tools/pkg-plist
Comment 7 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2019-04-04 10:26:57 UTC
Can anyone please confirm whether if this is working?
Comment 8 Andrew 2019-04-04 12:24:38 UTC
(In reply to Muhammad Moinur Rahman from comment #7)
Just tested on FreeBSD 11.2-p1: the compiled binary does not crash anymore, so it seems OK so far (I'll leave it running for a few days and I'll update you in case of issue).
Maybe there is something to adjust in dependencies management: I built it without PostgreSQL neither MySQL support, but the resulting package still requires databases/postgresql??-client to install.
Many thanks for your work.
Comment 9 Andrew 2019-04-04 12:58:33 UTC
(In reply to Muhammad Moinur Rahman from comment #7)
Just discovered an issue trying to use flow-nfilter(1), here are relevant output lines:

flow-nfilter: open(/usr/local/etc/sym/ip-prot.sym): No such file or directory
flow-nfilter: open(/usr/local/etc/sym/tcp-port.sym): No such file or directory
flow-nfilter: open(/usr/local/etc/sym/asn.sym): No such file or directory
flow-nfilter: open(/usr/local/etc/sym/tag.sym): No such file or directory
flow-nfilter: open(/usr/local/etc/cfg/filter.cfg): No such file or directory

It works if I move all *.sym files from /usr/localet/etc/flow-nfilter to /usr/local/etc/sym, and all *.cfg files from /usr/localet/etc/flow-nfilter to /usr/local/etc/cfg

Thanks.
Comment 10 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2019-04-04 18:15:17 UTC
(In reply to Andrew from comment #9)
Hi Andrew,
Thanks for the notification. Let me work on that and I will come back soon with a solution.
Comment 11 Kubilay Kocak freebsd_committer freebsd_triage 2019-08-08 08:38:48 UTC
^Triage: The original report (crash) has been resolved, closing accordingly.

Please create a separate/new issue for comment 9