Bug 1280327 - [GSS](6.4.z) Timing issue in StandardEngine.getBaseDir allows for sporadic NPE
Summary: [GSS](6.4.z) Timing issue in StandardEngine.getBaseDir allows for sporadic NPE
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web
Version: 6.4.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR1
: EAP 6.4.6
Assignee: Aaron Ogburn
QA Contact: Michael Cada
URL:
Whiteboard:
Depends On:
Blocks: 1235746
TreeView+ depends on / blocked
 
Reported: 2015-11-11 13:34 UTC by Aaron Ogburn
Modified: 2019-08-15 05:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-17 11:44:04 UTC
Type: Bug
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2048563 0 None None None 2016-01-22 00:16:35 UTC

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.


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