[Tinymux] TinyMUX 2.3.5.28

Stephen Dennis brazilofmux at gmail.com
Sun Mar 12 20:09:44 EST 2006


ftp://ftp.tinymux.org/TinyMUX/tinymux-2.3/28

 -- Backpatch fix for forking- at dumps from 2.4.

This closes a narrow window in how forking @dumps are tracked. As far
as we know, it only reproduces on one machine (fast 64-bit FreeBSD
box) running small games. On this one box, the dumps occur so quickly
that the dumping child finishes dumping before the main process is
finished spawning it. That is, the main server is told with SIGCHLD
that the child has finished before the fork() call returns with the
child's process id.

There's been code to handle that possible for several years, but that
code path has a narrow window of opportunity, and a few games on that
seemed to hit it as they grew through a certain size (around 200
objects). Unix signals handlers are multi-threaded, but there are no
syncronization primitives, so it's one of the hardest parts of the
code to get right. In fact, I don't know of any version of any MU
server that has gotten it perfect, yet.

TinyMUX is intentionally very picky about any outstanding dumping
child. Some database operations (page and directory splits) are not
allowed while there is an outstanding dumping child, and if it
miscalculates, the server will hang waiting for a child that has
already completed. It does that to protect the database. Hanging is
better than accidently corrupting the database.

Anyway, the new approach has been used long enough in 2.4 that it's
time to backpatch it to 2.3.


Brazil


More information about the Tinymux mailing list