You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_dtcl@tcl.apache.org by Wojciech Kocjan <wo...@kocjan.org> on 2001/12/22 00:27:15 UTC

mod_dtcl on Windows98 again

Hello.

Some time ago I had a problem with mod_dtcl.so crashing when killing 
apache under windows (apache exited with an error when LoadModule was 
enabled).

I downloaded the newest Mod_dtcl.zip. First of all it searches for 
tcl84.dll, when tcl8.3 is still the stable version - I did a quick 
tcl84->tcl83 replace and it worked.

Anyway, the problem is (it does NOT occur on NT4, 2000 and probably not 
on XP as well) that when exiting Apache (for example with Ctrl+C, I do 
it with my apache_ctl.exe written in Tcl), the Apache process crashes.

If anyone knows what could be the reason (I never did set up apache on 
Windows) or has some sort of fix, then please help.

Also, URL to downloadable tcl 8.4a3 for Windows would be nice.

--
WK


Re: mod_dtcl on Windows98 again

Posted by Craig Huckabee <hu...@spawar.navy.mil>.

> Wojciech Kocjan <wo...@kocjan.org> writes:
>
> > > Tried debugging it?
>
> > How? ;-)
>
> > I never debugged a thing on Windows...
>
> Neither have I - maybe someone else can comment?  Does it crash, by
> the way, when you run it with '-X' or whatever the windows equivalent
> is?

-X is the same on Win32.

Debugging is a problem.  Since Apache is built with VC++ and mod_dtcl is
built with MingW32, and they don't share a compatible debug symbol format,
the debugger gets "lost" when trying to trace program execution.  So, it is
impossible to trace a problem in the traditional sense using a debugger.

I got some good results by using GDB to attach, run, then print out the
actual exception with breakpoint, then printing out the call stack.  That
gave me a good ball park as to where the problems were.  So far, though,
every problem I've hit has been related to a bad script, configuration file,
some other module, or the machine's setup.

Those playing along at home might ask "Why not build mod_dtcl with VC++ ?"
It can be built that way, but the binary produced is unusable.  I tried
tracking that one down once, ended up getting nowhere.  I can say it isn't
in the optimizer - a bloated unoptimized binary produced by VC++ doesn't
work either.  Seems like there was some pointer mangling going on in the
compiler, but it was over a year ago when I was actively looking at it.

Since Tcl & mod_dtcl can be built with MingW32, I think it'd be better to
have the Apache sources patched to support that build environment.  I
started coming up with all of the patches once, but stopped due to lack of
time on my behalf and apparent lack of interest from the Apache core (no
e-mail response).

What version of Apache are you using, btw ?

--Craig





Re: mod_dtcl on Windows98 again

Posted by "David N. Welton" <da...@dedasys.com>.
Wojciech Kocjan <wo...@kocjan.org> writes:

> > Tried debugging it?
 
> How? ;-)
 
> I never debugged a thing on Windows...

Neither have I - maybe someone else can comment?  Does it crash, by
the way, when you run it with '-X' or whatever the windows equivalent
is?
 
> > > Also, URL to downloadable tcl 8.4a3 for Windows would be nice.

> > www.tcl-tk.net should have everything you need.

> Not really. All I got from there were sources - which I won't be
> able to compile without VC++ (which is not free as you know :(.

Then that's a bug to take up with the Tcl guys:-)

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: mod_dtcl on Windows98 again

Posted by Craig Huckabee <hu...@spawar.navy.mil>.

On Wed, 26 Dec 2001, Wojciech Kocjan wrote:

> 
> Not really. All I got from there were sources - which I won't be able to 
> compile without VC++ (which is not free as you know :(.
> 
> Maybe I'll get someone to buy it for me or something :-)
> 

  The Tcl sources should also have a MingW32 target - which is a free
  gcc implementation for Win32.  I seem to recall that it works now.

  --Craig



Re: mod_dtcl on Windows98 again

Posted by Wojciech Kocjan <wo...@kocjan.org>.
David N. Welton wrote:

> Happy [holiday] to everyone!
> 
> Wojciech Kocjan <wo...@kocjan.org> writes:
> 
> 
>>Some time ago I had a problem with mod_dtcl.so crashing when killing
>>apache under windows (apache exited with an error when LoadModule
>>was enabled).
> I got that once or twice under Linux, too, although I never figured
> out exactly what was happening.  Maybe something needs to be called to
> clean up Tcl.


Ok, I'll look at it and see if there's some error in the cleanup on Linux.

>>If anyone knows what could be the reason (I never did set up apache
>>on Windows) or has some sort of fix, then please help.
> Tried debugging it?


How? ;-)

I never debugged a thing on Windows...

>>Also, URL to downloadable tcl 8.4a3 for Windows would be nice.
> www.tcl-tk.net should have everything you need.


Not really. All I got from there were sources - which I won't be able to 
compile without VC++ (which is not free as you know :(.

Maybe I'll get someone to buy it for me or something :-)

--
WK




Re: mod_dtcl on Windows98 again

Posted by "David N. Welton" <da...@dedasys.com>.
Happy [holiday] to everyone!

Wojciech Kocjan <wo...@kocjan.org> writes:

> Some time ago I had a problem with mod_dtcl.so crashing when killing
> apache under windows (apache exited with an error when LoadModule
> was enabled).

I got that once or twice under Linux, too, although I never figured
out exactly what was happening.  Maybe something needs to be called to
clean up Tcl.

> I downloaded the newest Mod_dtcl.zip. First of all it searches for
> tcl84.dll, when tcl8.3 is still the stable version - I did a quick
> tcl84->tcl83 replace and it worked.

> Anyway, the problem is (it does NOT occur on NT4, 2000 and probably
> not on XP as well) that when exiting Apache (for example with
> Ctrl+C, I do it with my apache_ctl.exe written in Tcl), the Apache
> process crashes.

> If anyone knows what could be the reason (I never did set up apache
> on Windows) or has some sort of fix, then please help.

Tried debugging it?

> Also, URL to downloadable tcl 8.4a3 for Windows would be nice.

www.tcl-tk.net should have everything you need.


-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: mod_dtcl on Windows98 again

Posted by Wojciech Kocjan <wo...@kocjan.org>.

Craig Huckabee wrote:

>>I downloaded the newest Mod_dtcl.zip. First of all it searches for 
>>tcl84.dll, when tcl8.3 is still the stable version - I did a quick 
>>tcl84->tcl83 replace and it worked.
> That'd be my fault since I built it - I'll make a new zip up after I return
> from the holidays.


Hehe. This is some strange thing as some previous Windows version didn't 
work either.

But do enjoy your christmas, I'll get some cash on rewriting it to 
AOLserver for now :) So this is a good thing actually - I don't blame 
them ;-)

>>Anyway, the problem is (it does NOT occur on NT4, 2000 and probably not 
>>on XP as well) that when exiting Apache (for example with Ctrl+C, I do 
>>it with my apache_ctl.exe written in Tcl), the Apache process crashes.
>>
>>If anyone knows what could be the reason (I never did set up apache on 
>>Windows) or has some sort of fix, then please help.
>   I've seen this before.  In one case it was mismatched DLLs on the system,
>   caused by loading updates to VC++, Office, etc on one machine without
>   checking that the proper versions of system libraries (like msvcrt.dll)
>   were being installed.  Another case was a set of modules that were
>   conflicting when loaded - rebuilding everything from scratch fixed that.


I once had a problem when libphp4.so and mod_dtcl.so were causing SEGV 
for Apache on a Linux box. Strange things do really happen...

>   I don't have a 98 box handy at the moment, otherwise I'd be more help.


Try VMware, you can work on it with the 30 day trial... I'm considering 
buying it, since it helps me in testing binaries for different Windows 
versions... (this is more of a PITA than writing stuff for different 
Linux distros :)

>>Also, URL to downloadable tcl 8.4a3 for Windows would be nice.
>   I built it from sources :)  I can bundle it up if you want a copy.


I'll try my strength with Tcl, Apache and other stuff with VC++ in 
january. So I'll keep your e-mail address just in case ;-)

--
WK




Re: mod_dtcl on Windows98 again

Posted by Craig Huckabee <hu...@spawar.navy.mil>.
> I downloaded the newest Mod_dtcl.zip. First of all it searches for 
> tcl84.dll, when tcl8.3 is still the stable version - I did a quick 
> tcl84->tcl83 replace and it worked.

That'd be my fault since I built it - I'll make a new zip up after I return
from the holidays.

> 
> Anyway, the problem is (it does NOT occur on NT4, 2000 and probably not 
> on XP as well) that when exiting Apache (for example with Ctrl+C, I do 
> it with my apache_ctl.exe written in Tcl), the Apache process crashes.
> 
> If anyone knows what could be the reason (I never did set up apache on 
> Windows) or has some sort of fix, then please help.
> 

  I've seen this before.  In one case it was mismatched DLLs on the system,
  caused by loading updates to VC++, Office, etc on one machine without
  checking that the proper versions of system libraries (like msvcrt.dll)
  were being installed.  Another case was a set of modules that were
  conflicting when loaded - rebuilding everything from scratch fixed that.

  I don't have a 98 box handy at the moment, otherwise I'd be more help.
  
 
> Also, URL to downloadable tcl 8.4a3 for Windows would be nice.

  I built it from sources :)  I can bundle it up if you want a copy.

  --Craig