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.3 | CC: | 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
Vivian Bian
2009-01-19 09:57:12 UTC
please attach /var/hts/results.xml Created attachment 329419 [details]
the result.xml file
Also found this bug in rhel4.8 AS x86_64 system with hts-5.3-14. Created attachment 329681 [details]
/var/hts/results.xml for x86_64
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")
*** Bug 480583 has been marked as a duplicate of this bug. *** 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.
Please try the command.py patch to see if it eliminates the hang. Created attachment 329763 [details]
command.py patch - revised error handling
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.
Created attachment 329767 [details]
htskudzu.py patch for accessing kudzu-discovered devices by UDI
Verified both cdrom and dvd test passed in hts-5.3.15.el4. 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 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |