Bug 1758900 - Processes disowned from GUI-based shells are improperly disowned
Summary: Processes disowned from GUI-based shells are improperly disowned
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1357426
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-06 16:48 UTC by Karl
Modified: 2022-05-29 01:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-26 18:40:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
MPI program to catch all signals sent to the child processes, generating output every 10 seconds. This should verify that no catchable signals are being sent. (578 bytes, text/x-csrc)
2019-10-06 16:48 UTC, Karl
no flags Details

Description Karl 2019-10-06 16:48:43 UTC
Created attachment 1622935 [details]
MPI program to catch all signals sent to the child processes, generating output every 10 seconds. This should verify that no catchable signals are being sent.

Description of problem:
When a background process (e.g., a multiprocessor task started from mpiexec) is disowned from within the GUI, it is killed when the user logs out. The disowned processes are being killed with SIGKILL, so there is no way to prevent their demise.

Version-Release number of selected component (if applicable):
systemd-241-12.git1e19bcd.fc30.x86_64

How reproducible:
I have managed to reproduce this on two different machines.

Steps to Reproduce:
1. Log in on both the GUI and the text-only console
2. Start Gnome Terminal on the GUI.
3. Run a process that you intend to remain running after you log out that does not require access to DISPLAY.
4. Disown that process from the shell, exit the shell, and log out.
5. Switch to the text-only console on which you are logged in and verify that the process is still running (it will be) and producing output. Its PPID will be that of a systemd process owned by the user.
6. Log out of the text-only console.
7. Wait a minute or so, then log back in, either on the GUI or on one of the text-only consoles.
8. Check the process you had before; if it works as it does for me, it will be absent from the process listing, and no output will be produced.

Actual results:
Dead process and/or process disowned only as far as systemd.

Expected results:
Process continues, independent of user activity, until sent a signal (including if system reboots or is shut down). Process should have a PPID of 1, which is the system-owned systemd process (not the user-owned systemd process). Alternatively, the user-owned systemd process should continue, without killing user jobs, as long as the job is running.

Additional info:
This does not happen from SSH connections. For example, using "ssh localhost" before starting the job causes it to disown properly (PPID = 1) once the shell exits.

I am using zsh as my shell, but this happens with bash as the login shell, too.

Comment 1 Ben Cotton 2020-04-30 20:13:11 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Ben Cotton 2020-05-26 18:40:44 UTC
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 3 Karl 2020-10-02 16:20:53 UTC
Reopened against Fedora 32 and systemd-245.8-2.fc32

Comment 4 Fedora Program Management 2021-04-29 15:58:39 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Karl 2022-05-29 01:05:57 UTC
This is still happening. Any updates?


Note You need to log in before you can comment on or make changes to this bug.