Bug 745865 (EDG-14) - ServerWorker thread naming problem
Summary: ServerWorker thread naming problem
Keywords:
Status: VERIFIED
Alias: EDG-14
Product: JBoss Data Grid 6
Classification: JBoss
Component: Infinispan
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ER8
: 6.1.0
Assignee: Tristan Tarrant
QA Contact: Nobody
URL: http://jira.jboss.org/jira/browse/EDG-14
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-14 13:09 UTC by Michal Linhard
Modified: 2018-09-12 22:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
If a server is used for both Hot Rod and Memcached, it is not possible to distinguish between the worker threads for each protocol because they are all named "MemcachedServerWorker". This does not affect the functionality of the server.
Clone Of:
Environment:
Last Closed: 2011-08-03 08:40:54 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker EDG-14 0 Minor Closed ServerWorker thread naming problem 2020-10-23 02:57:27 UTC
Red Hat Issue Tracker ISPN-1954 0 Minor Closed Wrong ServerWorker thread name in Hot rod server 2020-10-23 02:57:27 UTC
Red Hat Issue Tracker JBPAPP-6957 0 Major Closed Component upgrades for future EDG versions 2020-10-23 02:57:41 UTC

Description Michal Linhard 2011-03-14 13:09:51 UTC
project_key: EDG

When debugging/profiling EDG, we're seeing HotRod server calls being executed by MemcachedServerWorker threads.

This is probably caused by presence of two AbstractProtocolServers in EDG (hotrod and memcached), each setting its ThreadNameDeterminer 
(in NettyTransport.start) using static method ThreadRenamingRunnable.setThreadNameDeterminer() whereby memcached overwrites the singleton set by hotrod and therefore effectively setting the threadPrefix for all threads.

Comment 1 Galder Zamarreño 2011-03-14 16:13:30 UTC
I'm looking into this and I don't think the issue is to do with static or singleton properties. The NettyTransport class that would in theory correspond to the Hot Rod server is receiving threadNamePrefix="Memcached" in the constructor.

Comment 2 Galder Zamarreño 2011-03-14 16:18:09 UTC
Actually no, forget what I said, it is indeed a limitation in Netty. The second time it sets the delimiter, it overrides it with a delimiter associated with the Memcached transport, and so has the properties of the NettyTransport class associated with Memcached in spite of trying to generate a thread name for Hot Rod. Trying to see if there's a workaround...

Comment 3 Galder Zamarreño 2011-03-14 16:28:12 UTC
Link: Added: This issue depends NETTY-336


Comment 4 Galder Zamarreño 2011-03-14 16:28:13 UTC
There's little else I can do at this point. Maybe I could get rid of the prefix but we might need it at some point, and the prefix is still valid for standalone use cases. So, I'm leaving this open and keeping it unassigned.

Comment 5 Trustin Lee 2011-05-13 08:09:02 UTC
What would be the desired behavior?  Do you want Netty not to rename threads at all?

Comment 6 Galder Zamarreño 2011-05-17 09:48:57 UTC
Hmm Trustin, the problem is explained in NETTY-336 and you have fixed it now? Not sure I understand your question.

Comment 7 Galder Zamarreño 2011-08-03 07:50:43 UTC
Michal, I'm closing this, marking as deferred and putting a note for the release notes.

We should maybe have a JIRA of future upgrades that are needed to get around issues like this or JBPAPP-6928.

Comment 8 Galder Zamarreño 2011-08-03 08:40:54 UTC
Release Notes Docs Status: Added: Not Yet Documented
Release Notes Text: Added: Due to a limitation of one of the libraries used within EDG, thread naming of Memcached and Hot Rod endpoints might appear mixed up. In fact, the Hot Rod endpoint executions might appear to be executed by a thread whose named starts with 'Memcached'. This no impact though on the functionality EDG provides.


Comment 9 Galder Zamarreño 2011-08-03 09:01:57 UTC
Link: Added: This issue relates to JBPAPP-6957


Comment 10 Anne-Louise Tangring 2011-09-26 19:41:23 UTC
Release Notes Docs Status: Removed: Not Yet Documented 
Release Notes Text: Removed: Due to a limitation of one of the libraries used within EDG, thread naming of Memcached and Hot Rod endpoints might appear mixed up. In fact, the Hot Rod endpoint executions might appear to be executed by a thread whose named starts with 'Memcached'. This no impact though on the functionality EDG provides. 


Comment 11 Michal Linhard 2012-03-01 14:06:56 UTC
This is still an issue in JDG 6.0.0.ER1, not very hot one, but wrong thread names might be confusing to users ...

Comment 12 Michal Linhard 2012-03-29 10:03:23 UTC
Still issue in JDG 6.0.0.ER5

Comment 13 Michal Linhard 2012-04-02 10:51:59 UTC
Still issue in JDG 6.0.0.ER6

Comment 14 Tristan Tarrant 2012-04-04 11:42:23 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When a server is being used both for HotRod and Memcached, it will not be possible to distinguish the worker threads dedicated to each protocol since they will all be named "MemcachedServerWorker". This does not affect functionality.

Comment 15 Misha H. Ali 2012-04-04 16:13:08 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-When a server is being used both for HotRod and Memcached, it will not be possible to distinguish the worker threads dedicated to each protocol since they will all be named "MemcachedServerWorker". This does not affect functionality.+If a server is used for both Hot Rod and Memcached, it is not possible to distinguish between the worker threads for each protocol because they are all named "MemcachedServerWorker". This does not affect the functionality of the server.

Comment 16 JBoss JIRA Server 2012-04-10 06:58:25 UTC
Galder Zamarreño <galder.zamarreno> made a comment on jira ISPN-1954

Michal, the issue is fixed but in Netty 4.x and not in the 3.2.x branch that we're using. No Netty 4.x versions have been released yet. Netty 3.3 does not fix this.

Comment 17 JBoss JIRA Server 2012-04-11 07:48:39 UTC
Galder Zamarreño <galder.zamarreno> made a comment on jira ISPN-1954

I've emailed Trustin to double check, but I'm pretty sure this is only in 4.x and will take a while to get released.

Comment 18 JBoss JIRA Server 2012-04-11 10:17:33 UTC
Galder Zamarreño <galder.zamarreno> made a comment on jira ISPN-1954

Trustin replied and indeed indicated that it only went into Netty 4.x which has had no releases yet. So, this won't happen for a while.

Comment 19 Misha H. Ali 2012-06-06 03:19:12 UTC
This bug is nominated for inclusion in the JDG 6 GA Release Notes as a known issue. Setting needinfo for assignee to clarify or ACK technical note information about this issue and any possible workarounds.

Comment 20 Tristan Tarrant 2012-06-06 09:58:43 UTC
The technical note is still valid. There are no workarounds.

Comment 21 mark yarborough 2012-11-14 14:42:28 UTC
ttarrant will add jira links as appropriate.

Comment 22 Michal Linhard 2013-01-14 13:25:06 UTC
Verified. Memcached and Hotrod worker threads have correct names in JDG 6.1.0.ER8 (8.1)


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