Package: uucp
Version: 1.07-25
Severity: normal

Hi,

I've found many uucio processes still alive after the call-out to the
server and uux run. They are all sitting in this block in unix/detach.c:

      /* We'll always wind up as a child of process number 1, right?
         Right?  We have to wait for our parent to die before
         reenabling SIGHUP.  */
      while (getppid () != 1)
        sleep (1);

I've put my user session under supervision of systemd. Hence, the fork not
ended as child of init (pid = 1), but as child of my `systemd --user`
process, whose pid is not 1. Therefore, it's waiting there forever to
become a child process of pid 1.

I've applied this patch and it fixed the problem:

diff -u /tmp/uucp-1.07-24/unix/detach.c /tmp/uucp-1.07-25/unix/detach.c
--- /tmp/uucp-1.07-24/unix/detach.c     2003-05-29 08:08:48.000000000 +0200
+++ /tmp/uucp-1.07-25/unix/detach.c     2019-02-15 23:13:33.044217199 +0100
@@ -98,10 +98,8 @@
       if (ipid != 0)
        _exit (EXIT_SUCCESS);
 
-      /* We'll always wind up as a child of process number 1, right?
-        Right?  We have to wait for our parent to die before
-        reenabling SIGHUP.  */
-      while (getppid () != 1)
+      /* We have to wait for our parent to die before reenabling SIGHUP. */
+      while (getppid () == igrp)
        sleep (1);
 
       ipid = getpid ();

The assumption that the new parent of an orphaned child becomes the init
process is no longer true control groups (cgroups).

Regards Jörg

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 
'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.20.0-trunk-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_CRAP, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages uucp depends on:
ii  bsd-mailx [mailx]           8.1.2-0.20180807cvs-1
ii  cu                          1.07-25
ii  libc6                       2.28-7
ii  libpam-runtime              1.3.1-5
ii  libpam0g                    1.3.1-5
ii  mailutils [mailx]           1:3.5-2
ii  netbase                     5.6
ii  systemd-cron [cron-daemon]  1.5.14-2

Versions of packages uucp recommends:
ii  exim4      4.92~RC6-1
ii  logrotate  3.14.0-4

uucp suggests no packages.

-- Configuration Files:
/etc/uucp/call [Errno 13] Keine Berechtigung: '/etc/uucp/call'
/etc/uucp/passwd [Errno 13] Keine Berechtigung: '/etc/uucp/passwd'

-- no debconf information

-- 
Ein Mensch sieht ein und das ist wichtig,
nichts ist ganz falsch und nichts ganz richtig.
                                               (Eugen Roth)

Attachment: signature.asc
Description: PGP signature

Reply via email to