OK, I have stripped the problem to the bare minimum. Now I'm running a standalone Samba server as root, guest login only, one guest share, one w2k client, 3.8-stable kernel and userland, everything rebuilt today. 3.8-stable samba (3.0.13) or even -current samba (3.0.21b), both from packages and ports. Even tried with -release kernel.
As soon as I start a specific application on w2k machine, samba process' ram usage starts to grow at a rate of 10Mb/minute until it reaches 1026Mb, then it becomes unresponsive and has to be restarted. That application writes a single 2.5KB txt file every 30 seconds and according to ktrace, stats a couple more unexisting files (I have the dump if anyone is interested). Other windows programs work nice over samba mounts and don't cause this behaviour. At this point I give up, I just don't know what to do next. As if the windows application is doing something nasty to cause a DOS to samba - but total network traffic is very low, it does not indicate any flooding or similar, tcpdump looks normal. Unless anybody has a better idea, I'll write a cron job that will restart samba once every two hours. Regards, Mitja