Bug 480582 - cdrom/dvd test hangs (using hts-5.3-12 in rhel4 i386 and hts-5.3-14 in x86_64) [NEEDINFO]
cdrom/dvd test hangs (using hts-5.3-12 in rhel4 i386 and hts-5.3-14 in x86_64)
Status: CLOSED ERRATA
Product: Red Hat Hardware Certification Program
Classification: Red Hat
Component: Test Suite (harness) (Show other bugs)
5.3
All Linux
low Severity medium
: ---
: ---
Assigned To: Greg Nichols
Lawrence Lim
:
: 480583 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-19 04:57 EST by Vivian Bian
Modified: 2014-03-25 20:56 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-27 17:59:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
gnichols: needinfo? (ykun)


Attachments (Terms of Use)
the result.xml file (29.45 KB, text/xml)
2009-01-19 22:11 EST, Vivian Bian
no flags Details
/var/hts/results.xml for x86_64 (1.60 MB, text/xml)
2009-01-21 22:10 EST, Yan Tian
no flags Details
command.py patch changing to read pipe before waiting (301 bytes, patch)
2009-01-22 14:19 EST, Greg Nichols
no flags Details | Diff
command.py patch - revised error handling (1022 bytes, patch)
2009-01-22 21:38 EST, Greg Nichols
no flags Details | Diff
opticalDiskTest.py patch for RHEL4-specific issues (1.68 KB, patch)
2009-01-22 21:41 EST, Greg Nichols
no flags Details | Diff
htskudzu.py patch for accessing kudzu-discovered devices by UDI (418 bytes, patch)
2009-01-22 21:42 EST, Greg Nichols
no flags Details | Diff

  None (edit)
Description Vivian Bian 2009-01-19 04:57:12 EST
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 10:06:51 EST
please attach /var/hts/results.xml
Comment 2 Vivian Bian 2009-01-19 22:11:14 EST
Created attachment 329419 [details]
the result.xml file
Comment 3 Yan Tian 2009-01-21 22:08:06 EST
Also found this bug in rhel4.8 AS x86_64 system with hts-5.3-14.
Comment 4 Yan Tian 2009-01-21 22:10:20 EST
Created attachment 329681 [details]
/var/hts/results.xml for x86_64
Comment 5 YangKun 2009-01-22 03:13:24 EST
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 14:17:36 EST
*** Bug 480583 has been marked as a duplicate of this bug. ***
Comment 7 Greg Nichols 2009-01-22 14:19:24 EST
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 14:20:57 EST
Please try the command.py patch to see if it eliminates the hang.
Comment 9 Greg Nichols 2009-01-22 21:38:56 EST
Created attachment 329763 [details]
command.py patch - revised error handling
Comment 10 Greg Nichols 2009-01-22 21:41:09 EST
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-22 21:42:41 EST
Created attachment 329767 [details]
htskudzu.py patch for accessing kudzu-discovered devices by UDI
Comment 13 Yan Tian 2009-01-23 00:54:00 EST
Verified both cdrom and dvd test passed in hts-5.3.15.el4.
Comment 15 errata-xmlrpc 2009-01-27 17:59:00 EST
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

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