A way you might deal with things, a way I have thought up that seems to be working well, is to have a separate program that does all the busy work that would otherwise "tie up" the mud, and communicate through a unix domain socket back and forth. Of course, my lookups are still stock rom and I don't have immediate plans to change it, but this is one way you could approach it.. requires a bit of sockets knowledge though, easy to core if you screw things up.
--
Kevin

Chad Simmons wrote:
--- Edwin Groothuis <[EMAIL PROTECTED]> wrote:

On Mon, May 13, 2002 at 01:00:38PM -0700, Chad Simmons wrote:

--- JF Bethlehem <[EMAIL PROTECTED]> wrote:

I'm looking for a little program that will help me debug the mud, and

remove

several
memory leaks i know are in there. I use gdb to debug the mud, *but* ever
since i
installed a threaded DNS lookup thing, core files aren't produced

anymore,

any
idea how i can fix this? having to wait for a crash, which could occur

once

every....
15 hours or so, is kinda tiresome.


One thing you can do is ditch the whole "threaded" DNS lookup. Instead just
fork the mud when it boots up using socketpair or a pipe to communicate

between

the two. Then you can have one processes handle nameserver requests without
having to worry about threading. This will ensure that you still get a core
file when something crashes, and you can still debug.

Fix the problem, not the symptons.


Fixing the symtoms simply requires a relatively simple change to the way DNS
lookups happen in this mud. Fixing the problem involves redesigning the linux
pthreads libraries... I think in this particular instance I'll choose the
former over the latter.

You're welcome to redesign the pthread library yourself though. I'm sure the
other developers would be glad to have the assistance. ;p

~Kender





Reply via email to