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

Bug 899899 (JBPAPP6-718)

Summary: JdrReportManagmentTestCase fails on Windows platform
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Madhumita Sadhukhan <msadhukh>
Component: TestsuiteAssignee: Shelly McGowan <smcgowan>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: jjaggars, miclark, msadhukh, pslavice, smcgowan, tomaz.cerar
Target Milestone: ---   
Target Release: EAP 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-718
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-05 04:45:44 UTC Type: Bug
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
sosreport-THOR-20120507174154.zip
none
sosreport-THOR-20120507174154.zip.md5
none
sosreport-THOR-20120507180121.zip
none
sosreport-THOR-20120507180121.zip.md5 none

Description Madhumita Sadhukhan 2012-02-24 14:31:43 UTC
project_key: JBPAPP6

JdrReportManagmentTestCase fails on Windows with following exceptions:

Stacktrace:
java.lang.AssertionError: JDR report missing, not located at 
	at org.junit.Assert.fail(Assert.java:91)
	at org.junit.Assert.assertTrue(Assert.java:43)
	at org.jboss.as.test.integration.jdr.mgmt.JdrReportManagmentTestCase.generateStandaloneJdrReport(JdrReportManagmentTestCase.java:105)



Server log trace:

AttributeError: 'module' object has no attribute 'getuid'

	at org.python.core.Py.AttributeError(Py.java:166) [jython-standalone-2.5.2-redhat-1.jar:]
	at org.python.core.PyObject.noAttributeError(PyObject.java:930) [jython-standalone-2.5.2-redhat-1.jar:]
	at org.python.core.PyObject.__getattr__(PyObject.java:925) [jython-standalone-2.5.2-redhat-1.jar:]
................................................................................................................
................................................................................................................

at org.python.core.PyTableCode.call(PyTableCode.java:165) [jython-standalone-2.5.2-redhat-1.jar:]
	at org.python.core.PyCode.call(PyCode.java:18) [jython-standalone-2.5.2-redhat-1.jar:]
	at org.python.core.Py.runCode(Py.java:1261) [jython-standalone-2.5.2-redhat-1.jar:]
	at org.python.core.Py.exec(Py.java:1305) [jython-standalone-2.5.2-redhat-1.jar:]
	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:206) [jython-standalone-2.5.2-redhat-1.jar:]

Comment 1 Madhumita Sadhukhan 2012-02-24 14:32:10 UTC
Seems like Python script is not able to find uuid.

Comment 2 Madhumita Sadhukhan 2012-02-24 14:33:26 UTC
Just found existing issue in AS7...so are we expecting the fix by ER2?
https://issues.jboss.org/browse/AS7-3845

Comment 3 Madhumita Sadhukhan 2012-02-24 14:33:55 UTC
Link: Added: This issue is a dependency of AS7-3845


Comment 5 Shelly McGowan 2012-02-24 15:11:37 UTC
This was fixed upstream so EAP will get the fix for ER4.

Comment 6 Madhumita Sadhukhan 2012-02-24 15:15:04 UTC
Ondra, anything marked testsuite is getting automatically assigned to you 

Comment 7 Paul Gier 2012-03-20 21:22:06 UTC
Upstream fixes were merged with the latest rebase.

Comment 8 Madhumita Sadhukhan 2012-04-12 14:03:33 UTC
This testcase is still failing on windows with ER5 but with different exception:

Error Message

JDR Report has incorrect checksum expected:<[f3e1cc34764d5ee39c0e71aaf247fe63]> but was:<[b5da6113c90a3e9e953eb31394615c86]>

Stacktrace

org.junit.ComparisonFailure: JDR Report has incorrect checksum expected:<[f3e1cc34764d5ee39c0e71aaf247fe63]> but was:<[b5da6113c90a3e9e953eb31394615c86]>
	at org.junit.Assert.assertEquals(Assert.java:123)

http://hudson.qa.jboss.com/hudson/view/EAP6/view/EAP6-AS-Testsuite/job/eap-60-as-testsuite-Windows-matrix-OracleJDK6/jdk=java16_default,label=Win2k8_x86_64/lastCompletedBuild/testReport/org.jboss.as.test.integration.jdr.mgmt/JdrReportManagmentTestCase/generateStandaloneJdrReport/


Comment 9 Madhumita Sadhukhan 2012-04-12 14:14:58 UTC
Shelly is this passing upstream?I just checked the latest run pointed in job in AS7-3845 
and it does not seem stable

http://hudson.jboss.org/hudson/view/All/job/JBoss-AS-7.1.x-testSuite-windows/

Comment 10 Shelly McGowan 2012-04-12 14:36:12 UTC
There was a problem with git checkout on windows from Hudson escalated here:
https://engineering.redhat.com/rt/Ticket/Display.html?id=147654

looks like there are still some issues. 

Comment 11 jjaggars 2012-04-12 15:49:05 UTC
Have you tried to test the checksum outside of the test suite? I'd be interested to know what a tool like md5sum (or the equivalent on windows) outputs.

Comment 12 Shelly McGowan 2012-04-24 16:40:16 UTC
@Madmuhita,pls update with your test results against ER6.

Comment 13 Rajesh Rajasekaran 2012-04-25 22:32:27 UTC
Link: Added: This issue is a dependency of JBPAPP-8827


Comment 14 Rajesh Rajasekaran 2012-04-25 23:13:49 UTC
Link: Added: This issue is related to JBPAPP-7965


Comment 15 Rajesh Rajasekaran 2012-04-25 23:14:02 UTC
Link: Removed: This issue is a dependency of JBPAPP-8827 


Comment 16 Madhumita Sadhukhan 2012-04-29 18:46:01 UTC
This testcase fails currently(EAP6 ER6 cycle) not only on Windows but across all platforms with following stacktrace:

([("subsystem" => "jdr")]): java.lang.NullPointerException
	at org.jboss.as.jdr.SosInterpreter.getPythonScriptLocation(SosInterpreter.java:206) [jboss-as-jdr-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.jdr.SosInterpreter.collect(SosInterpreter.java:75) [jboss-as-jdr-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.jdr.SosInterpreter.collect(SosInterpreter.java:61) [jboss-as-jdr-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.jdr.JdrReportService.collect(JdrReportService.java:130) [jboss-as-jdr-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.jdr.JdrReportRequestHandler$1.execute(JdrReportRequestHandler.java:71) [jboss-as-jdr-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.jdr.JdrReportRequestHandler.execute(JdrReportRequestHandler.java:87) [jboss-as-jdr-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.ModelControllerImpl$DefaultPrepareStepHandler.execute(ModelControllerImpl.java:466) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:121) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:139) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:108) [jboss-as-controller-7.1.1.Final-redhat-1.jar:7.1.1.Final-redhat-1]
	at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:287)
	at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:487)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_24]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_24]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_24]
	at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA-redhat-1.jar:2.0.0.GA-redhat-1]



Comment 17 Shelly McGowan 2012-05-01 00:50:00 UTC
This test is passing upstream:
https://hudson.qa.jboss.com/hudson/view/JBoss%20AS/job/JBoss-AS-7.1.x-testSuite-windows/1166/testReport/org.jboss.as.jdr/

Will verify it is passing prior to the EAP 6 ER7 hand off.

Comment 18 Paul Gier 2012-05-04 22:43:17 UTC
The problem in ER6 was related to the unsigning.  This is fixed now.

Comment 19 Tomaz Cerar 2012-05-07 15:56:27 UTC
JdrReportManagmentTestCase fails with JDR Report has incorrect checksum expected <..> but was <..>
in attachment you can find report from my machine that where it fails

Comment 20 Tomaz Cerar 2012-05-07 15:56:27 UTC
Attachment: Added: sosreport-THOR-20120507174154.zip
Attachment: Added: sosreport-THOR-20120507174154.zip.md5


Comment 21 Tomaz Cerar 2012-05-07 16:02:25 UTC
JDR Report has incorrect checksum expected:<[a5f61f94cb7009eb92d1460d4e997bbc]> but was:<[ed9df33aec1c61abad027fdcf86a89fd]>

Comment 22 Tomaz Cerar 2012-05-07 16:02:25 UTC
Attachment: Added: sosreport-THOR-20120507180121.zip
Attachment: Added: sosreport-THOR-20120507180121.zip.md5


Comment 23 Tomaz Cerar 2012-05-07 17:33:16 UTC
manuly ran md5 sum:
windows native (md5sum, md5sums)= ed9df33aec1c61abad027fdcf86a89fd
jython 2.5.2 = a5f61f94cb7009eb92d1460d4e997bbc
python 2.7.2 = 48bb1228c142d9473df60242ecd500b9
java (commons-codec) = ed9df33aec1c61abad027fdcf86a89fd

python & jython have some strange results, given that windows native md5 sum (different apps) return same result that commons-codec does that would be proper result. test uses commons-codec to calculated and then compares it to what was stored in file by jython script

Comment 24 jjaggars 2012-05-07 17:36:17 UTC
Can you paste the python/jython code used to calculate the sums too?

Comment 25 Tomaz Cerar 2012-05-07 17:39:07 UTC
code used was:

{code}
import hashlib
fname= 'C:\\development\\jboss7-mine\\build\\target\\jboss-as-7.1.2.Final-SNAPSHOT\\standalone\\tmp\\sosreport-THOR-20120507180121.zip.md5'
hashlib.md5(file(fname, 'r').read()).hexdigest()
{code}

Comment 26 jjaggars 2012-05-07 17:44:54 UTC
This is on my OS X box running python 2.7.1:

{code}
>>> fname = '/Users/jhjaggars/Downloads/sosreport-THOR-20120507180121.zip'
>>> hashlib.md5(file(fname, 'r').read()).hexdigest()

'ed9df33aec1c61abad027fdcf86a89fd'
{code}

This has some symptoms of a hashlib issue in python/jython. 

Comment 27 Tomaz Cerar 2012-05-08 09:35:23 UTC
Just for reference, problem was with the way file was open, instead of 'r' for read it has to be 'rb' for read as binary.

Comment 29 Madhumita Sadhukhan 2012-05-10 23:09:23 UTC
Link: Added: This issue is incorporated by JBPAPP-8860


Comment 30 Tomaz Cerar 2012-05-11 08:59:43 UTC
Madhumita, this link is right for ER7 build, but code was fixed in upstream and is part of 7.1.2.final, can we rerun tests on latest ER8/CR1/GA code?

Comment 31 Madhumita Sadhukhan 2012-05-11 09:12:27 UTC
Tomaz,
     Please change the fix version for next release its marked for ER7.

Also please could you check JBPAPP-8860 and comment on that?currently I see 49 failures in the best run I could have on Windows in this cycle(ER7).....

Comment 32 Shelly McGowan 2012-05-15 20:10:38 UTC
This test should be fixed in ER8 on Windows.

Comment 34 Madhumita Sadhukhan 2012-05-21 09:21:04 UTC
Link: Added: This issue is related to JBPAPP-9073


Comment 35 Tom WELLS 2012-06-05 04:45:44 UTC
Release Notes Docs Status: Added: Not Required


Comment 36 Anne-Louise Tangring 2012-11-05 17:51:00 UTC
Release Notes Docs Status: Removed: Not Required 
Docs QE Status: Removed: NEW