LiuGuH opened a new pull request, #8992:
URL: https://github.com/apache/hadoop/pull/8992

   <div class="md-block" style="margin: 0px; padding: 0px; box-sizing: 
border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, 
sans-serif; color: rgb(204, 204, 204); font-size: 18px; font-style: normal; 
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; 
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; 
text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 
0px; white-space: normal; background-color: rgb(30, 30, 30); 
text-decoration-thickness: initial; text-decoration-style: initial; 
text-decoration-color: initial;"><h2 style="margin: 16px 0px 8px; padding: 0px; 
box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
system-ui, sans-serif; font-weight: 600; color: rgb(224, 224, 224); 
overflow-wrap: break-word; font-size: 1.3em;">Problem</h2></div><div 
class="md-block" style="margin: 0px; padding: 0px; box-sizing: border-box; 
font-family: &quot;.AppleSystemUIFont&quot;, Inter
 , system-ui, sans-serif; color: rgb(204, 204, 204); font-size: 18px; 
font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; 
font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; 
text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; 
-webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 
30, 30); text-decoration-thickness: initial; text-decoration-style: initial; 
text-decoration-color: initial;"><p style="margin: 0px 0px 10px; padding: 0px; 
box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
system-ui, sans-serif; word-break: break-word; overflow-wrap: break-word; 
max-width: 100%;">A production DFSRouter died with a native OOM while creating 
a new thread:</p></div><div class="md-block" style="margin: 0px; padding: 0px; 
box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
system-ui, sans-serif; color: rgb(204, 204, 204); font-size: 18px; font-style: 
normal; 
 font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; 
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; 
text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 
0px; white-space: normal; background-color: rgb(30, 30, 30); 
text-decoration-thickness: initial; text-decoration-style: initial; 
text-decoration-color: initial;"><div class="code-block-wrapper" style="margin: 
10px 0px; padding: 0px; box-sizing: border-box; font-family: 
&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; position: 
relative; cursor: default;"><pre style="margin: 0px; padding: 12px 40px 12px 
12px; box-sizing: border-box; font-family: &quot;JetBrains Mono&quot;, 
Consolas, monospace; background-color: rgb(30, 30, 30); border-color: rgb(51, 
51, 51); border-style: solid; border-width: 1.11111px; border-image: none 100% 
/ 1 / 0 stretch; border-radius: 6px; overflow-x: auto; font-size: 18px; 
line-height: 1.2; max-width: 100%; cursor: defaul
 t;"><code style="margin: 0px; padding: 0px; box-sizing: border-box; 
font-family: inherit; background-color: transparent; border-radius: 3px; 
font-size: inherit; overflow-wrap: break-word; cursor: text; color: rgb(224, 
224, 224);"># There is insufficient memory for the Java Runtime Environment to 
continue.
   # Native memory allocation (mmap) failed to map 12288 bytes for committing 
reserved memory.
   #
   #  Out of Memory Error (os_linux.cpp:2640), pid=&lt;redacted&gt;
   
   Current thread (0x00007ee90de5d800):  JavaThread "IPC Client (1604275183) 
connection to NN:8020 from userA" daemon [_thread_new, id=65241, 
stack(0x00007ee1e9442000,0x00007ee1e9543000)]
   
   Stack: [0x00007ee1e9442000,0x00007ee1e9543000],  sp=0x00007ee1e9541a20,  
free space=1022k
   Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native 
code)
   V  [libjvm.so+0xad21aa]  VMError::report_and_die()+0x2ba
   V  [libjvm.so+0x5022db]  report_vm_out_of_memory(char const*, int, unsigned 
long, VMErrorType, char const*)+0x8b
   V  [libjvm.so+0x92fe33]  os::Linux::commit_memory_impl(char*, unsigned long, 
bool)+0x123
   V  [libjvm.so+0x92fefc]  os::pd_commit_memory(char*, unsigned long, bool)+0xc
   V  [libjvm.so+0x927f8a]  os::commit_memory(char*, unsigned long, bool)+0x2a
   V  [libjvm.so+0x92bc4f]  os::pd_create_stack_guard_pages(char*, unsigned 
long)+0x7f
   V  [libjvm.so+0xa771ce]  JavaThread::create_stack_guard_pages()+0x5e
   V  [libjvm.so+0xa81454]  JavaThread::run()+0x34
   V  [libjvm.so+0x930198]  java_start(Thread*)+0x108
   C  [libpthread.so.0+0x7ea5]  start_thread+0xc5
   </code></pre><button type="button" class="copy-code-btn" title="Copy code" 
aria-label="Copy code" style="margin: 0px; padding: 4px; box-sizing: 
border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, 
sans-serif; position: absolute; top: 6px; right: 6px; width: 28px; height: 
28px; background: none 0% 0% / auto repeat scroll padding-box border-box 
rgb(37, 37, 38); border-color: rgb(51, 51, 51); border-style: solid; 
border-width: 1.11111px; border-image: none 100% / 1 / 0 stretch; 
border-radius: 4px; cursor: pointer; display: flex; align-items: center; 
justify-content: center; color: rgb(224, 224, 224); transition: opacity 0.2s, 
background 0.2s, color 0.2s, border-color 0.2s; z-index: 10; opacity: 
0.7;"><span class="copy-icon" style="margin: 0px; padding: 0px; box-sizing: 
border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, 
sans-serif; display: flex; align-items: center; justify-content: center;"><svg 
width="14" height="14" viewBox="0 0 16 16"
  fill="none" xmlns="http://www.w3.org/2000/svg";><path d="M4 4l0 8a2 2 0 0 0 2 
2l8 0a2 2 0 0 0 2 -2l0 -8a2 2 0 0 0 -2 -2l-8 0a2 2 0 0 0 -2 2zm2 0l8 0l0 8l-8 
0l0 -8z" fill="currentColor" fill-opacity="0.9"></path><path d="M2 2l0 8l-2 0l0 
-8a2 2 0 0 1 2 -2l8 0l0 2l-8 0z" fill="currentColor" 
fill-opacity="0.6"></path></svg></span><span class="copy-tooltip" 
style="margin: 0px; padding: 4px 8px; box-sizing: border-box; font-family: 
&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; position: 
absolute; top: -30px; right: 0px; background: none 0% 0% / auto repeat scroll 
padding-box border-box rgb(45, 45, 45); color: rgb(204, 204, 204); 
border-color: rgb(62, 62, 66); border-style: solid; border-width: 1.11111px; 
border-image: none 100% / 1 / 0 stretch; box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 
4px 0px; border-radius: 4px; font-size: 12px; opacity: 0; visibility: hidden; 
transition: opacity 0.2s, visibility 0.2s; pointer-events: none; white-space: 
nowrap; z-index: 20;"></span></button
 ></div></div><div class="md-block" style="margin: 0px; padding: 0px; 
 >box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
 >system-ui, sans-serif; color: rgb(204, 204, 204); font-size: 18px; 
 >font-style: normal; font-variant-ligatures: normal; font-variant-caps: 
 >normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: 
 >start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; 
 >-webkit-text-stroke-width: 0px; white-space: normal; background-color: 
 >rgb(30, 30, 30); text-decoration-thickness: initial; text-decoration-style: 
 >initial; text-decoration-color: initial;"><p style="margin: 0px 0px 10px; 
 >padding: 0px; box-sizing: border-box; font-family: 
 >&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; word-break: 
 >break-word; overflow-wrap: break-word; max-width: 100%;">The failure was 
 >in<span> </span><code style="margin: 0px; padding: 2px 4px; box-sizing: 
 >border-box; font-family: &quot;JetBrains Mono&quot;, Consolas, monospac
 e; background-color: rgba(255, 255, 255, 0.1); border-radius: 3px; font-size: 
inherit; overflow-wrap: break-word;">create_stack_guard_pages()</code><span> 
</span>— the JVM could not mmap the stack for yet another thread. The thread 
dump shows why:</p></div><div class="md-block" style="margin: 0px; padding: 
0px; box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, 
Inter, system-ui, sans-serif; color: rgb(204, 204, 204); font-size: 18px; 
font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; 
font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; 
text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; 
-webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 
30, 30); text-decoration-thickness: initial; text-decoration-style: initial; 
text-decoration-color: initial;">
   Thread kind | Count
   -- | --
   IPC Parameter Sending Thread for ... (blocked) | 25,191
   IPC Client (...) connection to ... | 2,319
   Total Java threads | 32,449
   
   </div><div class="md-block" style="margin: 0px; padding: 0px; box-sizing: 
border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, 
sans-serif; color: rgb(204, 204, 204); font-size: 18px; font-style: normal; 
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; 
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; 
text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 
0px; white-space: normal; background-color: rgb(30, 30, 30); 
text-decoration-thickness: initial; text-decoration-style: initial; 
text-decoration-color: initial;"><p style="margin: 0px 0px 10px; padding: 0px; 
box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
system-ui, sans-serif; word-break: break-word; overflow-wrap: break-word; 
max-width: 100%;">Almost all threads target the same subcluster NameNode from 
the router. The sending threads outnumber the actual connections by ~11:1, each 
one holding a ~1MB native
  stack — enough to exhaust the process's address space /<span> </span><code 
style="margin: 0px; padding: 2px 4px; box-sizing: border-box; font-family: 
&quot;JetBrains Mono&quot;, Consolas, monospace; background-color: rgba(255, 
255, 255, 0.1); border-radius: 3px; font-size: inherit; overflow-wrap: 
break-word;">vm.max_map_count</code>.</p></div><div class="md-block" 
style="margin: 0px; padding: 0px; box-sizing: border-box; font-family: 
&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; color: rgb(204, 
204, 204); font-size: 18px; font-style: normal; font-variant-ligatures: normal; 
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 
2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; 
word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; 
background-color: rgb(30, 30, 30); text-decoration-thickness: initial; 
text-decoration-style: initial; text-decoration-color: initial;"><h2 
style="margin: 16px 0px 8px; paddi
 ng: 0px; box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, 
Inter, system-ui, sans-serif; font-weight: 600; color: rgb(224, 224, 224); 
overflow-wrap: break-word; font-size: 1.3em;">Root cause</h2></div><div 
class="md-block" style="margin: 0px; padding: 0px; box-sizing: border-box; 
font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; 
color: rgb(204, 204, 204); font-size: 18px; font-style: normal; 
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; 
letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; 
text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 
0px; white-space: normal; background-color: rgb(30, 30, 30); 
text-decoration-thickness: initial; text-decoration-style: initial; 
text-decoration-color: initial;"><p style="margin: 0px 0px 10px; padding: 0px; 
box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
system-ui, sans-serif; word-break: break-word
 ; overflow-wrap: break-word; max-width: 100%;">When an IPC<span> </span><code 
style="margin: 0px; padding: 2px 4px; box-sizing: border-box; font-family: 
&quot;JetBrains Mono&quot;, Consolas, monospace; background-color: rgba(255, 
255, 255, 0.1); border-radius: 3px; font-size: inherit; overflow-wrap: 
break-word;">Connection</code><span> </span>is marked closed (idle timeout, I/O 
error, or a FATAL response), its<span> </span><code style="margin: 0px; 
padding: 2px 4px; box-sizing: border-box; font-family: &quot;JetBrains 
Mono&quot;, Consolas, monospace; background-color: rgba(255, 255, 255, 0.1); 
border-radius: 3px; font-size: inherit; overflow-wrap: 
break-word;">RpcRequestSender</code><span> </span>thread (<code style="margin: 
0px; padding: 2px 4px; box-sizing: border-box; font-family: &quot;JetBrains 
Mono&quot;, Consolas, monospace; background-color: rgba(255, 255, 255, 0.1); 
border-radius: 3px; font-size: inherit; overflow-wrap: break-word;">IPC 
Parameter Sending Thread for ...<
 /code>) is left blocked in<span> </span><code style="margin: 0px; padding: 2px 
4px; box-sizing: border-box; font-family: &quot;JetBrains Mono&quot;, Consolas, 
monospace; background-color: rgba(255, 255, 255, 0.1); border-radius: 3px; 
font-size: inherit; overflow-wrap: 
break-word;">rpcRequestQueue.poll(maxIdleTime)</code>. It only notices the 
close after the poll times out, so the thread — and its stack / mapped memory — 
lingers for up to<span> </span><code style="margin: 0px; padding: 2px 4px; 
box-sizing: border-box; font-family: &quot;JetBrains Mono&quot;, Consolas, 
monospace; background-color: rgba(255, 255, 255, 0.1); border-radius: 3px; 
font-size: inherit; overflow-wrap: 
break-word;">ipc.client.connection.maxidletime</code><span> </span>after the 
connection is already gone.</p></div><div class="md-block" style="margin: 0px; 
padding: 0px; box-sizing: border-box; font-family: 
&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; color: rgb(204, 
204, 204); font-size:
  18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: 
normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: 
start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; 
-webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 
30, 30); text-decoration-thickness: initial; text-decoration-style: initial; 
text-decoration-color: initial;"><p style="margin: 0px 0px 10px; padding: 0px; 
box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
system-ui, sans-serif; word-break: break-word; overflow-wrap: break-word; 
max-width: 100%;"><code style="margin: 0px; padding: 2px 4px; box-sizing: 
border-box; font-family: &quot;JetBrains Mono&quot;, Consolas, monospace; 
background-color: rgba(255, 255, 255, 0.1); border-radius: 3px; font-size: 
inherit; overflow-wrap: break-word;">markClosed()</code><span> 
</span>calls<span> </span><code style="margin: 0px; padding: 2px 4px; 
box-sizing: border-box; f
 ont-family: &quot;JetBrains Mono&quot;, Consolas, monospace; background-color: 
rgba(255, 255, 255, 0.1); border-radius: 3px; font-size: inherit; 
overflow-wrap: break-word;">notifyAll()</code>, which only wakes the<span> 
</span><code style="margin: 0px; padding: 2px 4px; box-sizing: border-box; 
font-family: &quot;JetBrains Mono&quot;, Consolas, monospace; background-color: 
rgba(255, 255, 255, 0.1); border-radius: 3px; font-size: inherit; 
overflow-wrap: break-word;">Connection.run()</code><span> </span>thread 
(blocked in<span> </span><code style="margin: 0px; padding: 2px 4px; 
box-sizing: border-box; font-family: &quot;JetBrains Mono&quot;, Consolas, 
monospace; background-color: rgba(255, 255, 255, 0.1); border-radius: 3px; 
font-size: inherit; overflow-wrap: break-word;">waitForWork()</code>'s<span> 
</span><code style="margin: 0px; padding: 2px 4px; box-sizing: border-box; 
font-family: &quot;JetBrains Mono&quot;, Consolas, monospace; background-color: 
rgba(255, 255, 255, 0.1); bor
 der-radius: 3px; font-size: inherit; overflow-wrap: 
break-word;">wait(timeout)</code>). The sender thread blocks inside<span> 
</span><code style="margin: 0px; padding: 2px 4px; box-sizing: border-box; 
font-family: &quot;JetBrains Mono&quot;, Consolas, monospace; background-color: 
rgba(255, 255, 255, 0.1); border-radius: 3px; font-size: inherit; 
overflow-wrap: break-word;">SynchronousQueue.poll(timeout)</code>, which does 
not wait on the connection monitor, so it is never woken and only exits once 
the poll times out. The connection thread exits on close; the sender thread 
stays behind and accumulates. Under heavy connection churn (e.g. a DFSRouter 
recycling pooled connections to its subcluster NameNodes), these lingering 
threads pile up until the JVM can no longer create new threads.</p></div><div 
class="md-block" style="margin: 0px; padding: 0px; box-sizing: border-box; 
font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; 
color: rgb(204, 204, 204); font-size: 
 18px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: 
normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: 
start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; 
-webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(30, 
30, 30); text-decoration-thickness: initial; text-decoration-style: initial; 
text-decoration-color: initial;"><h2 style="margin: 16px 0px 8px; padding: 0px; 
box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
system-ui, sans-serif; font-weight: 600; color: rgb(224, 224, 224); 
overflow-wrap: break-word; font-size: 1.3em;">Changes</h2></div><div 
class="md-block" style="margin: 0px; padding: 0px; box-sizing: border-box; 
font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; 
color: rgb(204, 204, 204); font-size: 18px; font-style: normal; 
font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; 
letter-spacing: normal; orpha
 ns: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; 
word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; 
background-color: rgb(30, 30, 30); text-decoration-thickness: initial; 
text-decoration-style: initial; text-decoration-color: initial;"><p 
style="margin: 0px 0px 10px; padding: 0px; box-sizing: border-box; font-family: 
&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; word-break: 
break-word; overflow-wrap: break-word; max-width: 100%;"><code style="margin: 
0px; padding: 2px 4px; box-sizing: border-box; font-family: &quot;JetBrains 
Mono&quot;, Consolas, monospace; background-color: rgba(255, 255, 255, 0.1); 
border-radius: 3px; font-size: inherit; overflow-wrap: 
break-word;">Connection.markClosed()</code><span> </span>additionally<span> 
</span><code style="margin: 0px; padding: 2px 4px; box-sizing: border-box; 
font-family: &quot;JetBrains Mono&quot;, Consolas, monospace; background-color: 
rgba(255, 255, 255, 0.1); border-rad
 ius: 3px; font-size: inherit; overflow-wrap: 
break-word;">interrupt()</code><span> </span>the<span> </span><code 
style="margin: 0px; padding: 2px 4px; box-sizing: border-box; font-family: 
&quot;JetBrains Mono&quot;, Consolas, monospace; background-color: rgba(255, 
255, 255, 0.1); border-radius: 3px; font-size: inherit; overflow-wrap: 
break-word;">rpcRequestThread</code>, so the blocked<span> </span><code 
style="margin: 0px; padding: 2px 4px; box-sizing: border-box; font-family: 
&quot;JetBrains Mono&quot;, Consolas, monospace; background-color: rgba(255, 
255, 255, 0.1); border-radius: 3px; font-size: inherit; overflow-wrap: 
break-word;">poll()</code><span> </span>throws<span> </span><code 
style="margin: 0px; padding: 2px 4px; box-sizing: border-box; font-family: 
&quot;JetBrains Mono&quot;, Consolas, monospace; background-color: rgba(255, 
255, 255, 0.1); border-radius: 3px; font-size: inherit; overflow-wrap: 
break-word;">InterruptedException</code><span> </span>immediately and t
 he sending thread exits promptly.</p></div><div class="md-block" 
style="margin: 0px; padding: 0px; box-sizing: border-box; font-family: 
&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; color: rgb(204, 
204, 204); font-size: 18px; font-style: normal; font-variant-ligatures: normal; 
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 
2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; 
word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; 
background-color: rgb(30, 30, 30); text-decoration-thickness: initial; 
text-decoration-style: initial; text-decoration-color: initial;"><div 
class="code-block-wrapper" style="margin: 10px 0px; padding: 0px; box-sizing: 
border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, 
sans-serif; position: relative; cursor: default;"><pre style="margin: 0px; 
padding: 12px 40px 12px 12px; box-sizing: border-box; font-family: 
&quot;JetBrains Mono&quot;, Consolas, monosp
 ace; background-color: rgb(30, 30, 30); border-color: rgb(51, 51, 51); 
border-style: solid; border-width: 1.11111px; border-image: none 100% / 1 / 0 
stretch; border-radius: 6px; overflow-x: auto; font-size: 18px; line-height: 
1.2; max-width: 100%; cursor: default;"><code class="language-java" 
style="margin: 0px; padding: 0px; box-sizing: border-box; font-family: inherit; 
background-color: transparent; border-radius: 3px; font-size: inherit; 
overflow-wrap: break-word; cursor: text; color: rgb(224, 224, 224);"><span 
class="hljs-keyword" style="margin: 0px; padding: 0px; box-sizing: border-box; 
font-family: inherit; color: rgb(255, 123, 114);">private</span> <span 
class="hljs-keyword" style="margin: 0px; padding: 0px; box-sizing: border-box; 
font-family: inherit; color: rgb(255, 123, 114);">synchronized</span> <span 
class="hljs-keyword" style="margin: 0px; padding: 0px; box-sizing: border-box; 
font-family: inherit; color: rgb(255, 123, 114);">void</span> <span 
class="hljs-title functio
 n_" style="margin: 0px; padding: 0px; box-sizing: border-box; font-family: 
inherit; color: rgb(210, 168, 255);">markClosed</span><span class="hljs-params" 
style="margin: 0px; padding: 0px; box-sizing: border-box; font-family: 
inherit;">(IOException e)</span> {
     <span class="hljs-keyword" style="margin: 0px; padding: 0px; box-sizing: 
border-box; font-family: inherit; color: rgb(255, 123, 114);">if</span> 
(shouldCloseConnection.compareAndSet(<span class="hljs-literal" style="margin: 
0px; padding: 0px; box-sizing: border-box; font-family: inherit; color: 
rgb(121, 192, 255);">false</span>, <span class="hljs-literal" style="margin: 
0px; padding: 0px; box-sizing: border-box; font-family: inherit; color: 
rgb(121, 192, 255);">true</span>)) {
       closeException = e;
       notifyAll();
       <span class="hljs-comment" style="margin: 0px; padding: 0px; box-sizing: 
border-box; font-family: inherit; color: rgb(139, 148, 158);">// Wake the 
request sending thread. It blocks in</span>
       <span class="hljs-comment" style="margin: 0px; padding: 0px; box-sizing: 
border-box; font-family: inherit; color: rgb(139, 148, 158);">// 
rpcRequestQueue.poll(maxIdleTime) and would otherwise keep the</span>
       <span class="hljs-comment" style="margin: 0px; padding: 0px; box-sizing: 
border-box; font-family: inherit; color: rgb(139, 148, 158);">// thread (and 
its stack) alive for up to maxIdleTime after close.</span>
       rpcRequestThread.interrupt();
     }
   }
   </code></pre><button type="button" class="copy-code-btn" title="Copy code" 
aria-label="Copy code" style="margin: 0px; padding: 4px; box-sizing: 
border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, 
sans-serif; position: absolute; top: 6px; right: 6px; width: 28px; height: 
28px; background: none 0% 0% / auto repeat scroll padding-box border-box 
rgb(37, 37, 38); border-color: rgb(51, 51, 51); border-style: solid; 
border-width: 1.11111px; border-image: none 100% / 1 / 0 stretch; 
border-radius: 4px; cursor: pointer; display: flex; align-items: center; 
justify-content: center; color: rgb(224, 224, 224); transition: opacity 0.2s, 
background 0.2s, color 0.2s, border-color 0.2s; z-index: 10; opacity: 
0.7;"><span class="copy-icon" style="margin: 0px; padding: 0px; box-sizing: 
border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, 
sans-serif; display: flex; align-items: center; justify-content: center;"><svg 
width="14" height="14" viewBox="0 0 16 16"
  fill="none" xmlns="http://www.w3.org/2000/svg";><path d="M4 4l0 8a2 2 0 0 0 2 
2l8 0a2 2 0 0 0 2 -2l0 -8a2 2 0 0 0 -2 -2l-8 0a2 2 0 0 0 -2 2zm2 0l8 0l0 8l-8 
0l0 -8z" fill="currentColor" fill-opacity="0.9"></path><path d="M2 2l0 8l-2 0l0 
-8a2 2 0 0 1 2 -2l8 0l0 2l-8 0z" fill="currentColor" 
fill-opacity="0.6"></path></svg></span><span class="copy-tooltip" 
style="margin: 0px; padding: 4px 8px; box-sizing: border-box; font-family: 
&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; position: 
absolute; top: -30px; right: 0px; background: none 0% 0% / auto repeat scroll 
padding-box border-box rgb(45, 45, 45); color: rgb(204, 204, 204); 
border-color: rgb(62, 62, 66); border-style: solid; border-width: 1.11111px; 
border-image: none 100% / 1 / 0 stretch; box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 
4px 0px; border-radius: 4px; font-size: 12px; opacity: 0; visibility: hidden; 
transition: opacity 0.2s, visibility 0.2s; pointer-events: none; white-space: 
nowrap; z-index: 20;"></span></button
 ></div></div><div class="md-block" style="margin: 0px; padding: 0px; 
 >box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
 >system-ui, sans-serif; color: rgb(204, 204, 204); font-size: 18px; 
 >font-style: normal; font-variant-ligatures: normal; font-variant-caps: 
 >normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: 
 >start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; 
 >-webkit-text-stroke-width: 0px; white-space: normal; background-color: 
 >rgb(30, 30, 30); text-decoration-thickness: initial; text-decoration-style: 
 >initial; text-decoration-color: initial;"><h2 style="margin: 16px 0px 8px; 
 >padding: 0px; box-sizing: border-box; font-family: 
 >&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; font-weight: 
 >600; color: rgb(224, 224, 224); overflow-wrap: break-word; font-size: 
 >1.3em;">How was this patch tested?</h2></div><div class="md-block" 
 >style="margin: 0px; padding: 0px; box-sizing: border-box; font-family: &quot;.
 AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; color: rgb(204, 204, 
204); font-size: 18px; font-style: normal; font-variant-ligatures: normal; 
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 
2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; 
word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; 
background-color: rgb(30, 30, 30); text-decoration-thickness: initial; 
text-decoration-style: initial; text-decoration-color: initial;"><p 
style="margin: 0px 0px 10px; padding: 0px; box-sizing: border-box; font-family: 
&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; word-break: 
break-word; overflow-wrap: break-word; max-width: 100%;">Added<span> 
</span><code style="margin: 0px; padding: 2px 4px; box-sizing: border-box; 
font-family: &quot;JetBrains Mono&quot;, Consolas, monospace; background-color: 
rgba(255, 255, 255, 0.1); border-radius: 3px; font-size: inherit; 
overflow-wrap: break-word;">TestIPC#tes
 tSendingThreadExitsWhenConnectionClosed</code>:</p></div><div class="md-block" 
style="margin: 0px; padding: 0px; box-sizing: border-box; font-family: 
&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; color: rgb(204, 
204, 204); font-size: 18px; font-style: normal; font-variant-ligatures: normal; 
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 
2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; 
word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; 
background-color: rgb(30, 30, 30); text-decoration-thickness: initial; 
text-decoration-style: initial; text-decoration-color: initial;"><ul 
style="margin: 10px 0px; padding: 0px 0px 0px 24px; box-sizing: border-box; 
font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; 
max-width: 100%;"><li style="margin: 0px 0px 4px; padding: 0px; box-sizing: 
border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, 
sans-serif; overflow-wra
 p: break-word;">sets<span> </span><code style="margin: 0px; padding: 2px 4px; 
box-sizing: border-box; font-family: &quot;JetBrains Mono&quot;, Consolas, 
monospace; background-color: rgba(255, 255, 255, 0.1); border-radius: 3px; 
font-size: inherit; overflow-wrap: 
break-word;">ipc.client.connection.maxidletime</code><span> </span>to 
60s,</li><li style="margin: 0px 0px 4px; padding: 0px; box-sizing: border-box; 
font-family: &quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; 
overflow-wrap: break-word;">keeps a call in flight so the reader thread 
observes the close,</li><li style="margin: 0px 0px 4px; padding: 0px; 
box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
system-ui, sans-serif; overflow-wrap: break-word;">stops the server to mark the 
connection closed,</li><li style="margin: 0px 0px 4px; padding: 0px; 
box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
system-ui, sans-serif; overflow-wrap: break-word;">asserts the<sp
 an> </span><code style="margin: 0px; padding: 2px 4px; box-sizing: border-box; 
font-family: &quot;JetBrains Mono&quot;, Consolas, monospace; background-color: 
rgba(255, 255, 255, 0.1); border-radius: 3px; font-size: inherit; 
overflow-wrap: break-word;">IPC Parameter Sending Thread for ...</code><span> 
</span>exits within 10s (well before<span> </span><code style="margin: 0px; 
padding: 2px 4px; box-sizing: border-box; font-family: &quot;JetBrains 
Mono&quot;, Consolas, monospace; background-color: rgba(255, 255, 255, 0.1); 
border-radius: 3px; font-size: inherit; overflow-wrap: 
break-word;">maxidletime</code>), and that the in-flight call 
fails.</li></ul></div><div class="md-block" style="margin: 0px; padding: 0px; 
box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
system-ui, sans-serif; color: rgb(204, 204, 204); font-size: 18px; font-style: 
normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 
400; letter-spacing: normal; orphans:
  2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; 
word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; 
background-color: rgb(30, 30, 30); text-decoration-thickness: initial; 
text-decoration-style: initial; text-decoration-color: initial;"><h2 
style="margin: 16px 0px 8px; padding: 0px; box-sizing: border-box; font-family: 
&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; font-weight: 600; 
color: rgb(224, 224, 224); overflow-wrap: break-word; font-size: 1.3em;">Does 
this PR introduce any user-facing changes?</h2></div><div class="md-block" 
style="margin: 0px; padding: 0px; box-sizing: border-box; font-family: 
&quot;.AppleSystemUIFont&quot;, Inter, system-ui, sans-serif; color: rgb(204, 
204, 204); font-size: 18px; font-style: normal; font-variant-ligatures: normal; 
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 
2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; 
word-spacing: 0px;
  -webkit-text-stroke-width: 0px; white-space: normal; background-color: 
rgb(30, 30, 30); text-decoration-thickness: initial; text-decoration-style: 
initial; text-decoration-color: initial;"><p style="margin: 0px; padding: 0px; 
box-sizing: border-box; font-family: &quot;.AppleSystemUIFont&quot;, Inter, 
system-ui, sans-serif; word-break: break-word; overflow-wrap: break-word; 
max-width: 100%;">No. It only affects thread shutdown timing on connection 
close.</p></div>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to