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

Felix Meschberger commented on FELIX-3965:
------------------------------------------

Nice catch !
                
> threads configuration status generates invalid results
> ------------------------------------------------------
>
>                 Key: FELIX-3965
>                 URL: https://issues.apache.org/jira/browse/FELIX-3965
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>    Affects Versions: webconsole-4.0.0
>            Reporter: Valentin Valchev
>            Assignee: Valentin Valchev
>             Fix For: webconsole-4.0.2
>
>
> I'm quite surprised, that nobody noticed that "Threads" tab in Configuration 
> Status generates invalid result.
> There are two problems:
> 1. The number of reported threads in the status is incorrect.
> The reason is that we are enumerating all threads in all thread groups. 
> However in some JVMs enumerating the root thread group will return *all* 
> threads. So we count the threads at least twice - once being enumerated from 
> the root group, and once - from their own thread group.
> 2. Some threads are not printed at all.
> Our comparators doesn't guarantee that the null elements in the array will 
> always get at the end of the array. So occasionally we can get a sorted array 
> with nulls in front. Then, if we print one the first N (the actual thread 
> count) from the array. Nulls are skipped, but the counter is increased, so 
> finally some threads remain unprinted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to