Hi,
Recently, we changed our thread pool implementation using Java 8 Future<>. However, after that the Yourkit could not show the active class/method using in the Future<> thread. It always showed that the main thread was waiting. In contrast, the visualvm showed the correct result, however, it is harder to configure on the remote server. Could you guys give us some solution about this issue? Thank you!
Could not sample the Future<> threads
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Could not sample the Future<> threads
Hi,
Could you please provide more detail on the problem: the snapshot file demonstrating it, screenshots of YourKit vs visualvm, etc. If you cannot share them in the forum could you please email them to [email protected]
Best regards,
Anton
Could you please provide more detail on the problem: the snapshot file demonstrating it, screenshots of YourKit vs visualvm, etc. If you cannot share them in the forum could you please email them to [email protected]
Best regards,
Anton
-
- Posts: 3
- Joined: Tue May 31, 2016 9:48 pm
Re: Could not sample the Future<> threads
I tried to mimic the similar logic by using the java lambda and future, it works OK. So I think it's should not the problem of what I said earlier.
I shared the snapshot log here : https://drive.google.com/open?id=0B423M ... WhraVF3eGc
The symptom is that under "hot spots" it only shows the 'java.lang.Thread.run()' took 99% time without internal functions.
Most of the work was running in the "finished threads", I can see some of the functions were listed there if I moved to the green part. Any insight what could be the problem? Thanks.
I shared the snapshot log here : https://drive.google.com/open?id=0B423M ... WhraVF3eGc
The symptom is that under "hot spots" it only shows the 'java.lang.Thread.run()' took 99% time without internal functions.
Most of the work was running in the "finished threads", I can see some of the functions were listed there if I moved to the green part. Any insight what could be the problem? Thanks.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Could not sample the Future<> threads
Hi,
Thank you for sharing the snapshot.
https://www.yourkit.com/docs/java/help/filters.jsp
Please turn the filters off, e.g. with "Settings | Apply Filters".
https://www.yourkit.com/docs/java/help/ ... ptions.jsp
Best regards,
Anton
Thank you for sharing the snapshot.
The default filters filter out too much in your case:The symptom is that under "hot spots" it only shows the 'java.lang.Thread.run()' took 99% time without internal functions.
https://www.yourkit.com/docs/java/help/filters.jsp
Please turn the filters off, e.g. with "Settings | Apply Filters".
Please see the startup option "deadthreadlimit":Most of the work was running in the "finished threads"
https://www.yourkit.com/docs/java/help/ ... ptions.jsp
Sorry, I don't understand. Could you please clarify what you mean with "the green part".I can see some of the functions were listed there if I moved to the green part.
Best regards,
Anton
-
- Posts: 3
- Joined: Tue May 31, 2016 9:48 pm
Re: Could not sample the Future<> threads
Aha, it is the filter that caused the problem!
Our project became the apache project recently. And the default filter out all apache.org activities. Now everything comes back! Thank you!
Our project became the apache project recently. And the default filter out all apache.org activities. Now everything comes back! Thank you!
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Could not sample the Future<> threads
Thank you for notifying us that the problem is solved.