DRb freezes YARV?

Discussion in 'Ruby' started by Meinrad Recheis, Mar 7, 2007.

  1. dear all,

    Has anyone tried out drb on latest ruby1.9 including VM? Well, I tried
    out drb and found that DRb#start_service won't return on YARV as it
    does on Ruby1.8. It is so strange that I can not find a reasonable
    explanation for the behaviour.

    Let me explain what I found out by (manually) tracing the threads of
    execution in drb:

    The main thread enters DRbServer#initialize and enters DRbServer#run.
    In run a new thread (the main_loop of the DRBServer) is startet that
    runs concurrently until it blocks in Socket#accept. The strange thing
    is, that exactly after the main_loop thread begins to block the main
    thread won't run any further! Right before the end of
    DRbServer#initialize it stops and does not jump out though there is
    nothing left to do.

    Next thing I tried is replacing the Socket#accept by something else. I
    replaced it by a sleep( 5). With this the main thread is able to jump
    out of DRbServer#initialize ... suggesting that the bug lies in
    Socket#accept. However I made up a simple test script with a socket
    and put the line socket.accept in a thread. This test script runs as
    it should on both yarv and on 1.8.5 without blocking the main thread.

    I'm sorry, that I was not yet able to reproduce the freeze in a
    minimal test script.

    I'd say it smells like a deadlock but I am definitely not a threading
    expert and I don't know much about Sockets and the internals of YARV
    so I leave the interpretation of the facts to the experts among you.

    cheers,
    -- henon
     
    Meinrad Recheis, Mar 7, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SASADA Koichi

    Any YARV pre-questions in RubyConf2004?

    SASADA Koichi, Sep 27, 2004, in forum: Ruby
    Replies:
    19
    Views:
    218
    gabriele renzi
    Sep 29, 2004
  2. Miles Keaton
    Replies:
    3
    Views:
    181
    Miles Keaton
    Mar 30, 2005
  3. Kirk Haines

    More DRb; SSL & DRB & errors

    Kirk Haines, Jul 1, 2005, in forum: Ruby
    Replies:
    0
    Views:
    126
    Kirk Haines
    Jul 1, 2005
  4. J. Wook
    Replies:
    16
    Views:
    285
    Robert Klemme
    May 16, 2007
  5. Ittay Dror
    Replies:
    1
    Views:
    133
    Ittay Dror
    Oct 21, 2008
Loading...

Share This Page