Hello community, here is the log from the commit of package at for openSUSE:Factory checked in at 2015-10-17 16:36:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/at (Old) and /work/SRC/openSUSE:Factory/.at.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "at" Changes: -------- --- /work/SRC/openSUSE:Factory/at/at.changes 2015-07-05 17:58:03.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.at.new/at.changes 2015-10-17 16:36:49.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Oct 13 13:36:03 UTC 2015 - kstreitova@suse.com + +- add at-3.1.16-handle_malformed_jobs.patch to prevent creation of + the corrupted files and their looping [bnc#945124] + +------------------------------------------------------------------- New: ---- at-3.1.16-handle_malformed_jobs.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ at.spec ++++++ --- /var/tmp/diff_new_pack.dGmVUC/_old 2015-10-17 16:36:50.000000000 +0200 +++ /var/tmp/diff_new_pack.dGmVUC/_new 2015-10-17 16:36:50.000000000 +0200 @@ -60,6 +60,8 @@ #PATCH-FIX-OPENSUSE use posix timers to avoid the need of suspend/resume hacks. Patch27: at-3.1.14-usePOSIXtimers.patch Patch28: at-adjust_load_to_cpu_count.patch +# PATCH-FIX-UPSTREAM bnc#945124 kstreitova@suse.com -- don't loop on corrupt files and prevent their creation +Patch29: at-3.1.16-handle_malformed_jobs.patch BuildRequires: autoconf >= 2.69 BuildRequires: automake BuildRequires: bison @@ -104,6 +106,7 @@ %patch25 %patch27 -p1 %patch28 -p1 +%patch29 -p1 %build rm -fv y.tab.c y.tab.h lex.yy.c lex.yy.o y.tab.o ++++++ at-3.1.16-handle_malformed_jobs.patch ++++++ Index: at-3.1.13/at.c =================================================================== --- at-3.1.13.orig/at.c +++ at-3.1.13/at.c @@ -319,7 +319,8 @@ writefile(time_t runtimer, char queue) * bit. Yes, this is a kluge. */ cmask = umask(S_IRUSR | S_IWUSR | S_IXUSR); - if ((fd = open(atfile, O_CREAT | O_EXCL | O_TRUNC | O_WRONLY, S_IRUSR)) == -1) + if ((fd = open(atfile, + O_CREAT | O_EXCL | O_TRUNC | O_WRONLY | O_SYNC, S_IRUSR)) == -1) perr("Cannot create atjob file %.500s", atfile); if ((fd2 = dup(fd)) < 0) Index: at-3.1.13/atd.c =================================================================== --- at-3.1.13.orig/atd.c +++ at-3.1.13/atd.c @@ -103,6 +103,7 @@ int selinux_enabled=0; #define BATCH_INTERVAL_DEFAULT 60 #define CHECK_INTERVAL 3600 +#define RETRY_INTERVAL CHECK_INTERVAL /* Global variables */ @@ -845,12 +846,17 @@ run_loop() /* Something went wrong the last time this was executed. * Let's remove the lockfile and reschedule. + * + * To prevent pointless CPU heating with permanent errors, + * next execution is scheduled with RETRY_INTERVAL inserted. */ strncpy(lock_name, dirent->d_name, sizeof(lock_name)-1); lock_name[sizeof(lock_name)-1] = 0; lock_name[0] = '='; unlink(lock_name); - next_job = now; + if (next_job > now + RETRY_INTERVAL) { + next_job = now + RETRY_INTERVAL; + } nothing_to_do = 0; } continue;