Bug 672586

Summary: Atd fails to start jobs
Product: [openSUSE] openSUSE 11.4 Reporter: Elemér Vass <vass.elemer>
Component: OtherAssignee: Vítězslav Čížek <vcizek>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P3 - Medium CC: bjoernv, forgotten_PQKW3NFi6R, meissner, vcizek
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard: maint:released:11.4:39299
Found By: Community User Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Deadline: 2011-04-07   

Description Elemér Vass 2011-02-16 15:18:51 UTC
Atd is enabled and running, however jobs invoked via the batch or at commands are queued but never started (they have to be removed from the queue with the atrm command).
The test was done with openSuSE 11.4 RC1 x86_64 (I did not test the 32bit edition).
Comment 1 Michal Vyskocil 2011-02-18 09:23:02 UTC
Cannot reproduce with at-3.1.8-1088.2.x86_64 on openSUSE 11.4 Milestone 6 of 6 (x86_64)

$ echo "touch /tmp/ATDTEST" | at +1 minute
warning: commands will be executed using /bin/sh
job 3 at 2011-02-18 10:19
$ atq
3       2011-02-18 10:19 a mvyskocil
$ sleep 60; ls -l /tmp/ATDTEST 
-rw-r--r-- 1 mvyskocil users 0 Feb 18 10:19 /tmp/ATDTEST
$ atq

Is there anything in system log about atd?

grep '\<atd\[' /var/log/messages
Comment 2 Elemér Vass 2011-02-18 18:16:04 UTC
(In reply to comment #1)
> Cannot reproduce with at-3.1.8-1088.2.x86_64 on openSUSE 11.4 Milestone 6 of 6
> (x86_64)
> 
> $ echo "touch /tmp/ATDTEST" | at +1 minute
> warning: commands will be executed using /bin/sh
> job 3 at 2011-02-18 10:19
> $ atq
> 3       2011-02-18 10:19 a mvyskocil
> $ sleep 60; ls -l /tmp/ATDTEST 
> -rw-r--r-- 1 mvyskocil users 0 Feb 18 10:19 /tmp/ATDTEST
> $ atq
> 
> Is there anything in system log about atd?
> 
> grep '\<atd\[' /var/log/messages

OK, I am not a programmer (just a simple user) but I tried to repeat what you suggested. The result is below:

------------------
vass@suse114:~> echo "touch /tmp/ATDTEST" | at +1 minute
warning: commands will be executed using /bin/sh
job 8 at 2011-02-18 18:53
vass@suse114:~> atq
8       2011-02-18 18:53 a vass
vass@suse114:~> sleep 60; ls -l /tmp/ATDTEST
-rw-r--r-- 1 vass users 0 febr  18 18.53 /tmp/ATDTEST
vass@suse114:~> atq
vass@suse114:~> su -
vass@suse114:~> echo "touch /tmp/ATDTEST" | at +1 minute
warning: commands will be executed using /bin/sh
job 8 at 2011-02-18 18:53
vass@suse114:~> atq
8       2011-02-18 18:53 a vass
vass@suse114:~> sleep 60; ls -l /tmp/ATDTEST
-rw-r--r-- 1 vass users 0 febr  18 18.53 /tmp/ATDTEST
vass@suse114:~> atq
vass@suse114:~> su -
Jelszó: 
suse114:~ # grep '\<atd\[' /var/log/messages

---------------------

As you can see there is nothing about atd in /var/log/message and the job is no more in the queue.
But this does not solve my problem, everything I start with "batch" is sitting endlessly in the queue.

I did a similar test with the "batch" command, I hope it helps:
---------------------------
vass@suse114:~> batch
warning: commands will be executed using /bin/sh
at> echo "touch /tmp/ATDTEST"
at> <EOT>
job 9 at 2011-02-19 19:03
vass@suse114:~> atq
9       2011-02-19 19:03 b vass
vass@suse114:~> sleep 60; ls -l /tmp/ATDTEST
-rw-r--r-- 1 vass users 0 febr  18 18.53 /tmp/ATDTEST
vass@suse114:~> atq
9       2011-02-19 19:03 b vass
vass@suse114:~> su -
Jelszó: 
suse114:~ # grep '\<atd\[' /var/log/messages
suse114:~ # atq
9       2011-02-19 19:03 b vass


---------------------
Again, nothing in /var/log/messages/ but as you can see the job is still there.
Comment 3 Elemér Vass 2011-02-25 13:03:38 UTC
Some additional information:

You wrote that the bug could not be reproduced with at-3.1.8-1088.2.x86_64 (openSUSE 11.4 M6).
Id have not used M6, I did the test with openSUSE 11.4 RC1, at-3.1.8-1090.1.x86_64 (which is newer).
The bug is still present in openSUSE 11.4RC2 with at-3.1.8-1092.1.x86_64.
Maybe something went wrong with "at" between M6 and RC1?
It is also interesting that jobs fail to start only if the time is not explicitly specified for atd, like e.g. when jobs are started with "batch" or "at now", Everything is OK with "at +1 minute" or similar.

Downgrading to at-3.1.8-1081.1.x86_64 (shipped with openSUSE 11.3) is a temporary workaround for me, that version still works well even with openSUSE 11.4 RC2.
Comment 4 Michal Vyskocil 2011-03-01 09:48:47 UTC
(In reply to comment #2)

> As you can see there is nothing about atd in /var/log/message and the job is no
> more in the queue.

That's intended - once job is executed, it's removed from a at queue - it contains only a list of planned tasks. And because the file is created, the at works well on your system.

> But this does not solve my problem, everything I start with "batch" is sitting
> endlessly in the queue.
> 
> I did a similar test with the "batch" command, I hope it helps:
> ---------------------------
> vass@suse114:~> batch
> warning: commands will be executed using /bin/sh
> at> echo "touch /tmp/ATDTEST"
> at> <EOT>
> job 9 at 2011-02-19 19:03
> vass@suse114:~> atq
> 9       2011-02-19 19:03 b vass
> vass@suse114:~> sleep 60; ls -l /tmp/ATDTEST
> -rw-r--r-- 1 vass users 0 febr  18 18.53 /tmp/ATDTEST
> vass@suse114:~> atq
> 9       2011-02-19 19:03 b vass
> vass@suse114:~> su -
> Jelszó: 
> suse114:~ # grep '\<atd\[' /var/log/messages
> suse114:~ # atq
> 9       2011-02-19 19:03 b vass
> 
> 
> ---------------------
> Again, nothing in /var/log/messages/ but as you can see the job is still there.

> It is also interesting that jobs fail to start only if the time is not
> explicitly specified for atd, like e.g. when jobs are started with "batch" or
> "at now", Everything is OK with "at +1 minute" or similar.
> 
> Downgrading to at-3.1.8-1081.1.x86_64 (shipped with openSUSE 11.3) is a
> temporary workaround for me, that version still works well even with openSUSE
> 11.4 RC2.

This reminds me to bnc#668485 - Vitezslav, can you please prepare the patched at package for test and request the maintenance update?
Comment 5 Vítězslav Čížek 2011-03-01 16:59:50 UTC
The has been fixed in Base:System repository.
You can test the at package from there.
Comment 6 Elemér Vass 2011-03-02 07:39:55 UTC
(In reply to comment #5)
> The has been fixed in Base:System repository.
> You can test the at package from there.

I can confirm that the problem has been fixed with at-3.1.8-1120.1.x86_64 from Base:System repository. Atd now works as expected. I think the bug can be marked as resolved. Thank you.
Comment 7 Vítězslav Čížek 2011-03-02 09:05:31 UTC
Fixed in devel project, closing.
Comment 8 Elemér Vass 2011-03-10 16:26:23 UTC
(In reply to comment #7)
> Fixed in devel project, closing.

Unfortunately openSUSE 11.4 final shipped with the wrong version, at-6.1.8-1093.1.x86_64, so please offer the fixed version as an online update for openSUSE 11.4.
Did somebody test the situation of at in the 32bit architecture?
Comment 9 Elemér Vass 2011-03-10 16:32:10 UTC
Sorry, I made a typo, it is of course at-3.1.8-1093.1.x86_64 the unpatched version which shipped with openSUSE 11.4.
Comment 10 Vítězslav Čížek 2011-03-10 16:35:26 UTC
I'm aware of it.
Unfortunately, it was too late to include the fix in 11.4.

I'll prepare a maintenance update.
Comment 12 Swamp Workflow Management 2011-03-10 17:17:14 UTC
The SWAMPID for this issue is 39298.
This issue was rated as low.
Please submit fixed packages until 2011-04-07.
Also create a patchinfo file using this link:
https://swamp.suse.de/webswamp/wf/39298
Comment 13 Marcus Meissner 2011-03-10 17:18:20 UTC
please submit, i already did swamp and patchinfo
Comment 14 Vítězslav Čížek 2011-03-14 08:51:36 UTC
The package was submitted.
Comment 15 Björn Voigt 2011-03-16 18:44:55 UTC
*** Bug 679668 has been marked as a duplicate of this bug. ***
Comment 16 Swamp Workflow Management 2011-03-18 16:02:06 UTC
Update released for: at, at-debuginfo, at-debugsource
Products:
openSUSE 11.4 (debug, i586, x86_64)
Comment 17 Marcus Meissner 2011-03-18 16:08:59 UTC
relkeased
Comment 18 Bernhard Wiedemann 2011-03-23 16:35:29 UTC
*** Bug 680776 has been marked as a duplicate of this bug. ***