[jira] [Commented] (SLING-7320) NPE in sling commons threads

2017-12-20 Thread Konrad Windszus (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16298367#comment-16298367
 ] 

Konrad Windszus commented on SLING-7320:


This looks related to the NPE observerd in 
https://issues.apache.org/jira/browse/SLING-6261?focusedCommentId=16174537&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16174537.

> NPE in sling commons threads
> 
>
> Key: SLING-7320
> URL: https://issues.apache.org/jira/browse/SLING-7320
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Threads 3.2.10
> Environment: Linux, jdk18
>Reporter: Ivo Leitão
>
> I'm currently running a number of integration tests via pax exam and 
> sometimes I see the following stacktrace. I've already seen this in a running 
> sling also. This happens only in some runs but on that cases is breaking my 
> CI workflow
> Exception in thread "sling-default-5" java.lang.NullPointerException
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.copy(ThreadLocalCleaner.java:186)
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.saveOldThreadLocals(ThreadLocalCleaner.java:176)
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.(ThreadLocalCleaner.java:51)
>   at 
> org.apache.sling.commons.threads.impl.ThreadPoolExecutorCleaningThreadLocals.beforeExecute(ThreadPoolExecutorCleaningThreadLocals.java:55)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-7320) NPE in sling commons threads

2017-12-20 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SLING-7320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16298433#comment-16298433
 ] 

Ivo Leitão commented on SLING-7320:
---

Yes, it's similar but this one it's on the copy method. On that example I've 
not seen a NPE on that method

Regards,  

> NPE in sling commons threads
> 
>
> Key: SLING-7320
> URL: https://issues.apache.org/jira/browse/SLING-7320
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Threads 3.2.10
> Environment: Linux, jdk18
>Reporter: Ivo Leitão
>
> I'm currently running a number of integration tests via pax exam and 
> sometimes I see the following stacktrace. I've already seen this in a running 
> sling also. This happens only in some runs but on that cases is breaking my 
> CI workflow
> Exception in thread "sling-default-5" java.lang.NullPointerException
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.copy(ThreadLocalCleaner.java:186)
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.saveOldThreadLocals(ThreadLocalCleaner.java:176)
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.(ThreadLocalCleaner.java:51)
>   at 
> org.apache.sling.commons.threads.impl.ThreadPoolExecutorCleaningThreadLocals.beforeExecute(ThreadPoolExecutorCleaningThreadLocals.java:55)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-7320) NPE in sling commons threads

2017-12-23 Thread JIRA

[ 
https://issues.apache.org/jira/browse/SLING-7320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16302632#comment-16302632
 ] 

Ivo Leitão commented on SLING-7320:
---

Just to update this issue I've just catched this exception in the change method 
also. Stacktrace bellow:

Exception in thread "sling-default-1" java.lang.NullPointerException
at 
org.apache.sling.commons.threads.impl.DefaultThreadPool$LoggingThreadLocalChangeListener.changed(DefaultThreadPool.java:160)
at 
org.apache.sling.commons.threads.impl.ThreadLocalCleaner.changed(ThreadLocalCleaner.java:141)
at 
org.apache.sling.commons.threads.impl.ThreadLocalCleaner.diff(ThreadLocalCleaner.java:119)
at 
org.apache.sling.commons.threads.impl.ThreadLocalCleaner.cleanup(ThreadLocalCleaner.java:79)
at 
org.apache.sling.commons.threads.impl.ThreadPoolExecutorCleaningThreadLocals.afterExecute(ThreadPoolExecutorCleaningThreadLocals.java:63)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

> NPE in sling commons threads
> 
>
> Key: SLING-7320
> URL: https://issues.apache.org/jira/browse/SLING-7320
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Threads 3.2.10
> Environment: Linux, jdk18
>Reporter: Ivo Leitão
>
> I'm currently running a number of integration tests via pax exam and 
> sometimes I see the following stacktrace. I've already seen this in a running 
> sling also. This happens only in some runs but on that cases is breaking my 
> CI workflow
> Exception in thread "sling-default-5" java.lang.NullPointerException
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.copy(ThreadLocalCleaner.java:186)
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.saveOldThreadLocals(ThreadLocalCleaner.java:176)
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.(ThreadLocalCleaner.java:51)
>   at 
> org.apache.sling.commons.threads.impl.ThreadPoolExecutorCleaningThreadLocals.beforeExecute(ThreadPoolExecutorCleaningThreadLocals.java:55)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SLING-7320) NPE in sling commons threads

2018-01-23 Thread Konrad Windszus (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16335881#comment-16335881
 ] 

Konrad Windszus commented on SLING-7320:


The latter NPE can only happen if listener is {{null}}. {{listener}} is a final 
field in {{ThreadLocalCleaner}} and is set only once in the constructor. Can 
you give a test case how to reproduce? At least from within Sling the listener 
can never be {{null}}.

The former NPE can only happen if the initReflectionFields() method has thrown 
an exception (which may happen with other JDKs than OpenJDK/Oracle). I will 
guard around this better in the future.

> NPE in sling commons threads
> 
>
> Key: SLING-7320
> URL: https://issues.apache.org/jira/browse/SLING-7320
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Threads 3.2.10
> Environment: Linux, jdk18
>Reporter: Ivo Leitão
>Priority: Major
>
> I'm currently running a number of integration tests via pax exam and 
> sometimes I see the following stacktrace. I've already seen this in a running 
> sling also. This happens only in some runs but on that cases is breaking my 
> CI workflow
> Exception in thread "sling-default-5" java.lang.NullPointerException
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.copy(ThreadLocalCleaner.java:186)
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.saveOldThreadLocals(ThreadLocalCleaner.java:176)
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.(ThreadLocalCleaner.java:51)
>   at 
> org.apache.sling.commons.threads.impl.ThreadPoolExecutorCleaningThreadLocals.beforeExecute(ThreadPoolExecutorCleaningThreadLocals.java:55)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-7320) NPE in sling commons threads

2018-01-23 Thread Konrad Windszus (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16335915#comment-16335915
 ] 

Konrad Windszus commented on SLING-7320:


Prevented the NPE in copy with 
https://github.com/apache/sling-org-apache-sling-commons-threads/commit/bb1ec98753d7972a63d961e81725796ac2a918a8.

> NPE in sling commons threads
> 
>
> Key: SLING-7320
> URL: https://issues.apache.org/jira/browse/SLING-7320
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Threads 3.2.10
> Environment: Linux, jdk18
>Reporter: Ivo Leitão
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Commons Threads 3.2.14
>
>
> I'm currently running a number of integration tests via pax exam and 
> sometimes I see the following stacktrace. I've already seen this in a running 
> sling also. This happens only in some runs but on that cases is breaking my 
> CI workflow
> Exception in thread "sling-default-5" java.lang.NullPointerException
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.copy(ThreadLocalCleaner.java:186)
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.saveOldThreadLocals(ThreadLocalCleaner.java:176)
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.(ThreadLocalCleaner.java:51)
>   at 
> org.apache.sling.commons.threads.impl.ThreadPoolExecutorCleaningThreadLocals.beforeExecute(ThreadPoolExecutorCleaningThreadLocals.java:55)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-7320) NPE in sling commons threads

2018-01-26 Thread Konrad Windszus (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16341182#comment-16341182
 ] 

Konrad Windszus commented on SLING-7320:


Actually my fix was not sufficient. The correct fix for the first NPE is now in 
SLING-7447.

> NPE in sling commons threads
> 
>
> Key: SLING-7320
> URL: https://issues.apache.org/jira/browse/SLING-7320
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Affects Versions: Commons Threads 3.2.10
> Environment: Linux, jdk18
>Reporter: Ivo Leitão
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Commons Threads 3.2.16
>
>
> I'm currently running a number of integration tests via pax exam and 
> sometimes I see the following stacktrace. I've already seen this in a running 
> sling also. This happens only in some runs but on that cases is breaking my 
> CI workflow
> Exception in thread "sling-default-5" java.lang.NullPointerException
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.copy(ThreadLocalCleaner.java:186)
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.saveOldThreadLocals(ThreadLocalCleaner.java:176)
>   at 
> org.apache.sling.commons.threads.impl.ThreadLocalCleaner.(ThreadLocalCleaner.java:51)
>   at 
> org.apache.sling.commons.threads.impl.ThreadPoolExecutorCleaningThreadLocals.beforeExecute(ThreadPoolExecutorCleaningThreadLocals.java:55)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)