NetBSD Problem Report #60009

From www@netbsd.org  Mon Feb 16 02:07:27 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "R13" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 24DAD1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 16 Feb 2026 02:07:27 +0000 (UTC)
Message-Id: <20260216020726.3178F1A923C@mollari.NetBSD.org>
Date: Mon, 16 Feb 2026 02:07:26 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: /etc/daily: overlong run protection
X-Send-Pr-Version: www-1.0
X-From4GNATS: "campbell+netbsd@mumble.net via gnats" <gnats-admin@NetBSD.org>

>Number:         60009
>Category:       misc
>Synopsis:       /etc/daily: overlong run protection
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 16 02:10:00 +0000 2026
>Originator:     Taylor R Campbell
>Release:        current, 11, 10, 9, ...
>Organization:
The NetBSDaily Collision, Inc.
>Environment:
>Description:

	If /etc/daily takes longer than a day to run, the same cron job
	might start running again the next day.  If something is
	hanging, there may be indefinite growth of hung /etc/daily jobs
	without feedback.

	Same with /etc/weekly, /etc/monthly.

>How-To-Repeat:

	echo sleep $((86400*365)) >>/etc/daily.local

>Fix:

	Take a lock, say /var/run/daily.lock, with flock(1).  If it's
	already taken, report a hung daily job by mail instead of
	hanging any more.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.