Bug 2178798

Summary: vlock 100% CPU when console or terminal is closed abruptly
Product: Red Hat Enterprise Linux 8 Reporter: Timothy Mullican <timothy.mullican>
Component: kbdAssignee: Vitezslav Crhonek <vcrhonek>
Status: VERIFIED --- QA Contact: Evgeny Fedin <efedin>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.10CC: efedin, timothy.mullican, vcrhonek
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: kbd-2.0.4-11.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:
Attachments:
Description Flags
kbd-1.15.5-vlock-stdin-closed-inf-loop.patch none

Description Timothy Mullican 2023-03-15 18:26:53 UTC
Created attachment 1951091 [details]
kbd-1.15.5-vlock-stdin-closed-inf-loop.patch

Description of problem:
vlock causes 100% CPU usage when console or terminal is closed abruptly. It looks like there was a patch (kbd-1.15.5-vlock-stdin-closed-inf-loop.patch) as part of kbd-1.15.5-16.el7_9.x86_64.rpm, but this was not applied to newer versions of the package.

Version-Release number of selected component (if applicable):
kbd-2.0.4-10.el8.x86_64.rpm

How reproducible:
See bug# 1486233

Steps to Reproduce:
start vlock and kill TTY session.

Actual results:
100% CPU usage

Expected results:
vlock to cancel lock after TTY is absent. not cause 100% cpu usage.

Additional info:

Comment 1 Timothy Mullican 2023-03-15 18:34:36 UTC
There is also a commit for KBD v2.0.90 (https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git/commit/?id=afb661b80441b6e3fa8cfa3b69f50e4805ebf8be) "Fix infinite loop of vlock if locked VC is closed", but the RHEL 8 KBD RPM uses v2.0.4.

Comment 2 Vitezslav Crhonek 2023-03-20 08:26:15 UTC
Thank you, reproduced.