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

  • SEARCH
  • Home
  • 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 8168699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:36:48+00:00 2026-06-06T20:36:48+00:00

I am having an odd error with Thread.sleep() on Java. For some reason, when

  • 0

I am having an odd error with Thread.sleep() on Java. For some reason, when I call sleep on some machines, it never returns. I can’t figure out what could be causing this behaviour. At first, I thgouth the error might be elsewhere in my code, so I made the simplest possible sleep test:

public class SleepTest {
    public static void main (String [] args) {
        System.out.println ("Before sleep...");
        try {
            Thread.sleep (100);
        } catch (InterruptedException e) {
        }
        System.out.println ("After sleep...");
    }
}

On most machines it works, but on several machines which I am remotely logging into, it pauses indefinitely between the print statements. I have waited up to a half an hour with no change in behaviour. The machines that are displaying this error are Linux machines. Here is some information about the machines:

$ uname -a
Linux zone29ea 2.6.32-220.17.1.el6.x86_64 #1 SMP Tue May 15 17:16:46 CDT 2012 x86_64 x86_64 x86_64 GNU/Linux
$ java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.6) (rhel-1.43.1.10.6.el6_2-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

What could be causing this behaviour?

UPDATE

Revised version, which still never ends:

public class SleepTest {
    public static void main (String [] args) {
        new Thread () {
            public void run () {
                System.out.println ("Before sleep...");
                try {
                    Thread.sleep (100);
                } catch (InterruptedException e) {
                    e.printStackTrace ();
                }
                System.out.println ("After sleep...");
            }
        }.start();
    }
}
  • 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-06-06T20:36:49+00:00Added an answer on June 6, 2026 at 8:36 pm

    if your server is running under Linux, you may be hit by the Leap Second bug which appears last week-end.

    This bug affects the Linux kernel (the Thread management), so application which uses threads (as the JVM, mysql etc…) may consume high load of CPU.

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

Sidebar

Related Questions

I'm having really odd behavior with Rails, and I can't seem to figure out
Im having a odd Problem with the TTS engine and I cant figure out
Having some odd behavior I'd love some feed back on as I can't seem
I am having an odd error in my shell script. using this: $find /sys/class/
I am having this odd error with my code. I am trying to troubleshoot
I'm having an odd error with one of my pages where the bar that
I am having a very odd error occurring in the following: class ServeHandler(blobstore_handlers.BlobstoreDownloadHandler): def
I'm having an odd problem, I can't get an object from the DB and
I'm having an odd problem. My controller is trying to call uri segments and
I've been having some odd problems with permission in Android. I am trying to

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.