Bug 2128989
Summary: | pkttyagent gets stopped if killed in the background | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | José Enrique <josgutie> | |
Component: | polkit | Assignee: | Jan Rybar <jrybar> | |
Status: | CLOSED ERRATA | QA Contact: | Frantisek Sumsal <fsumsal> | |
Severity: | high | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 8.6 | CC: | fjin, fsumsal, jrybar, jsuchane, msekleta, virt-maint, yalzhang | |
Target Milestone: | rc | Keywords: | Regression, Triaged, ZStream | |
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | polkit-0.115-15.el8 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2150310 2186311 2186756 2186757 (view as bug list) | Environment: | ||
Last Closed: | 2023-05-16 09:12:22 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 2150310, 2186311, 2186756, 2186757 |
Description
José Enrique
2022-09-22 08:25:00 UTC
Not reproduced with: libvirt-daemon-6.0.0-37.module+el8.5.0+12162+40884dd2.x86_64 1. run virsh in backgroud # virsh list & [1] 63993 # Id Name State -------------------- 2. check the process # ps f PID TTY STAT TIME COMMAND 63091 pts/1 Ss 0:00 -bash 64031 pts/1 R+ 0:00 \_ ps f 59348 pts/0 Ss+ 0:00 -bash 1017 ttyS1 Ss+ 0:00 /sbin/agetty -o -p -- \u --keep-baud 115200,38400,9600 ttyS1 vt220 1016 tty1 Ss+ 0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux (no virsh process running) Reproduced with: libvirt-8.0.0-10.module+el8.7.0+16047+746a126c.x86_64 1. run virsh in backgroud # virsh list & [1] 327395 2. check the process # ps f PID TTY STAT TIME COMMAND 327362 pts/0 Ss 0:00 -bash 327395 pts/0 Tl 0:00 \_ virsh list 327397 pts/0 Tl 0:00 | \_ /usr/bin/pkttyagent --process 327395 --notify-fd 4 --fallback 327545 pts/0 R+ 0:00 \_ ps f 2040 ttyS0 Ss+ 0:00 /sbin/agetty -o -p -- \u --keep-baud 115200,38400,9600 ttyS0 vt220 2039 tty1 Ss+ 0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux [1]+ Stopped virsh list 3. track the virsh process # strace -p 327395 strace: Process 327395 attached --- stopped by SIGTTOU --- (virsh process run in background hangs) Preliminary fix posted here: https://gitlab.freedesktop.org/polkit/polkit/-/merge_requests/139 The fix was merged upstream to polkit and it looks like it fixes the issue: https://gitlab.freedesktop.org/polkit/polkit/-/commit/07593c1055ddbdda85465e09da1f44b1b4f0fc3d It is caused originally by a combination of two commits, one in polkit fixing Bug 1693781 and one in libvirt fixing Bug 1945501. To reproduce this it is enough to run pkttyagent in the background and kill it. It can even be used to put in a password and then backgrounded and killed: $ pkttyagent & $ kill %1 $ [1]+ Terminated pkttyagent $ It should not get stopped and it should not disable echo for the terminal (both of which could happen before this patch due to bash changing the tty attributes). On top of that any of the aforementioned BZs should not be broken by this change. I'm reassigning this to polkit since there is nothing to do in libvirt. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (polkit bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:3051 |