Red Hat Bugzilla – Bug 167204
lvremove eats cpu forever, holding locks, with /dev/null as stdin
Last modified: 2007-11-30 17:11:12 EST
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):
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.
That's very old code - yes, it fails to do error handling properly and needs
fixed in CVS