Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 483173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:10:13+00:00 2026-05-13T01:10:13+00:00

A Java thread is always in one of the following ten states: NEW: Just

  • 0

A Java thread is always in one of the following ten states:

NEW: Just starting up, i.e., in process of being initialized.
NEW_TRANS: Corresponding transition state (not used, included for completness).
IN_NATIVE: Running in native code.
IN_NATIVE_TRANS: Corresponding transition state.
IN_VM: Running in VM.
IN_VM_TRANS: Corresponding transition state.
IN_JAVA: Running in Java or in stub code.
IN_JAVA_TRANS: Corresponding transition state (not used, included for completness).
BLOCKED: Blocked in vm.
BLOCKED_TRANS: Corresponding transition state.

The unused state (UNINITIALIZED) has been omitted from the list.

While the definitions of the states are given above I’m looking for “rule-of-thumbs” for interpreting a given thread state setup for a running appserver. And, more specifically:

Assume a live application server with the following thread statistics (obtained using jstack) at various points in time:

  • 100 threads: 35 BLOCKED, 65 IN_NATIVE
  • 113 threads: 35 BLOCKED, 77 IN_NATIVE, 1 IN_VM
  • 52 threads: 38 BLOCKED, 1 IN_JAVA, 6 IN_NATIVE, 7 IN_VM
  • 120 threads: 39 BLOCKED, 1 IN_JAVA, 80 IN_NATIVE
  • 94 threads: 34 BLOCKED, 59 IN_NATIVE, 1 IN_NATIVE_TRANS

For each thread of the five statistics – what can be inferred with regards to the overall JVM state? I.e. “in this scenario the JVM looks to be idling waiting for requests”, “the machine is busy processing requests”, etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T01:10:13+00:00Added an answer on May 13, 2026 at 1:10 am

    This level of output doesn’t provide enough information to make such statements.

    As an example, consider the BLOCKED state: there are many things that can cause a thread to be blocked. Two of them are waiting for data to come from a client, and waiting for data to come back from a database. In the first case, your application is idle, in the second it’s overloaded.

    Edit: not having looked at the output from jstack, I suppose that these two conditions could also be represented as IN_NATIVE. However, the same comment holds: you don’t know what they’re doing, so you can’t make any statements about the application as a whole.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am using a java thread to update jlabel text value in my application
According to Java thread state info calling wait() will result a thread to go
Is it possible to kill a Java thread without raising an exception in it?
I am trying to determine the impact of context switching on my Java thread.
When does Java's Thread.sleep throw InterruptedException ? Is it safe to ignore it? I
Why is java.lang.Thread in the Google App Engine whitelist when it is not supported?
Exception in thread Thread-0 java.lang.NullPointerException at org.apache.http.impl.nio.reactor.AbstractIOReactor.closeActiveChannels(AbstractIOReactor.java:532) at org.apache.http.impl.nio.reactor.AbstractIOReactor.hardShutdown(AbstractIOReactor.java:564) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.doShutdown(AbstractMultiworkerIOReactor.java:411) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:340) at
Exception in thread Thread-2 java.lang.NumberFormatException: For input string: 3 int test = Integer.parseInt(result[0]); This
while creating a thread in java, there is two ways such as Extending threads
I have in my Java application a thread that run a while(True) loop with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.