Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Using time.sleep() in 2 threads causes lockup whenhyper-threadingis enabled

    2 answers - 1508 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Delaney, Timothy (Tim) wrote:
    Meding (AT) gmail (DOT) com wrote:
    I am a bit surprised that nobody else has tried running the short
    Python program above on a hyper-threading or dual core / dual
    processor system.
    Does it happen every time? Have you tried it on multiple machines? Is it
    possible that that one machine is having problems? Does it take the same
    amount of time each run to replicate - and if so, how long is that (give
    or take a minute)?
    Until you can answer these questions with definite answers, people are
    not going to dedicate machines *that they use* for hours on end trying
    to replicate it. And from this thread, the time required appears to be
    "minutes to hours". That suggests you have a race condition which
    results in a deadlock - and of course, that is more likely to occur on a
    dual-core or dual-cpu machine, as you really have multiple threads
    executing at once.
    The test program in question doesn't require a dedicated machine and it
    doesn't consume a lot of CPU resources since it sleeps most of the
    time.
    I'm surprised that so many people have been willing to dedicate as much
    time as they have, but then again considering the people involved it's
    not quite so surprising.
    This "problem" doesn't require more time than any other in
    comp.lang.python which I try to help to resolve. In fact, since P is
    not a newbie, it took less time than some newbie questions.
  • No.1 | | 605 bytes | |

    8 May 2006 15:44:04 -0700, "Serge " <S (AT) gmail (DOT) com>
    declaimed the following in comp.lang.python:

    The test program in question doesn't require a dedicated machine and it
    doesn't consume a lot of CPU resources since it sleeps most of the
    time.

    Yet Do we have any evidence that other activity on the machine
    may or may not affect the situation? There is a big difference between
    leaving a machine idle for a few hours to see if it hangs, vs doing
    normal activities with a process in the background (and what about
    screen savers? network activity?)
  • No.2 | | 804 bytes | |

    Dennis Lee Bieber wrote:
    8 May 2006 15:44:04 -0700, "Serge " <S (AT) gmail (DOT) com>
    declaimed the following in comp.lang.python:
    --
    The test program in question doesn't require a dedicated machine and it
    doesn't consume a lot of CPU resources since it sleeps most of the
    time.

    Yet Do we have any evidence that other activity on the machine
    may or may not affect the situation? There is a big difference between
    leaving a machine idle for a few hours to see if it hangs, vs doing
    normal activities with a process in the background (and what about
    screen savers? network activity?)

    But what if other processes will actually help to trigger the bug? IMH
    both situations (idle or busy) are equal if you don't know what's going
    on.

Re: Using time.sleep() in 2 threads causes lockup whenhyper-threadingis enabled


max 4000 letters.
Your nickname that display:
In order to stop the spam: 2 + 1 =
QUESTION ON "Development"

EMSDN.COM