Bug#783683: cron started with -f (foreground), killing processes on restart

2015-06-07 Thread Javier Fernandez-Sanguino
On 7 June 2015 at 18:30, Christian Kastner deb...@kvr.at wrote:

 On 2015-06-06 21:33, Christoph Berg wrote:

  I had hoped to see this fixed in today's point release. What happened
  with the jessie package?

 I'm afraid I couldn't get a hold of Javier regarding an upload. I myself
 don't have upload rights yet.


My fault. Quite simply: life got in the way.


 I meant to take care of this before I went AFK for the weekend, but I
 forgot about this :-/ If an upload to jessie-p-u is still a possibility
 and you'd like to sponsor, a package for jessie has been prepared on the
 jessie branch. It was already ACKed by the RT, see #785573.


I am going to do this right away. I'm building the origin/jessie branch as
I'm writing this.

Regards

Javier


Bug#783683: cron started with -f (foreground), killing processes on restart

2015-06-07 Thread Christian Kastner
Hi,

On 2015-06-06 21:33, Christoph Berg wrote:
 Re: Christian Kastner 2015-05-03 554626d8.4090...@kvr.at
 I'd strongly opt to change the KillMode as mentioned above.
 #debian-devel seems to agree, so I'm upgrading this bug to RC.
 (critical as it's killing random processes)

 A particular reason why the current behavior is bad is that it is
 common practise to start user daemons using @reboot cronjobs.

 I was wondering what the use case for this was, but that seems plausible.

 Regardless, I committed a fix for the sole fact that it's a significant
 deviation from past behavior, as you pointed out.

 I've prepared packages for both jessie and unstable.
 
 I had hoped to see this fixed in today's point release. What happened
 with the jessie package?

I'm afraid I couldn't get a hold of Javier regarding an upload. I myself
don't have upload rights yet.

I meant to take care of this before I went AFK for the weekend, but I
forgot about this :-/ If an upload to jessie-p-u is still a possibility
and you'd like to sponsor, a package for jessie has been prepared on the
jessie branch. It was already ACKed by the RT, see #785573.

Regards,
Christian


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#783683: cron started with -f (foreground), killing processes on restart

2015-06-06 Thread Christoph Berg
Re: Christian Kastner 2015-05-03 554626d8.4090...@kvr.at
  I'd strongly opt to change the KillMode as mentioned above.
  #debian-devel seems to agree, so I'm upgrading this bug to RC.
  (critical as it's killing random processes)
  
  A particular reason why the current behavior is bad is that it is
  common practise to start user daemons using @reboot cronjobs.
 
 I was wondering what the use case for this was, but that seems plausible.
 
 Regardless, I committed a fix for the sole fact that it's a significant
 deviation from past behavior, as you pointed out.
 
 I've prepared packages for both jessie and unstable.

Hi,

I had hoped to see this fixed in today's point release. What happened
with the jessie package?

Christoph
-- 
c...@df7cb.de | http://www.df7cb.de/


signature.asc
Description: Digital signature


Bug#783683: cron started with -f (foreground), killing processes on restart

2015-05-03 Thread Christoph Berg
Re: To Joerg Morbitzer 2015-05-03 20150503125807.ga3...@msg.df7cb.de
  I guess this is an important bug that should be solved in Debian 8.1
  due soon.
 
 The behavior was different for decades, and this change isn't
 mentioned in NEWS.Debian to make the user aware. I guess everyone who
 has been managing cron as a sysadmin will get bitten badly by this
 change.
 
 I'd strongly opt to change the KillMode as mentioned above.
 #debian-devel seems to agree, so I'm upgrading this bug to RC.
 (critical as it's killing random processes)

A particular reason why the current behavior is bad is that it is
common practise to start user daemons using @reboot cronjobs. These
are long-running and shouldn't get terminated. (There are alternatives
available to start user processes at boot, but the predominant way atm
is still @reboot.)

Christoph
-- 
c...@df7cb.de | http://www.df7cb.de/


signature.asc
Description: Digital signature


Bug#783683: cron started with -f (foreground), killing processes on restart

2015-05-03 Thread Christoph Berg
Control: severity -1 critical

Re: Joerg Morbitzer 2015-04-29 
20150429072844.9034.66226.report...@mars.sol-3.de
 In the past (with Squeeze, Wheezy etc.) cron was always daemonized
 and that behaviour never(!) happened, I think this -f is a pretty 
 dangerous thing.

The problem isn't running in the foreground, but systemd's process
group handling.


Re: Alexandre Detiste 2015-05-01 2522456.jJ8AmF7lJg@antec
 Control: severity -1 important
 
 
 Hi,
 
 To solve your problem, you can add KillMode=process 
 into the [Service] stanza of cron.service.
 
 I guess this is an important bug that should be solved in Debian 8.1
 due soon.

The behavior was different for decades, and this change isn't
mentioned in NEWS.Debian to make the user aware. I guess everyone who
has been managing cron as a sysadmin will get bitten badly by this
change.

I'd strongly opt to change the KillMode as mentioned above.
#debian-devel seems to agree, so I'm upgrading this bug to RC.
(critical as it's killing random processes)

 http://www.freedesktop.org/software/systemd/man/systemd.kill.html
 
 | If set to control-group, all remaining processes in the control group of 
 this unit will be killed on unit stop
 | If set to process, only the main process itself is killed.
 | Defaults to control-group.
 
 Other distro's do that too
 
 https://git.fedorahosted.org/cgit/cronie.git/tree/contrib/cronie.systemd
 http://arch-general.archlinux.narkive.com/FcUpb8Nw/protect-a-cron-job-from-systemd
 
 (not Debian)
 http://anonscm.debian.org/cgit/pkg-cron/pkg-cron.git/tree/debian/cron.service

Christoph
-- 
c...@df7cb.de | http://www.df7cb.de/


signature.asc
Description: Digital signature


Bug#783683: cron started with -f (foreground), killing processes on restart

2015-05-03 Thread Christian Kastner
Control: tag -1 + confirmed pending

On 2015-05-03 15:33, Christoph Berg wrote:
 Re: To Joerg Morbitzer 2015-05-03 20150503125807.ga3...@msg.df7cb.de
 I'd strongly opt to change the KillMode as mentioned above.
 #debian-devel seems to agree, so I'm upgrading this bug to RC.
 (critical as it's killing random processes)
 
 A particular reason why the current behavior is bad is that it is
 common practise to start user daemons using @reboot cronjobs.

I was wondering what the use case for this was, but that seems plausible.

Regardless, I committed a fix for the sole fact that it's a significant
deviation from past behavior, as you pointed out.

I've prepared packages for both jessie and unstable.

Thanks, Alexandre and Christoph, for your analysis and solution!

Regards,
Christian


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#783683: cron started with -f (foreground), killing processes on restart

2015-05-01 Thread Alexandre Detiste
Control: severity -1 important


Hi,

To solve your problem, you can add KillMode=process 
into the [Service] stanza of cron.service.

I guess this is an important bug that should be solved in Debian 8.1
due soon.


---

http://www.freedesktop.org/software/systemd/man/systemd.kill.html

| If set to control-group, all remaining processes in the control group of this 
unit will be killed on unit stop
| If set to process, only the main process itself is killed.
| Defaults to control-group.

Other distro's do that too

https://git.fedorahosted.org/cgit/cronie.git/tree/contrib/cronie.systemd
http://arch-general.archlinux.narkive.com/FcUpb8Nw/protect-a-cron-job-from-systemd

(not Debian)
http://anonscm.debian.org/cgit/pkg-cron/pkg-cron.git/tree/debian/cron.service

Alexandre Detiste


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#783683: cron started with -f (foreground), killing processes on restart

2015-04-29 Thread Joerg Morbitzer
Package: cron
Version: 3.0pl1-127
Severity: normal

Dear Maintainer,

on Debian Jessie the cron daemon is being started with the parameter -f
(for running in foreground). Now, when restarting the daemon using
systemctl restart cron.service all running processes *initiated*
by the cron daemon will be killed.

I think the culprit is in this file:

/lib/systemd/system/cron.service

sol3@leeds:~$ ps auxww | grep '[c]ron'
root  8694  0.0  0.0  27464  2644 ?Ss   Apr28   0:00 /usr/sbin/cron 
-f
sol3@leeds:~$

In the past (with Squeeze, Wheezy etc.) cron was always daemonized
and that behaviour never(!) happened, I think this -f is a pretty 
dangerous thing.

Kind regards, Joerg Morbitzer


-- Package-specific info:
--- EDITOR:


--- /usr/bin/editor:
/usr/bin/vim.gtk

--- /usr/bin/crontab:
-rwxr-sr-x 1 root crontab 36008 Oct 26  2014 /usr/bin/crontab

--- /var/spool/cron:
drwxr-xr-x 5 root root 4096 Jan 28 11:44 /var/spool/cron

--- /var/spool/cron/crontabs:
drwx-wx--T 2 root crontab 4096 Mar 27 09:37 /var/spool/cron/crontabs

--- /etc/cron.d:
drwxr-xr-x 2 root root 4096 Jan 28 11:45 /etc/cron.d

--- /etc/cron.daily:
drwxr-xr-x 2 root root 4096 Apr 20 07:03 /etc/cron.daily

--- /etc/cron.hourly:
drwxr-xr-x 2 root root 4096 Jan 28 11:40 /etc/cron.hourly

--- /etc/cron.monthly:
drwxr-xr-x 2 root root 4096 Jan 28 11:45 /etc/cron.monthly

--- /etc/cron.weekly:
drwxr-xr-x 2 root root 4096 Jan 28 11:45 /etc/cron.weekly


-- System Information:
Debian Release: 8.0
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages cron depends on:
ii  adduser  3.113+nmu3
ii  debianutils  4.4+b1
ii  dpkg 1.17.25
ii  init-system-helpers  1.22
ii  libc62.19-18
ii  libpam-runtime   1.1.8-3.1
ii  libpam0g 1.1.8-3.1
ii  libselinux1  2.3-2
ii  lsb-base 4.1+Debian13+nmu1

Versions of packages cron recommends:
ii  exim4  4.84-8
ii  exim4-daemon-light [mail-transport-agent]  4.84-8

Versions of packages cron suggests:
ii  anacron2.3-23
pn  checksecurity  none
ii  logrotate  3.8.7-1+b1

Versions of packages cron is related to:
pn  libnss-ldap   none
pn  libnss-ldapd  none
pn  libpam-ldap   none
pn  libpam-mount  none
ii  nis   3.17-33
pn  nscd  none

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org