This file is indexed.

/usr/share/solr/web/admin/threaddump.jsp is in solr-common 3.6.2+dfsg-10+deb9u2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
<%@ page contentType="text/xml; charset=utf-8" pageEncoding="UTF-8" language="java" %>
<%--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
--%>
<%@ page import="org.apache.solr.core.SolrCore,
                 java.lang.management.ManagementFactory,
                 java.lang.management.ThreadMXBean,
                 java.lang.management.ThreadInfo,
                 java.io.IOException,
                 org.apache.solr.common.util.XML"%>
<%@include file="_info.jsp" %>


<?xml-stylesheet type="text/xsl" href="threaddump.xsl"?>
<%!
  static ThreadMXBean tmbean = ManagementFactory.getThreadMXBean();
%>
<solr>
  <core><%= collectionName %></core>
  <system>
  <jvm>
    <version><%=System.getProperty("java.vm.version")%></version>
    <name><%=System.getProperty("java.vm.name")%></name>
  </jvm>
  <threadCount>
    <current><%=tmbean.getThreadCount()%></current>
    <peak><%=tmbean.getPeakThreadCount()%></peak>
    <daemon><%=tmbean.getDaemonThreadCount()%></daemon>
  </threadCount>
<%
  long[] tids;
  ThreadInfo[] tinfos;
  tids = tmbean.findMonitorDeadlockedThreads();
  if (tids != null) {
      out.println("  <deadlocks>");
      tinfos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE);
      for (ThreadInfo ti : tinfos) {
          printThreadInfo(ti, out);
      }
      out.println("  </deadlocks>");
  }
%>
<%
  tids = tmbean.getAllThreadIds();
  tinfos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE);
  out.println("  <threadDump>");
  for (ThreadInfo ti : tinfos) {
     printThreadInfo(ti, out);
  }
  out.println("  </threadDump>");
%>
  </system>
</solr>

<%!
  static void printThreadInfo(ThreadInfo ti, JspWriter out) throws IOException {
      long tid = ti.getThreadId();
      out.println("    <thread>");
      out.println("      <id>" + tid + "</id>");
      out.print("      <name>");
      XML.escapeCharData(ti.getThreadName(), out);
      out.println("</name>");
      out.println("      <state>" + ti.getThreadState() + "</state>");
      if (ti.getLockName() != null) {
          out.println("      <lock>" + ti.getLockName() + "</lock>");
      }
      if (ti.isSuspended()) {
          out.println("      <suspended/>");
      }
      if (ti.isInNative()) {
          out.println("      <inNative/>");
      }
      if (tmbean.isThreadCpuTimeSupported()) {
          out.println("      <cpuTime>" + formatNanos(tmbean.getThreadCpuTime(tid)) + "</cpuTime>");
          out.println("      <userTime>" + formatNanos(tmbean.getThreadUserTime(tid)) + "</userTime>");
      }

      if (ti.getLockOwnerName() != null) {
          out.println("      <owner>");
          out.println("        <name>" + ti.getLockOwnerName() + "</name>");
          out.println("        <id>" + ti.getLockOwnerId() + "</id>");
          out.println("      </owner>");
      }
      out.println("      <stackTrace>");
      for (StackTraceElement ste : ti.getStackTrace()) {
          out.print("        <line>");
          XML.escapeCharData("at " + ste.toString(), out);
          out.println("        </line>");
      }
      out.println("      </stackTrace>");
      out.println("    </thread>");
  }

  static String formatNanos(long ns) {
      return String.format("%.4fms", ns / (double) 1000000);
  }
%>