Bug 167204 - lvremove eats cpu forever, holding locks, with /dev/null as stdin
lvremove eats cpu forever, holding locks, with /dev/null as stdin
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-31 11:05 EDT by Alexandre Oliva
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-31 15:31:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexandre Oliva 2005-08-31 11:05:51 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8b3) Gecko/20050827 Fedora/1.1-0.2.8.deerpark.alpha2 Firefox/1.0+

Description of problem:
If lvremove is started from a ssh -n session, it will insist in reading a y/n response from stdin, getting read() to return 0 repeatedly.  Worse yet, it does so while holding locks, so no other lvm activity is possible.  This hit me pretty badly last night while I tried to complete some LVM rearrangements with very unreliable network access to a host.  I realize I should have used -f, but by the time I realized it, it was too late, and I couldn't even tell why my attempts to run vgreduce, pvs and lvs commands were not completing.

Version-Release number of selected component (if applicable):
lvm2-2.01.08-2.1

How reproducible:
Always

Steps to Reproduce:
1.ssh -n -f host lvremove <inactive LV>

Actual Results:  It keeps trying to read input from stdin over and over, eating cpu and holding locks.

Expected Results:  It should give up if read fails, and ideally not hold the locks while waiting for input.

Additional info:
Comment 1 Alasdair Kergon 2005-08-31 14:28:10 EDT
That's very old code - yes, it fails to do error handling properly and needs
fixing...
Comment 2 Alasdair Kergon 2005-08-31 15:31:39 EDT
fixed in CVS

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