openwrt / openwrt/packages

ntpclient: hotplug handler spawning ntpclient command that never returns

Open
#18,683 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Maintainer: @thess
Environment: mvebu/cortexa72

Description:

The ntpclient hotplug handler hangs, which blocks all subsequent hotplug events, resulting in routing being broken since the firewall does not get reloaded after my PPPoE WAN connection being brought up. Manually restarting the firewall will restore routing. In the forum topic I opened (and after further digging on IRC) it turned out this was due to the ntpclient hotplug handler spawning an ntpclient command that never returns.

I am not an active user of ntpclient, but it is pulled in by luci-app-ntpc. Ntpclient as a project upstream seems dead (last code update from 2015?) and jow pointed out to me on IRC that e.g. the -D flag used in the hotplug handler does not exist in the corresponding source code. He said the script instance is hanging on line 31 of the hotplug script ('presumably checking the availability of a given server', to quote him). He suggested to either mark the package as broken, or rewrite it into a procd service.

Since luci-app-ntpc relies on it, I was wondering if there are alternatives available in OpenWrt that could replace it? The NTP wiki entry suggests there are multiple programs offering NTP functionality, but I suppose ntpclient had a limited footprint.

Thank you

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with net/ntpclient/files/ntpclient.hotplug, especially lines 31 and 44, and review the linked forum topic and NTP wiki entry. Determine whether ntpclient should be marked broken, rewritten as a procd service, or replaced while preserving luci-app-ntpc use. Done means the handler no longer blocks subsequent hotplug events and the chosen remediation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.