[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1052053: marked as done (popularity-contest: race condition between the two cron jobs)



Your message dated Thu, 27 Feb 2025 11:56:56 +0100
with message-id <Z8BE-GC6yDYJJehO@seventeen>
and subject line Re: Bug#1052053: popularity-contest: race condition between the two cron jobs
has caused the Debian Bug report #1052053,
regarding popularity-contest: race condition between the two cron jobs
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 this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1052053: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052053
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: popularity-contest
Version: 1.77
Severity: normal

Hi,

I have been unlucky and the two instance of the cronjob
triggered at the same time, stepping on eachother feets.

(at the "savelog -c 7 popularity-contest >/dev/null" step precisely)

Can you implement some locking ?

Or alternatively #923014 will get you locking for free
on systemd running systems.


Greetings,


> PS: the error handling is well lacking in 'savelog':
>
>        # compress the old uncompressed log if needed
>        if test -n "$datum" && test -n "$COMPRESS"; then
>                $COMPRESS $COMPRESS_OPTS -- "$newname".[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]
>        fi


root@antec:~# journalctl  | grep popul | grep service
sep 16 17:02:28 antec systemd[1]: Starting cron-daily-popularity-contest.service
    - [Cron] /etc/cron.daily/popularity-contest...
sep 16 17:02:28 antec systemd[1]: Starting cron-popularity-contest-root-d2f25b2334da37b6f3ef98c2dc14fad3.service
    - [Cron] "56 18 * * *   root    test -x /etc/cron.daily/popularity-contest && /etc/cron.daily/popularity-contest --crond"...


○ cron-daily-popularity-contest.service - [Cron] /etc/cron.daily/popularity-contest
     Loaded: loaded (/etc/cron.daily/popularity-contest; generated)
     Active: inactive (dead) since Sat 2023-09-16 17:05:50 CEST; 95ms ago
TriggeredBy: ● cron-daily-popularity-contest.timer
    Process: 793 ExecStart=/etc/cron.daily/popularity-contest (code=exited, status=0/SUCCESS)
   Main PID: 793 (code=exited, status=0/SUCCESS)
        CPU: 9.798s
2023-09-16T17:02:28+0200 antec systemd[1]: Starting cron-daily-popularity-contest.service - [Cron] /etc/cron.daily/popularity-contest...
2023-09-16T17:02:28+0200 antec popularity-contest[881]: gzip: .//popularity-contest.0: No such file or directory
2023-09-16T17:02:28+0200 antec popularity-contest[892]: mv: impossible d'évaluer './/popularity-contest.0.gz': Aucun fichier ou dossier de ce type
2023-09-16T17:02:28+0200 antec popularity-contest[897]: mv: impossible d'évaluer 'popularity-contest': Aucun fichier ou dossier de ce type
2023-09-16T17:05:50+0200 antec systemd[1]: cron-daily-popularity-contest.service: Deactivated successfully.
2023-09-16T17:05:50+0200 antec systemd[1]: Finished cron-daily-popularity-contest.service - [Cron] /etc/cron.daily/popularity-contest.
2023-09-16T17:05:50+0200 antec systemd[1]: cron-daily-popularity-contest.service: Consumed 9.798s CPU time.

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (501, 'testing'), (450, 'unstable'), (400, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.4.0-4-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8), LANGUAGE=fr_BE:fr
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages popularity-contest depends on:
ii  debconf [debconf-2.0]  1.5.82
ii  dpkg                   1.22.0

Versions of packages popularity-contest recommends:
ii  gpg                                2.2.40-1.1
ii  nullmailer [mail-transport-agent]  1:2.2+10~g7ed88a0-1
ii  systemd-cron [cron-daemon]         2.1.3-1

Versions of packages popularity-contest suggests:
ii  systemd-cron [anacron]  2.1.3-1
pn  tor                     <none>
pn  torsocks                <none>

-- debconf information:
* popularity-contest/participate: true
  popularity-contest/submiturls:

--- End Message ---
--- Begin Message ---
On Fri, Nov 01, 2024 at 01:37:46PM +0100, Antoine Le Gonidec wrote:
> > Before we can report a bug against debianutils, we need to find a way
> > to reproduce the problem easily.
> 
> I finally identified how it got triggered here, but this is not a
> lightweight way to reproduce it: by accident, two LXC containers ended
> up using the same root. Leading to each one running the cron job on its
> own, at the same time, targeting the same /var/log/ path.

Thanks, I close this report.

Cheers,
-- 
Bill. <ballombe@debian.org>

Imagine a large red swirl here. 

--- End Message ---

Reply to: