2007/04/11
IRC [01:32] *** cacrus joined the chat.
IRC [02:58] *** holycow joined the chat.
IRC [09:10] <asteets> Hi
IRC [09:10] <asteets> There is a small memory leak in the nsoracle driver
IRC [09:11] <asteets> in tcl_error_p()
IRC [09:12] <asteets> about line 4360
IRC [09:12] <asteets> msgbuf = (char *) Ns_Malloc(STACK_BUFFER_SIZE * sizeof(char));
IRC [09:12] <asteets> buf = (char *) Ns_Malloc(STACK_BUFFER_SIZE * sizeof(char));
IRC [09:12] <Dossy> yeah, thanks for sending that out to the mailing list --
IRC [09:13] <asteets> oh
IRC [09:13] <asteets> I did'nt see it go though
IRC [09:13] <Dossy> oh?
IRC [09:13] <asteets> I thought it got stuck somewhere
IRC [09:13] <Dossy> are your listserv settings set to ACK or NOACK?
IRC [09:13] <Dossy> or REPRO nor NOREPRO ... don't remember
IRC [09:13] <Dossy> nope, the message came through 10 apr 2007
IRC [09:13] <asteets> ok
IRC [09:13] <asteets> does anyone still maintain it?
IRC [09:14] <Dossy> I just hadn't replied to it.
IRC [09:14] <Dossy> Not sure, nobody else replied to it either. Would you like to?
IRC [09:14] <asteets> no. :)
IRC [09:14] <Dossy> I need to run out for a bit, but if you'd like to take over as maintainer, I'd be very happy :)
IRC [09:14] <Dossy> Heh. OK.
IRC [09:14] <Dossy> I'd like to get someone who actually uses nsoracle to review your point (I think you're right ...) and then get a patch.
IRC [09:15] <asteets> ok
IRC [09:15] <cacrus> You don't get the message you send yourself thru the list , I think
IRC [09:15] <Dossy> If you'd like to submit a patch, I'd just like someone else to apply it and confirm it.
IRC [09:15] <cacrus> we use nsoracle
IRC [09:15] <Dossy> cacrus: you can, if you tell listserv you want copies of your messages sent back to you
IRC [09:15] <Dossy> great!
IRC [09:15] <cacrus> but I don't know how to check if there is a memory leak ;)
IRC [09:15] <Dossy> asteets, between you and cacrus ... can you create a patch and test it?
IRC [09:16] <Dossy> cacrus: as long as you can confirm that the patch doesn't cause new problems, that's cool
IRC [09:16] <cacrus> ok
IRC [09:16] <cacrus> that I can do
IRC [09:16] <Dossy> ok, need to run -- be back in maybe 1.5 hours
IRC [09:16] <asteets> ok I will send something out later today
IRC [09:16] <cacrus> asteets: send me your patch
IRC [09:17] <cacrus> I am available on #aolserver most of the time
IRC [09:18] <asteets> k
IRC [09:18] *** dagu1 joined the chat.
IRC [09:19] *** partymola_ joined the chat.
IRC [09:19] *** daguz parted the chat.
IRC [09:22] *** partymola parted the chat.
IRC [10:09] <asteets> ok here is a good way to reproduce the nsoracle memory issue
IRC [10:09] <asteets> connect to nscp port
IRC [10:09] <asteets> nscp 1> set dbh [ns_db gethandle]
IRC [10:10] <asteets> nscp 2> for {set i 0} {$i < 1000} {incr i 1} { ns_ora exec_plsql $dbh "begin :1 := to_char(null); end;"
IRC [10:10] <asteets> and watch as your aolserver memory footprint goes up by ~30 megs
IRC [10:10] <cacrus> ok I can try that
IRC [10:12] <cacrus> missing closing brace
IRC [10:12] <asteets> oops
IRC [10:13] <asteets> for {set i 0} {$i < 1000} {incr i 1} { ns_ora exec_plsql $dbh "begin :1 := to_char(null); end;" }
IRC [10:14] <cacrus> nsoracle.c:3344:ora_tcl_command: error in `OCIStmtExecute ()': ORA-01405: fetched column value is NULL SQL: begin :1 := to_char(null); end;
IRC [10:15] <asteets> interesting
IRC [10:15] <asteets> do you know what version of nsoracle you are using?
IRC [10:15] <cacrus> 2.7
IRC [10:16] <cacrus> what does the error mean ?
IRC [10:16] <asteets> it means the function returned null
IRC [10:17] <asteets> which it did
IRC [10:17] <asteets> I was using a version after 2.7
IRC [10:17] <asteets> but I don't think there has been an official release since then
IRC [10:17] <cacrus> yes
IRC [10:17] <cacrus> that's why I am not using anyversion after 2.7
IRC [10:18] <asteets> Ok
IRC [10:18] <cacrus> when you run it on your version of nsoracle , what result you get ?
IRC [10:18] <asteets> no error, it returns silently
IRC [10:18] <asteets> but the memory footprint grows
IRC [10:19] <asteets> there is some code that got added after 2.7 that handles ORA-1405 specifically
IRC [10:19] <cacrus> yes it seems that way
IRC [10:20] <asteets> I think the crux is that nsoracle uses a char * for the out bind parameter
IRC [10:20] <asteets> and there is no way for OCI to differentiate between an empty string and a NULL
IRC [10:20] <asteets> so it sends you ORA-1405 to tell you
IRC [10:20] <asteets> or something
IRC [10:21] <cacrus> so you are using 2.8 ,
IRC [10:22] <cacrus> is it stable enough , other than this memory leak issue to be used in production ?
IRC [10:22] <asteets> We are basically using 2.8beta1
IRC [10:23] <asteets> and it works pretty well for everything we do
IRC [10:23] <cacrus> I am thinking of compilng nsoracle against oracle instant client , I am not sure if it will work , have you tried it ?
IRC [10:24] <asteets> I don't know what oracle instant client is
IRC [10:25] <cacrus> These are client libraries provided by oracle , so you don't need a Full client to install
IRC [10:25] <asteets> oh neat
IRC [14:22] <Dossy> OK, so--do you want CVS commit access? :)
IRC [14:23] <Dossy> Or, let me rephrase that: I'd like to give you CVS commit access. What's your SourceForge username? :)
IRC [15:16] <asteets> its asteets
IRC [15:16] <asteets> but I don't want to be a maintainer
IRC [15:17] <asteets> I don't know stuff about any of the LOB/BLOB/SLOB whatever stuff
IRC [15:17] <asteets> and I dont know how to test it
IRC [15:23] <Dossy> :)
IRC [15:23] <Dossy> well, at least you can commit your fix :)
IRC [15:23] <Dossy> Or, would you rather not?
IRC [15:24] <asteets> I don't mind doing it
IRC [15:24] <Dossy> OK.
IRC [15:24] <asteets> what happened to the guy that was maintaining it?
IRC [15:24] <Dossy> Not sure.
IRC [15:24] <Dossy> I don't think there was an official maintainer for a while.
IRC [15:25] <Dossy> Basically, whoever needed something implemented, added it :)
IRC [15:25] <asteets> fair enough
IRC [15:25] <asteets> while you're here
IRC [15:26] <Dossy> I'd like someone to "own" the module--clean up the code, make sure it follows the coding standard for AOLserver (resembles the rest of the C code, etc.)
IRC [15:26] <asteets> do you know what the status of nsreturnz is?
IRC [15:26] <Dossy> Nope. If there's an email address for the author (Vlad? Not sure.) you could email them.
IRC [15:27] <Dossy> In 4.5, I don't think nsreturnz is necessary--possibly replaced by nszlib.
IRC [15:27] <Dossy> BTW, you now have CVS commit access. Go to town :-)
IRC [15:27] <asteets> ok
IRC [15:28] <asteets> nszlib is just for compressing files right?
IRC [15:30] <asteets> Erh, I guess nsreturnz could be done with nszlib and some TCL wrappings to check the appropriate headers
IRC [15:44] <Dossy> compressing files ... and HTTP responses.
IRC [15:44] <Dossy> Are you not getting the AOLSERVER mailing list mailings?
IRC [15:44] <Dossy> Someone just recently asked about this ...
IRC [15:44] <Dossy> I so want to move the AOLserver list to Yahoo! Groups
IRC [15:45] <Dossy> but, scott goodwin who set them up can't get into his yahoo! account :(
IRC [15:45] <asteets> I don't read everything on the list
IRC [15:45] <asteets> I will look into it though
IRC [15:46] <Dossy> yeah, the recent 2-3 days--check the messages--someone asked how to set up nszlib on AS4.5 :)
IRC [15:46] <asteets> I don't see how it does http responses
IRC [15:46] <Dossy> > ns_section "ns/server/server1/adp"
IRC [15:46] <Dossy> > ns_param gzip on
IRC [15:46] <asteets> is it part of aolserver core?
IRC [15:46] <Dossy> yes.
IRC [15:47] <Dossy> grep around for ADP_GZIP ...
IRC [15:50] <asteets> only adp responses then?
IRC [15:50] <Dossy> I believe so.
IRC [15:50] <Dossy> the idea is for static assets, you should just pre-gzip them, I guess.
IRC [15:51] <Dossy> Actually, no -- it should gzip static files, too.
IRC [15:51] <asteets> we have a ns_register_proc thing
IRC [15:52] <asteets> that I wanted to returned gzip data
IRC [15:53] <Dossy> by default, gzipmin is set to 4096
IRC [15:53] <Dossy> if you only want the one proc to, then you'd have to just use ns_zlib to compress it, set the appropriate headers, and return it
IRC [15:54] <Dossy> If you want it turned on for all requests, then ... it's easy to configure server-wide.
IRC [15:54] <asteets> ok, I think I see that now
IRC [15:54] <asteets> I'll have to play with that if I get a few spare cycles
IRC [15:55] * Dossy nods
IRC [16:07] *** partymola_ joined the chat.
IRC [16:07] *** partymola parted the chat.
IRC [16:27] *** cacrus parted the chat.
IRC [21:54] *** partymola parted the chat.