From: Brad Hilton Date: 2002-06-21T07:37:47+09:00 Subject: resolv.rb memory usage / core dumps Hello, In using resolv.rb (ruby 1.6.7) to do name lookups, I noticed that the classes UnconnectedUDP and ConnectedUDP create a new thread in ititialize(). They don't attempt to clean up the thread (or join() it), however, so the following script eats up lots of memory and eventually stalls: -------------------------- require 'resolv' loop { Resolv::DNS::Requester::UnconnectedUDP.new } --------------------------- Is this behavior intended, or should these objects kill/join their internal Thread objects? I also noticed something strange. If I modify resolv.rb slightly to allow me to kill and join the threads, I get a core dump. For example, I added: def cleanup @thread.exit @thread.join end to the UnconnectedUDP class and changed my script above to say: ------------------- loop { Resolv::DNS::Requester::UnconnectedUDP.new.cleanup } ------------------- after a few hundred objects get created, the script core dumps. Can anyone offer some help here? Please CC me as I'm not on the list. Thanks, -Brad