When I tried running MathTran on RHEL4 (after manually compiling TeX with IPC support), I ran into an issue where in the DVI being returned in texdp.py is sometimes 0 bytes. In such cases, the next "requests" gets the DVI from the previous request as well as for the current request.
Needless to say, this causes issues! The problem seems to be that texdp.py gets the DONE from TeX even before any DVI is read.
I solved this by modifying texdp.py to wait for not only the DONE but also some DVI. Attached is a patch file with the changes.
This seems to be working fine for me. The unchanged texdp.py did work for me on Fedora 8. So, I dont understand why the different behavior on RHEL4 or if this is the correct fix for the same.
Patch for texdp.py