Bug 277003 - security/munge: service munged restart sometimes fails
Summary: security/munge: service munged restart sometimes fails
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:
Depends on:
Blocks:
 
Reported: 2024-02-12 14:00 UTC by Jason W. Bacon
Modified: 2024-02-19 06:28 UTC (History)
0 users

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


Attachments
Unified diff for more robust RC script (1.36 KB, patch)
2024-02-12 14:00 UTC, Jason W. Bacon
no flags Details | Diff
Unified diff for more robust RC script (1.31 KB, patch)
2024-02-12 14:08 UTC, Jason W. Bacon
no flags Details | Diff
Unified diff for more robust RC script (1.67 KB, patch)
2024-02-13 00:05 UTC, Jason W. Bacon
no flags Details | Diff
Unified diff for more robust RC script (1.57 KB, patch)
2024-02-15 13:27 UTC, Jason W. Bacon
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason W. Bacon freebsd_committer freebsd_triage 2024-02-12 14:00:01 UTC
Created attachment 248391 [details]
Unified diff for more robust RC script

The problem is that the munged_stop() function does not wait until the kill completes.  This can cause start to fail with "munged already running" when the system is heavily loaded and kill is slower than usual.  Attaching a patch for a more robust RC script.
Comment 1 Jason W. Bacon freebsd_committer freebsd_triage 2024-02-12 14:08:56 UTC
Created attachment 248392 [details]
Unified diff for more robust RC script

Crap...

Original patch was an unfinished attempt.
Comment 2 Jason W. Bacon freebsd_committer freebsd_triage 2024-02-13 00:05:36 UTC
Created attachment 248413 [details]
Unified diff for more robust RC script

Add checkyesno to stop function, so rc.conf is checked appropriately
Comment 3 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2024-02-13 22:09:11 UTC
Do you have a git diff from the tree?
Comment 4 Jason W. Bacon freebsd_committer freebsd_triage 2024-02-15 13:27:42 UTC
Created attachment 248481 [details]
Unified diff for more robust RC script
Comment 5 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2024-02-15 23:28:30 UTC
Thanks. :)

I will look at this on the coming weekend.
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-02-19 06:27:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=935bde5ee133f8c93dd67123827c075bc6ac2538

commit 935bde5ee133f8c93dd67123827c075bc6ac2538
Author:     Jason W. Bacon <jwb@freebsd.org>
AuthorDate: 2024-02-19 06:14:36 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2024-02-19 06:26:39 +0000

    security/munge: Fix rc script

    The problem is that the munged_stop() function does not wait until the
    kill completes. This can cause start to fail with "munged already
    running" when the system is heavily loaded and kill is slower than
    usual.

    PR:             277003

 security/munge/Makefile                  |  2 +-
 security/munge/files/munged.in (mode +x) | 21 +++++++++++++++++----
 2 files changed, 18 insertions(+), 5 deletions(-)