Bug 253314 - textproc/kibana7: fix memleak and some port improvements
Summary: textproc/kibana7: fix memleak and some port improvements
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: Juraj Lutter
URL: https://github.com/elastic/kibana/iss...
Keywords: patch
Depends on:
Blocks:
 
Reported: 2021-02-06 21:50 UTC by Boris Korzun
Modified: 2021-07-08 15:03 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (elastic)


Attachments
kibana7.diff (2.71 KB, patch)
2021-02-06 21:50 UTC, Boris Korzun
no flags Details | Diff
kibana7.diff (2.91 KB, patch)
2021-02-11 08:15 UTC, Boris Korzun
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Korzun 2021-02-06 21:50:27 UTC
Created attachment 222228 [details]
kibana7.diff

There's a memleak in Kibana ( https://github.com/elastic/kibana/issues/90274 ). I think it is involved by incorrect using parameters xpack.ml.enabled and xpack.reporting.enabled added by ports r484109.

The options should be passing by config file or command line arguments, not by environmental variables (as a Docker).

I've passed the params by command line and memleak had fixed.

Also I've added some improvements to the rc-script:
- Added kibana_syslog_output_* options for writing daemon(8) stdout to syslog.
- Moved pidfile from /var/run/kibana to /var/run directory.
- Moved daemon(8) pidfile control from child (-p) to supervisor (-P). It is need for using -r/-R options (auto-restart after terminated, ex. after memory exhausting).
- Added environmental variables passing for FreeBSD 11.4 compatibility.
- Added --max-http-header-size=65536 node option (Kibana using).
Comment 1 Boris Korzun 2021-02-06 22:04:00 UTC
Also files/patch-config_kibana.yml with xpack.ml.enabled and xpack.reporting.enabled params was added at ports r484109.
But the patch was been deleted in bug #236243.
Comment 2 Boris Korzun 2021-02-11 08:15:06 UTC
Created attachment 222360 [details]
kibana7.diff

- Added "reload" extra option to rc-script.
- Removed "xpack.ml.enabled=false" as unnecessary.
Comment 3 commit-hook freebsd_committer 2021-07-06 20:46:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1457ecce2ae6702e6600617902b3b3a8698c416e

commit 1457ecce2ae6702e6600617902b3b3a8698c416e
Author:     Juraj Lutter <otis@FreeBSD.org>
AuthorDate: 2021-07-05 09:09:43 +0000
Commit:     Juraj Lutter <otis@FreeBSD.org>
CommitDate: 2021-07-06 20:44:38 +0000

    textproc/kibana7: Update to 7.13.2

    - Update to 7.13.2
    - kibana since 7.13.0 ships with re2.node shared library
      built for Linux, Windows or Darwin. Build a native one
      for FreeBSD as a part of the port build. This involves:
        - Build node-nan
        - Build node-re2
    - Fix memleak [1]

    PR:             253314 [1]

 textproc/kibana7/Makefile                          | 71 +++++++++++++++++++---
 textproc/kibana7/distinfo                          | 10 ++-
 .../files/extra-node-re2-binding-gyp.patch (new)   | 51 ++++++++++++++++
 textproc/kibana7/files/kibana.in                   | 56 ++++++++++++-----
 4 files changed, 163 insertions(+), 25 deletions(-)