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

Bug 1280327

Summary: [GSS](6.4.z) Timing issue in StandardEngine.getBaseDir allows for sporadic NPE
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Aaron Ogburn <aogburn>
Component: WebAssignee: Aaron Ogburn <aogburn>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Cada <mcada>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.5CC: bmaxwell, istudens, mcada, rhatlapa, rmaucher
Target Milestone: CR1   
Target Release: EAP 6.4.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 11:44:04 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:
Bug Depends On:    
Bug Blocks: 1235746    
Attachments:
Description Flags
01536606.btm none

Description Aaron Ogburn 2015-11-11 13:34:38 UTC
Description of problem:

A timing issue can allow for the following sporadic NPE that fails a deployment upon start up:

java.lang.NullPointerException
        at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:99)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_40]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_40]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.NullPointerException
        at java.io.File.<init>(File.java:277) [rt.jar:1.8.0_40]
        at org.apache.catalina.core.StandardContext.engineBase(StandardContext.java:4130)
        at org.apache.catalina.core.StandardContext.workBase(StandardContext.java:4137)
        at org.apache.catalina.core.StandardContext.getWorkPath(StandardContext.java:1696)
        at org.apache.catalina.core.StandardContext.postWorkDirectory(StandardContext.java:4401)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:3667)
        at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163)
        at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61)
        at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)
        ... 6 more

Version-Release number of selected component (if applicable):


How reproducible:

Easily reproducible with the attached byteman rule

Steps to Reproduce:
1. Configure JBoss using the attached byteman rule:

-javaagent:/path/to/lib/byteman.jar=script:/path/to/01536606.btm,sys:/path/to/lib/byteman.jar

2. Start JBoss with 2 deployments
3. Check for the NPE

Actual results:

Possible NPE


Expected results:

No NPEs

Comment 1 Aaron Ogburn 2015-11-11 13:36:08 UTC
Created attachment 1092745 [details]
01536606.btm

Comment 2 Aaron Ogburn 2015-11-11 14:37:18 UTC
PR: https://github.com/jbossas/jboss-eap/pull/2623

Comment 3 Michael Cada 2016-01-14 16:06:33 UTC
Verified with EAP 6.4.6.CP.CR2

Comment 4 Petr Penicka 2017-01-17 11:44:04 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.