Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 480582

Summary: cdrom/dvd test hangs (using hts-5.3-12 in rhel4 i386 and hts-5.3-14 in x86_64)
Product: [Retired] Red Hat Hardware Certification Program Reporter: Vivian Bian <vbian>
Component: Test Suite (harness)Assignee: Greg Nichols <gnichols>
Status: CLOSED ERRATA QA Contact: Lawrence Lim <llim>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: rlandry, tools-bugs, tyan, ykun
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-27 22:59:00 UTC Type: ---
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
the result.xml file
none
/var/hts/results.xml for x86_64
none
command.py patch changing to read pipe before waiting
none
command.py patch - revised error handling
none
opticalDiskTest.py patch for RHEL4-specific issues
none
htskudzu.py patch for accessing kudzu-discovered devices by UDI none

Description Vivian Bian 2009-01-19 09:57:12 UTC
Description of problem:
when tried to run the cdrom test suite,the progress of running cdrom.py hang,and will not work again

Version-Release number of selected component (if applicable):
hts-5.3-12 
linux-2.6.9-78.12.ELsmp i386 rhel4 U8

How reproducible:
Always

Steps to Reproduce:
1.hts plan -t cdrom -e
2.hts run -t cdrom
3.wait for the running process
  
Actual results:
the process of running cdrom.py hang,and will not work again

Expected results:
the process could run till the return result of code=0


Additional info:

Comment 1 Greg Nichols 2009-01-19 15:06:51 UTC
please attach /var/hts/results.xml

Comment 2 Vivian Bian 2009-01-20 03:11:14 UTC
Created attachment 329419 [details]
the result.xml file

Comment 3 Yan Tian 2009-01-22 03:08:06 UTC
Also found this bug in rhel4.8 AS x86_64 system with hts-5.3-14.

Comment 4 Yan Tian 2009-01-22 03:10:20 UTC
Created attachment 329681 [details]
/var/hts/results.xml for x86_64

Comment 5 YangKun 2009-01-22 08:13:24 UTC
the reason this test hangs is because the following statement(in the opticalDiskTest.py file) hangs while trying to find all the UDIs on RHEL4:
    udiList = lshalCommand.getStringList(regex="udi = \'(?<udi>[^\']+)\'", regexGroup="udi")


what I find out is: not only the ".getStringList()" hangs here, but following methods also will hang:
    udiList = lshalCommand.run()
    udiList = lshalCommand.echo()


I think the key issue is the "lshalCommand". the command to run here is "lshal", it has huge amount of outputs on stdout. I tried to replace "lshal" with another command --> "tree /proc", which also has huge outputs on stdout, the ".getStringList()" and ".run()" and ".echo()" also hung. But if I replace "lshal" with "lshal > /tmp/lshal.log" , which has no output on stdout, the ".echo()" no longer hangs, it returns with an error message telling me the command has output on stderr.


the simple steps to re-produce this error are:
    1) # cd /usr/share/hts/lib/hts/
    2) # python
    3) >>> from command import Command, HTSCommandException
    4) >>> lshalCommand = Command("lshal")
    5) >>> udiList = lshalCommand.echo()


Guess this should be a general issue ? maybe about the buffer ?


the old cdrom test won't have this issue on RHEL4, because it uses another way to find all the UDIs:
    lshalOutput = commands.getoutput("lshal | grep 'udi =' | sed /info.udi/d | colrm 1 6")

Comment 6 Greg Nichols 2009-01-22 19:17:36 UTC
*** Bug 480583 has been marked as a duplicate of this bug. ***

Comment 7 Greg Nichols 2009-01-22 19:19:24 UTC
Created attachment 329731 [details]
command.py patch changing to read pipe before waiting


This patch changes the command class to call readlines before calling wait on the pipe to prevent a process/subprocess deadlock.

Comment 8 Greg Nichols 2009-01-22 19:20:57 UTC
Please try the command.py patch to see if it eliminates the hang.

Comment 9 Greg Nichols 2009-01-23 02:38:56 UTC
Created attachment 329763 [details]
command.py patch - revised error handling

Comment 10 Greg Nichols 2009-01-23 02:41:09 UTC
Created attachment 329766 [details]
opticalDiskTest.py patch for RHEL4-specific issues


This patch to opticalDiskTest (used by cdrom and dvd tests) fixes issues arising on RHEL4 related to reduced HAL services and use of Kudzu.

Comment 11 Greg Nichols 2009-01-23 02:42:41 UTC
Created attachment 329767 [details]
htskudzu.py patch for accessing kudzu-discovered devices by UDI

Comment 13 Yan Tian 2009-01-23 05:54:00 UTC
Verified both cdrom and dvd test passed in hts-5.3.15.el4.

Comment 15 errata-xmlrpc 2009-01-27 22:59:00 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0047.html

Comment 16 Red Hat Bugzilla 2023-09-14 01:15:07 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days