Weblogic - Socket Muxers in Thread Dumps

2023-11-18

What are these weblogic.socket.Muxer threads seen in thread dumps ?

Note: for a basic primer on taking thread dumps and analyzing them, see this earlier article

Socket Reader Threads accept the incoming request from the Listen Thread Queue and put it on the Execute Thread Queue.

In WL 8.1, there are 3 socket reader threads by default.
In WL 9 and 10, WebLogic allocates 33% of server threads to act as socket readers by default. This need not be changed usually.


One socket reader thread is usually in the poll function, while the others are available to process requests.
The polling thread is highlighted in the thread dump below.

"ExecuteThread: '2' for queue: 'weblogic.socket.Muxer'" daemon prio=5 tid=0x016b2148 nid=0x42 waiting for monitor entry [5997f000..5997fc28]
at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:91)
- waiting to lock <0x94846b40> (a java.lang.String)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
"ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'" daemon prio=5 tid=0x00683c28 nid=0x41 waiting for monitor entry [59a7f000..59a7fc28]
at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:91)
- waiting to lock <0x94846b40> (a java.lang.String)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
"ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'" daemon prio=5 tid=0x0079e5b0 nid=0x40 runnable [59b7f000..59b7fc28]
at weblogic.socket.PosixSocketMuxer.poll(Native Method)
at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:100)
- locked <0x94846b40> (a java.lang.String)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

In an earlier support case on Stuck Threads, we asked BEA:

Should we worry about the Weblogic.socket.Muxer threads which always show 2 threads waiting for lock and 3rd thread locking the same object?

The Muxer TD is attached. This shows same behaviour on all our Weblogic servers.

Full thread dump Java HotSpot(TM) Server VM (1.4.2_05-b04 mixed mode):

"ExecuteThread: '2' for queue: 'weblogic.socket.Muxer'" daemon prio=5 tid=0x0151
c588 nid=0x1b4 waiting for monitor entry [ad57f000..ad57fc28]
        at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:91)
        - waiting to lock <0xd9331760> (a java.lang.String)
        at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
"ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'" daemon prio=5 tid=0x0161
d608 nid=0x1b3 runnable [ad67f000..ad67fc28]
        at weblogic.socket.PosixSocketMuxer.poll(Native Method)
        at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:100)
        - locked <0xd9331760> (a java.lang.String)
        at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
"ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'" daemon prio=5 tid=0x01bb
6730 nid=0x1b2 waiting for monitor entry [ad77f000..ad77fc28]
        at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:91)
        - waiting to lock <0xd9331760> (a java.lang.String)
        at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

The reply from BEA Support was that the above pattern of weblogic.socket.Muxer threads are not a cause of stuck threads.
Why do they mostly show as being Stuck in Samurai TD analyzer ?



As the image shows, when you analyze thread dumps using Samurai, the muxer threads are shown as being Stuck since they're all locked on the same object. This is probably treated as a deadlock condition.

"ExecuteThread: '2' for queue: 'weblogic.socket.Muxer'"
- waiting to lock <0xd9b61098> (a java.lang.String)

"ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'"
- waiting to lock <0xd9b61098> (a java.lang.String)


"ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'"
- locked <0xd9b61098> (a java.lang.String)

But you will see the same in any Thread dump even on a development instance with no requests.
The locks mentioned do show up as red in Samurai - but they aren't deadlocks just regular locks.

A thread gains an exclusive lock on an object to perform some action, then frees it allowing the next thread to gain access.

Additionally, if you look at the thread dumps over time, you'll see that these specific locks are not always present - they are moving between the threads which is indicative of their transitory nature.

I want to know more details on Muxers
The socket Muxer manages the server’s existing socket connections.
It first determines which sockets have incoming requests waiting to be processed. It then reads enough data to determine the protocol and dispatches the socket to an appropriate runtime layer based on the protocol.
In the runtime layer, the socket muxer threads determine which execute thread queue to be used and delegates the request accordingly.

From the documentation on http://edocs.bea.com/wls/docs100/perform/WLSTuning.html#wp1152246 ,
Weblogic has two versions of the socket muxer, one is the Java version and the other uses a native library which makes better use of operating system calls. The Enable Native IO checkbox on the server’s configuration settings tells the server which version to use. This is ON by default for most platforms.

Native muxers provide superior scalability because they implement a non-blocking thread model. When a native muxer is used, the server creates a fixed number of threads dedicated to reading incoming requests. Oracle recommends using the default setting of true for the Enable Native IO parameter which allows the server to automatically select the appropriate muxer to use.

You must ensure that to use Native I/O, the native library must be present in the server’s shared library path . This is set up with the default scripts.
When the server does not find the native library, it throws an error
java.lang.UnsatisfiedLinkError: no muxer in java.library.path
and then loads the Java version of the muxer.

Confirm the LD library path is okay and pointing to the Solaris LD path. Check the startup log when starting a managed server. What is the value of java.library.path?
This is where the JVM actually get's the library from.

http://m-button.blogspot.com/2008/08/how-does-weblogic-handle-socket-muxers.html has a good example of how to identify Native vs Java muxer in a thread dump.

The Thread Dump I’ve used in my examples above uses the Native muxer (weblogic.socket.PosixSocketMuxer) on Solaris.

Solaris has another Native muxer called the weblogic.socket.DevPollSocketMuxer
An example TD using this muxer is shown below.

"ExecuteThread: '4' for queue: 'weblogic.socket.Muxer'" waiting for lock java.lang.String@4edf4f BLOCKED
weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:95)
weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
"ExecuteThread: '3' for queue: 'weblogic.socket.Muxer'" RUNNABLE native
weblogic.socket.DevPollSocketMuxer.doPoll(Native Method)
weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:96)
weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
"ExecuteThread: '2' for queue: 'weblogic.socket.Muxer'" waiting for lock java.lang.String@4edf4f BLOCKED
weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:95)
weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
"ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'" waiting for lock java.lang.String@4edf4f BLOCKED
weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:95)
weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
"ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'" waiting for lock java.lang.String@4edf4f BLOCKED
weblogic.socket.DevPollSocketMuxer.processSockets(DevPollSocketMuxer.java:95)
weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:42)
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)

To change the number of Muxers from the default, follow the instructions given at http://e-docs.bea.com/wls/docs92/ConsoleHelp/taskhelp/tuning/TuningSocketReaders.html

See http://jojovedder.blogspot.com/2009/07/more-on-weblogic-muxers.htmlfor an update on Muxers

Additionally on Oracle JRockit JVMs - there are some information in the thread dumps which point out the same problem in a different manner.

After the normal stack dumps, BEA JRockit performs a deadlock detection. This is done by finding "lock chains" in the Java application. If a lock chain is found to be circular, the application is considered caught in a deadlock.

A detailed explanation of the 3 types of lock chains in JRockit is given here
What is relevant for us is the example of Muxers which are shown as:


Blocked lock chains
===================
Chain 2:
"ExecuteThread: '2' for queue: 'weblogic.socket.Muxer'" id=129 idx=0x218 tid=4079 waiting for java/lang/String@0x37804000 held by:
"ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'" id=127 idx=0x210 tid=4077 in chain 1

Open lock chains
================
Chain 1:
"ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'" id=128 idx=0x214 tid=4078 waiting for java/lang/String@0x37804000 held by:
"ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'" id=127 idx=0x210 tid=4077 (active)

As per the explanation, the Open lock chain depicts Thread 1 waiting for Thread 0. This is not a deadlock, only a straight dependency.

Since Thread 0 is already part of the Open lock chain, the fact that Thread 2 is also waiting on the same Thread 0 is treated as a "Blocked lock chain".
In this case this is not a problem.

Update 15th Feb 2011

I'm glad this blog entry on weblogic muxers has made it onto the Oracle forums with a mention from James Bayer.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Weblogic - Socket Muxers in Thread Dumps 的相关文章

随机推荐

  • kali2.0 Metasploit连接postgres数据库

    sudo u postgres createuser demo P 创建用户demo sudo u postgres psql 进入数据库 postgres password demo 设置密码 sudo u postgres create
  • CK-GW06-E00与CODESYS TCP通信

    CK GW06 E00与CODESYS TCP通信 CK GW06 E00是一款支持标准工业通讯协议Modbus TCP的网关控制器 方便用户集成 到 PLC 等控制系统中 本控制器提供了网络 POE 供电和直流电源供电两种方式 确保用 户
  • 计数排序动漫与代码

    前言 从复杂度较高的 冒泡排序 选择排序 插入排序 不包含二分插入排序 这些时间复杂度为 O N 2 的排序 再到归并排序 快速排序 堆排序 这些时间复杂度为 O nlogn 的排序 还有么有更快的 答有 它来了它来了 它带着一波动画共计1
  • 解决keil中 点击setting 程序中断问题

    自己写了一个LED常亮的程序 入门嘛 但是程序在下载后 点击 debug setting 在软件识别J link后 程序是成功的 但是LED不亮了 下面是解决方法 记住把2标记处的对勾去掉就可以了 这个功能是 在你连接完成时自动在Reset
  • linux怎样重启网卡,linux系统重启网卡的方法步骤详解

    在实际工作中 经常会遇到Linux系统进行重启网卡的操作 接下来是小编为大家收集的linux系统重启网卡方法 希望能帮到大家 linux系统重启网卡方法 一 service network restart 1 首先用CRT工具连接到Linu
  • GPT-4更新了哪些功能-GPT-4 Plus申请流程

    GPT 4相比GPT3有哪些更新 以下是对GPT 4的优势的详解 1 更强大的语言生成能力 GPT 4将有望比其前身 GPT 3模型生成更精准 更准确 更自然的文本 同时在更短的时间内完成 2 更高的文本理解能力 随着深度学习的技术进步 G
  • Ubuntu操作系统学习笔记之文件系统挂载管理

    概念 在磁盘或分区上创建好的文件系统 需要挂载到一个目录才能使用 windows和Mac会进行自动挂载 即文件系统一创建好就自动挂载到系统上 挂载到windows上的文件系统称之为 C盘 D盘 E盘 等 Linux需要手动进行挂载操作 或者
  • Typora图片路径问题之相对路径前没有点斜杠

    一 背景 在使用typora时 复制一张图片显示的路径前面没有点斜杠 二 遇到的问题 如图所示 原因 typora偏低版本还没有自动在前面加点斜杠的功能 三 解决方法 升级最新版本 效果如图 1 4 3 新增功能 添加选项以在为图像生成相对
  • lua 源码阅读 1.1 -> 2.1

    lua 1 1 阅读1 hash c 中 a 对建立的 Hash array 用 listhead 链式结构来管理 新增lua hashcollector 用来做 Hash 的回收处理 ps 1 0 用的是个 512 的数组 用一个少一个
  • 关于Qt::BlockingQueuedConnection非死锁的程序卡住

    Qt BlockingQueuedConnection如果sender和receiver运行于同一线程 会报错 Qt Dead lock detected while activating a BlockingQueuedConnectio
  • 网络化,元宇宙的门槛

    如果森林中的一棵树倒下 但周围没有人听到 那它是否会发出声音 这一思想实验可以追溯到数百年前 这个实验之所以经久不衰 部分原因是它很有趣 而它之所以很有趣 是因为它耐人寻味并且融人了哲思 人们通常认为 上面这个问题最初是由主观唯心主义哲学家
  • 【自动化测试】如何在jenkins中搭建allure

    相信大家在做自动化测试过程中 都会用到自动化测试环境 目前最常见的就是通过容器化方式部署自动化测试环境 但对于一些测试小白 不是很会搭建持续集成环境 特别是从0 1的过程 需要自行搭建很多依赖环境 今天就给大家介绍一下如何在jenkins搭
  • 小程序开发-Now you can provide attr "wx:key" for a "wx:for" to improve performance

    当我们开发微信小程序用到 wx for 时可能会在控制台报 Now you can provide attr wx key for a wx for to improve performance 警告 不要慌张这只是警告不妨碍运行 消除警告
  • html 常用知识点

    段落 h3 登黄鹤楼 h3 p 白日依山尽 p p 黄河入海流 p 跳转页面 a href http www daidu com target blank title 欢迎登陆 a href 链接的地址 target 打开页面的方式 tit
  • do while(0)的妙用

    do while 0 的妙用 do while 0 就如同一个花括号 具有独立的作用域 花括号所表示的符合语句是一个整体 do while 语句同样是一个整体 同样可以在if 等条件语句后直接使用 但是后所不同的是 do while 作为循
  • Mac 解决 command not found: mysql

    首先检查下面的目录中是否有mysql命令 cd usr local mysql bin 如果有的话 使用 echo export PATH PATH usr local mysql bin gt gt zshrc 即可解决 参考链接 htt
  • Ubuntu关闭无用服务

    linux的各大发行版 都有些不必要的服务被默认开启了 针对ubuntu 我们可以采用选择性关闭的方法加速起动 提高系统性能 这里我们安装一个软件 sudo apt get install sysv rc conf 然后这样起动 sudo
  • 力扣动态规划专题(一)背包理论基础 基础动规题 动规注意点 步骤及C++实现

    文章目录 动态规划 509 斐波那契数 五步骤 代码 70 爬楼梯 五步骤 代码 746 使用最小花费爬楼梯 五步骤 代码 扩展 62 不同路径 动态规划 数论 63 不同路径 II 五步骤 代码 343 整数拆分 五步骤 代码 96 不同
  • 什么是servlet?servlet有什么用?

    servlet概述 什么是servlet servlet有什么用 servlet是java编写的服务器端的程序 运行在web服务器中 作用 接收用户端发来的请求 调用其他java程序来处理请求 将处理结果 返回到服务器中 servlet的生
  • Weblogic - Socket Muxers in Thread Dumps

    What are these weblogic socket Muxer threads seen in thread dumps Note for a basic primer on taking thread dumps and ana