Forum OpenACS Development: NaviServer on Windows: nsd.exe hangs after ns_write


We've found another issue with NaviServer on Windows:

The ]po[ page /packages/intranet-core/www/admin/linux-to-windows-2.tcl causes nsd.exe to hang with 100% CPU load. The page basically consists of a "ad_return_top_of_page [im_header][im_navbar]" and then performs a few DB statements and ns_writes. The page works with NaviServer if I replace "[im_header][im_navbar]" with "<html><body>" .

However, neither im_header nor im_navbar actually crash nsd.exe. This happens later by some ns_writes further down the code. So I guess the code executed in im_header causes some buffer or whatever issues that lead to a buffer overflow later by writing some more bytes into the connection.

To reproduce the issue, please grab a ]po[ V5.0 Windows installer (available very soon, hopefully...) from , install on some Windows 7, 8, 10 or Server 2008 system, stop the "]po[ AOLserver-projop" service and manually start NaviServer in foreground mode by entering "navis" in a CygWin shell. Then login as an admin and enter the URL "http://localhost:8000/intranet/admin/linux-to-windows-2";.


Dear Frank,
I have the feeling that in these days we are confronted not with many different bugs, but with a single one that exposes itself in many different occasions/situations.

I believe this single bug causes (at least):
1. what you describe here
2. the unbalanced braces problem
3. the fact that the log appears corrupted every now and then
4. the SendFd misbehavior, the one I, ehm, "corrected" with a Sleep

This, I believe, is a threading/timing issue that ends up in corrupting the memory and generating an erratic behaviour.

I would need quite some time to look for this bug and fix it.

Thank you,

Posted by Frank Bergmann on

need quite some time

Right, I can imagine. That's why we took the decision to go ahead with AOLserver instead of NaviServer for the ]po[ V5.0 Windows installer. So you'll have about 2 years from now. Or more, given the past record of ]po[ release delays 😊