Bug 1280327 - [GSS](6.4.z) Timing issue in StandardEngine.getBaseDir allows for sporadic NPE
[GSS](6.4.z) Timing issue in StandardEngine.getBaseDir allows for sporadic NPE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: CR1
: EAP 6.4.6
Assigned To: Aaron Ogburn
Michael Cada
Depends On:
Blocks: 1235746
  Show dependency treegraph
Reported: 2015-11-11 08:34 EST by Aaron Ogburn
Modified: 2017-01-17 06:44 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-01-17 06:44:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
01536606.btm (876 bytes, text/plain)
2015-11-11 08:36 EST, Aaron Ogburn
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2048563 None None None 2016-01-21 19:16 EST

  None (edit)
Description Aaron Ogburn 2015-11-11 08:34:38 EST
Description of problem:

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

        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:


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

Actual results:

Possible NPE

Expected results:

Comment 1 Aaron Ogburn 2015-11-11 08:36 EST
Created attachment 1092745 [details]
Comment 2 Aaron Ogburn 2015-11-11 09:37:18 EST
PR: https://github.com/jbossas/jboss-eap/pull/2623
Comment 3 Michael Cada 2016-01-14 11:06:33 EST
Verified with EAP 6.4.6.CP.CR2
Comment 4 Petr Penicka 2017-01-17 06:44:04 EST
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.

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