I'm not sure what module file you are using as a template, but I have used 
nszlib.

Here are two examples:

nszlib:
http://junom.com/gitweb/gitweb.perl?p=aolserver.git;a=blob;f=aolserver/nszlib/nszlib.c

nsbgwrite:
http://junom.com/gitweb/gitweb.perl?p=aolserver.git;a=blob;f=aolserver/nsbgwrite/nsbgwrite.c

You can browse for the associated .h and Makefile.

tom jackson

On Sunday 23 March 2008 02:21, Mark Aufflick wrote:
> Slight prototype fix to my .c file, but no change to the issue/
>
> On Sun, Mar 23, 2008 at 7:45 PM, Mark Aufflick
>
> <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> >  So I'm trying to write a new loadable module. From a combination of
> >  example modules I thought I was set, but I have this frustrating
> >  roadblock I can't figure out.
> >
> >  As soon as I have a Tcl_CreateCommand in my code, the server startup
> >  crashes with alloc: invalid block. I have attached my .c and Makefile
> >  if anyone has time to cast their eye over it? I think I'm missing some
> >  difference with Aolserver 4 since Vlad's nsfortune shows the same
> >  issue and I assume that used to work once! Unless I have a problem
> >  with my aolserver still, but nslog works fine and that obviously does
> >  Tcl_CreateCommand...
> >
> >  Here is my log output:
> >
> >  ...snip...
> >  [23/Mar/2008:19:31:28][79157.2691797108][-main-] Notice: nslog: opened
> >  '/opt/aolserver/servers/server1/modules/nslog/access.log'
> >  [23/Mar/2008:19:31:28][79157.2691797108][-main-] Notice: modload:
> >  loading '/opt/aolserver/bin/nscp.so'
> >  [23/Mar/2008:19:31:28][79157.2691797108][-main-] Notice: nscp:
> >  listening on 127.0.0.1:8003
> >  [23/Mar/2008:19:31:28][79157.2691797108][-main-] Notice: nscp: added
> > user: [23/Mar/2008:19:31:28][79157.2691797108][-main-] Notice: modload:
> > loading '/opt/aolserver/bin/nsperl2.so'
> >  [23/Mar/2008:19:31:28][79157.2691797108][-main-] Notice: nsperl2: loaded
> >  [23/Mar/2008:19:31:28][79157.2691797108][-main-] Notice: before
> >  [23/Mar/2008:19:31:28][79157.2691797108][-main-] Notice: after
> >  [23/Mar/2008:19:31:28][79157.2691797108][-main-] Notice: conf:
> >  [ns/server/server1]enabletclpages = 0
> >  [23/Mar/2008:19:31:28][79157.2691797108][-main-] Notice: default
> >  thread pool: minthreads 5 maxthreads 20 idle 0 current 0 maxconns 20
> >  queued 0 timeout 1
> >  alloc: invalid block: 0x207740: 0 0 0
> >
> >  Abort trap
> >
> >
> >  The before, after shows the Tcl_CreateCommand returns. The stack on
> >  exit looks something like:
> >
> >  #0  0x93ef6cb8 in __kill ()
> >  #1  0x93f9b7c8 in abort ()
> >  #2  0x0a05b428 in Tcl_PanicVA ()
> >  #3  0x0a05b460 in Tcl_Panic ()
> >  #4  0x0a0697a8 in TclpFree ()
> >  #5  0x0a0105b0 in Tcl_DeleteCommandFromToken ()
> >  #6  0x0a055c38 in TclTeardownNamespace ()
> >  #7  0x0a010d94 in DeleteInterpProc ()
> >  #8  0x000cfe4c in Ns_TclDestroyInterp (interp=0x38410) at tclinit.c:521
> >  #9  0x000d1be8 in PushInterp (itPtr=0x48810) at tclinit.c:1625
> >  #10 0x000cfc9c in Ns_TclDeAllocateInterp (interp=0x38410) at
> > tclinit.c:402 #11 0x000d17c0 in NsTclInitServer (server=0x4c0d0
> > "server1") at tclinit.c:1405 #12 0x000c1d20 in NsInitServer
> > (server=0x4c0d0 "server1",
> >  initProc=0x3f38 <ServerInit>) at server.c:219
> >  #13 0x000b7ba0 in Ns_Main (argc=3, argv=0xbffffa4c, initProc=0x3f38
> >  <ServerInit>) at nsmain.c:524
> >  #14 0x00003f1c in main (argc=3, argv=0xbffffa4c) at main.c:64
> >
> >
> >  Unfortunately as I mentioned in my compile issue email I have not been
> >  able to compile against a debug-symbol Tcl so I can't trace past
> >  Ns_TclDestroyInterp.
> >
> >  Thanks for your time - I'm going nuts here!
> >
> >  Mark.
> >
> >  --
> >  Mark Aufflick
> >   contact info at http://mark.aufflick.com/about/contact


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to