From: David Rodriguez Date: 2010-04-23T06:40:25+09:00 Subject: Re: Ruby 1.91.376 hangs when launched with python pExpect Hi Roger I am using ruby Readline as: while @logout == false cmd =Readline::readline('>',true) process_command(cmd) if !cmd.nil? end adn it works fine when running independently but not when running from the pExpect. So I changed to use jsut stdin.gets as: while @logout == false print ">" $stdout.flush process_command($stdin.gets) end and it seems to be working now. But what I saw is that my program has between 10 to 40 threads and the ones that have packets to dequeue are waiting on the __lll_lock_wait. So those threads looks like they are out of the select but somehow they are stuck in this lock_wait. Thanks David #0 0x00d32410 in __kernel_vsyscall() #1 0x00b45509 in __lll_lock_wait () from lib/libpthread.so.0 #2 0x00b40bbf in _L_lock_885 () from /lib/libpthread.so.0 #3 0x00b40a86 in pthread_mutex_lock () from /lib/libpthread.so.0 #4 0x0811daae in native_mutex_lock (lock=0xfffffffc) at thread_pthread.c:36 #5 0x081225d2 in do_select (n=7, read=0x9856938, write=0x0, except=0x0, timeout=0x0) at thread.c:984 #6 0x0812279c in rb_thread_wait_fd_rw (fd=6, read=1) at thread.c:2475 #7 0x00861827 in s_recvfrom (sock=, argc=, argv=, from=RECV_IP) -- Posted via http://www.ruby-forum.com/.