Your message dated Tue, 02 Aug 2005 02:47:16 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#194674: fixed in at 3.1.9
has caused the attached Bug report to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--------------------------------------
Received: (at submit) by bugs.debian.org; 25 May 2003 17:40:53 +0000
>From [EMAIL PROTECTED] Sun May 25 12:40:27 2003
Return-path: <[EMAIL PROTECTED]>
Received: from sccrmhc01.attbi.com [204.127.202.61]
by master.debian.org with esmtp (Exim 3.35 1 (Debian))
id 19JzTv-0002TY-00; Sun, 25 May 2003 12:40:27 -0500
Received: from madstop.pimlott.net
(h00a0cc5ad757.ne.client2.attbi.com[65.96.178.14])
by attbi.com (sccrmhc01) with ESMTP
id <20030525174026001005bsr6e>; Sun, 25 May 2003 17:40:26 +0000
Received: from andrew by madstop.pimlott.net with local (Exim 3.35 #1 (Debian))
id 19JzKs-0000PX-00; Sun, 25 May 2003 13:31:06 -0400
From: Andrew Pimlott <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: at: wide race condition
X-Mailer: reportbug 1.50
Date: Sun, 25 May 2003 13:31:06 -0400
Message-Id: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Status: No, hits=-11.7 required=4.0
tests=BAYES_01,HAS_PACKAGE,MAILTO_TO_SPAM_ADDR,PATCH_UNIFIED_DIFF
autolearn=ham version=2.53-bugs.debian.org_2003_05_24
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_05_24
(1.174.2.15-2003-03-30-exp)
Package: at
Version: 3.1.8-11
Severity: normal
I tried submitting this to [EMAIL PROTECTED], the only maintainer
address I could find for at, but got no reply.
atd uses signals and is therefore inherently racy. I report this
one because the window is around 1 second long. If someone submits
a new at job within 1 second of atd running its loop, atd may not
notice the new job:
atd at
run_loop
last_chg = t0
nothing_to_do = 1
sleep
create job, mtime of '.' is still t0
SIGHUP atd
SIGHUP
run_loop
mtime of '.' is t0
sleep
You can reproduce this with a simple Perl script like
open AT, "|at now + 1 minute 2>/dev/null" or die $!;
print AT $0;
When it is run from the shell, it will work fine; however when it
runs from atd, it creates a new job that atd doesn't notice.
Note this will not produce the same sequence of events as above, but
it is showing the same problem. I can describe in more detail.
It is critical that the script not "close AT": atd sets
nothing_to_do = 0 when running a job, so the next time the main loop
is run, the jobs will be scanned; the above script (at least on my
Linux 2.4.20 system) exits (sending atd SIGCHLD, causing it to scan
its jobs because nothing_to_do == 0) before at sends SIGHUP, on
which atd will not scan its jobs because nothing_to_do == 1. The
"2>/dev/null" is also important, because when atd sends mail, it
appears to perturb the scheduler such that the SIGHUP comes before
the SIGCHLD.
The "fix" (in quotes because it does not eliminate the race, just makes
it short, like all the other races in atd) is trivial:
--- atd.c.orig 2003-03-08 09:09:12.000000000 -0500
+++ atd.c 2003-03-08 09:24:09.000000000 -0500
@@ -131,7 +131,7 @@
RETSIGTYPE
sdummy(int dummy)
{
- /* Empty signal handler */
+ nothing_to_do = 0;
return;
}
My at is 3.1.8 on Debian GNU/Linux.
Andrew
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux madstop 2.2.25-madstop #1 Tue Mar 18 18:47:57 EST 2003 i586
Locale: LANG=C, LC_CTYPE=C
Versions of packages at depends on:
ii exim [mail-transport-agent] 3.35-1 An MTA (Mail Transport Agent)
ii libc6 2.2.5-11.5 GNU C Library: Shared libraries an
---------------------------------------
Received: (at 194674-close) by bugs.debian.org; 2 Aug 2005 09:56:18 +0000
>From [EMAIL PROTECTED] Tue Aug 02 02:56:17 2005
Return-path: <[EMAIL PROTECTED]>
Received: from katie by spohr.debian.org with local (Exim 3.36 1 (Debian))
id 1DztMi-0001He-00; Tue, 02 Aug 2005 02:47:16 -0700
From: Ryan Murray <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.56 $
Subject: Bug#194674: fixed in at 3.1.9
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Tue, 02 Aug 2005 02:47:16 -0700
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER
autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 16
Source: at
Source-Version: 3.1.9
We believe that the bug you reported is fixed in the latest version of
at, which is due to be installed in the Debian FTP archive:
at_3.1.9.dsc
to pool/main/a/at/at_3.1.9.dsc
at_3.1.9.tar.gz
to pool/main/a/at/at_3.1.9.tar.gz
at_3.1.9_i386.deb
to pool/main/a/at/at_3.1.9_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Ryan Murray <[EMAIL PROTECTED]> (supplier of updated at package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Tue, 2 Aug 2005 02:34:45 -0700
Source: at
Binary: at
Architecture: source i386
Version: 3.1.9
Distribution: unstable
Urgency: low
Maintainer: Ryan Murray <[EMAIL PROTECTED]>
Changed-By: Ryan Murray <[EMAIL PROTECTED]>
Description:
at - Delayed job execution and batch processing
Closes: 13603 17561 53586 61604 68364 70928 70988 79650 84351 84791 130023
133812 142810 153700 162677 173635 175211 193396 194674 200627 202617 205523
220336 239394 251058 257074 269440
Changes:
at (3.1.9) unstable; urgency=low
.
* Apply rewritten parser patch (closes: #70928)
* Several changes to be more SUSv3 compliant (closes: #133812)
* Remove yacc/flex generated files, and remove them in the clean target
* Remove /usr/doc handling from scripts (closes :#261467)
* use chown with : instead of . (closes: #205523)
* Add two precisions to format strings (closes: #220336)
* Fix manpage typos (closes: #153700, #175211)
* Use --retry option of start-stop-daemon (closes: #84351)
* Create /var/spool/cron/atjobs/.SEQ in the postinst (closes: #142810)
* Always rescan the queue after signals (closes: #194674)
* use 89 11 as parameters to update-rc.d defaults (closes: #200627)
* hold privs longer when creating pid file (closes: #13603)
* Add stdio.h for stderr to parsetime.y (closes: #130023)
* Use invoke-rc.d in maintainer scripts (closes: #162677)
* Allow usernames > 8 characters. Don't write out usernames with at that
atd will later call corrupt (closes: #17561)
* Run as user daemon, rather than root (from 3.1.8-11ubuntu3) (closes:
#251058)
+ Derooted /usr/bin/at.
+ at.c:
- Keep real uid, only switch to daemon gid when unlinking files (the
directory is daemon-group writeable, but the job files are owned by
user).
- Instead of creating the job file and then fchown()'ing it (which does
not work when running as non-root), change to the real gid when
creating the file.
+ atd.c:
- Don't check that the file gid is equal to the execution gid (since job
files are now always owned by "daemon".
- setgid() to the user's gid, not to the file gid for job execution.
+ debian/rules:
- Install /usr/bin/at as daemon:daemon 6555 instead of root:root 4755
(running as user daemon is necessary to be allowed to send a signal to
atd.)
- Install /etc/at.deny as root:daemon 640 instead of root:root 0600.
+ debian/postinst:
- Make /var/spool/cron/{atjobs,atspool} writeable for group "daemon".
- Update permissions of /etc/at.{allow,deny} if we upgrade from a
previous
version and there is no statoverride for these files.
* Update standards version (closes: #239394)
* Increment tm_mday for at "time" case, rather than hardcoded increment of
a day in seconds. (closes: #61604)
* Print usage on "at -c" (closes: #202617)
* Increment tm_year when the month and day are earlier than current
(closes: #79650)
* Drop ISO timeformat; following SUSv3 instead (closes: #53586)
* Add optional PAM support based on the submitted patch (closes: #68364)
* Use AC_FUNC_GETLOADAVG and getloadavg.c from XEmacs, so that the
system function is used first, then the getloadavg.c from at if it isn't
available (closes: #269440)
* Fix permissions of /var/spool/cron/at* in the deb files to match what is
used now
* Remove /usr/sbin/atrun; the packaging is set up for running as a daemon.
* Align batch(1) with SUSv3 by accepting no arguments (closes: #70988)
* Update description of -v option to clarify that it prints the time
before the job submission starts (closes: #257074)
* Update description of submission to uppercase queues (closes: #84791)
* Update atq format description (closes: #193396)
* Return EXIT_FAILURE if one jobid fails for -c and -r (closes: #173635)
Files:
d1df85e6898471736141ccb54fb7ddc6 501 admin important at_3.1.9.dsc
795f1d7ba2f77c5d85ec3e5abe6da46c 97949 admin important at_3.1.9.tar.gz
3b015ac30f98e55cb9a3972329a12445 41522 admin important at_3.1.9_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC7z94N2Dbz/1mRasRAmz/AJ9U4XzfhawSEJhew/1nZPVxClVBYACfUsNn
+98uyJlwah5ywRystSzuOlU=
=E7Hk
-----END PGP SIGNATURE-----
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]