On Tue, 2007-02-13 at 06:23 -0800, Robert Hudson wrote:
> Hi Kristis,
>
> Thanks for that diff. I have applied the changes and although it didn't
> solve the problem on it's own I have done a few more changes on-top and
> have now solved the problem :-)
Yeeeii!
> The changes I have made are:
> 1) Some more multi-threading changes on top of yours
Does that threads->yield() call really solve the problem for you ?
> 2) Removed the redirection of STDIN and STDOUT and now write
> directly to the socket. (Not doing this makes the messages
> jumbled as all threads are reading/writing to stdio)
> 3) Moved $request from being a global to a local variable (So multiple
> requests can be handles at the same time)
> 4) Removed some logging prefix - fixes the logging issue to mention.
I'd like the connection IP address back though. I may have to extend
your work to push $request to all logmsg() calls.
> 5) Sent STDERR to the error log file.
>
> I also monitored the CPU while running and there didn't seem to be a
> problem on windows.
That's great! Which ActiveState Perl are you running ?
Using your Daemon.pm I'm still getting the CPU held up at 100% and
performance suffers on Linux 2.4.27. Why won't it work for me ?
Also, what is the purpose of: $daemon_configuration->{ location };
> I have attached a copy of the Daemon.pm file which is an adjustment on
> top of the one that you supplied in the diff.
I've tracked your changes. I'd love to see this work for both Windows
and UNIX.
http://bugzilla.mkgnu.net/show_bug.cgi?id=264#c14
> Would it be possible for you to integrate this into the project. I
> understand if you don't wish to replace the existing fork method, but
> maybe have both Daemon files available in the distribution and maybe
> have a config option to switch between the two? This would enable
> windows users (me included) to use the threaded version to work around
> this problem. It also means that I can use an official release without
> needing to hack it locally. (Will make upgrade and bug fixes a lot
> easier for me!)
I have nothing against replacing forking with threads. I want something
that works for everyone. Perhaps I need to understand now why perl
threading on Linux ties the CPU at 100%. Maybe I should run this patch
in other systems (FreeBSD) and see if Perl threading is to blame.
At some point I would have said you should try running Scmbug under
Cygwin. That's what some people reverted to. But it can't be the
long-term solution.
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users