2004/09/07
IRC [00:23] *** brunom joined the chat.
IRC [00:25] *** brunom parted the chat.
IRC [00:25] *** brunom joined the chat.
IRC [01:18] *** zoro2 joined the chat.
IRC [02:45] *** zoro2 parted the chat.
IRC [04:01] *** frankie joined the chat.
IRC [04:19] *** zoro2 joined the chat.
IRC [05:43] *** zoro2_ joined the chat.
IRC [05:55] *** zoro2 parted the chat.
IRC [07:17] *** zoro2_ parted the chat.
IRC [07:50] *** brunom parted the chat.
IRC [10:05] *** zoro2 joined the chat.
IRC [10:19] *** zoro2 parted the chat.
IRC [10:35] *** archiware joined the chat.
IRC [10:36] *** archiware parted the chat.
IRC [10:36] *** archiware joined the chat.
IRC [10:37] <archiware> howdy!
IRC [10:37] <archiware> Back from Japan!
IRC [10:38] <archiware> Dossy, there was a bugreport on non-mt-safe usage of some time functions
IRC [10:38] <archiware> you remember which bug# was that?
IRC [10:38] <archiware> I think I found another troublesome instance -> timegm() call in httptime.c
IRC [10:39] <archiware> This cores the server definitely
IRC [10:39] <archiware> I was able to reproduce this in Mac OSX
IRC [10:41] <archiware> I temporarily word-around this by removing HAVE_TIMEGM from the makefile
IRC [10:41] <archiware> and making: t = mktime(&tm) - (time_t)timezone;
IRC [10:41] <archiware> This seams to work, but I'm not sure if this is the right way.
IRC [10:53] *** frankie parted the chat.
IRC [11:15] <Dossy> Hmm.
IRC [11:15] <Dossy> Probably not --
IRC [11:20] <archiware> why not?
IRC [11:21] <archiware> this is the fallback anyway, it just missed the (time_t) cast, and it did not compile on darwin without
IRC [11:21] <Dossy> where exactly are you proposing to change?
IRC [11:22] <archiware> tm.tm_isdst = 0;
IRC [11:22] <archiware> #ifdef HAVE_TIMEGM
IRC [11:22] <archiware> t = timegm(&tm);
IRC [11:22] <archiware> #else
IRC [11:22] <archiware> t = mktime(&tm) - timezone;
IRC [11:22] <archiware> #endif
IRC [11:22] <archiware> return t;
IRC [11:22] <archiware> the httptime.c
IRC [11:25] <archiware> t = mktime(&tm) - (time_t)timezone;
IRC [11:26] <archiware> The problem is that HAVE_TIMEGM is true but timegm() sucks
IRC [11:38] *** zoro2 joined the chat.
IRC [11:46] <Dossy> should we remove use of timegm() entirely? is it not safe?
IRC [11:47] *** zoro2 parted the chat.
IRC [11:47] <Dossy> >> Calling mktime() also sets the external variable tzname with
IRC [11:47] <Dossy> >> information about the current time zone.
IRC [11:48] <Dossy> someone needs to define a new time-management-manipulation spec for POSIX
IRC [11:48] <Dossy> under BSD license, and make it platform-independent
IRC [11:49] <archiware> urgh!
IRC [11:49] <archiware> this is a real PITA!
IRC [11:50] <archiware> I have an open bug in Tcl for this as well. Tcl itself uses non-mt calls here
IRC [11:51] <archiware> until someone really makes the effort to rewrite all this time-junk, what to do?
IRC [11:51] <archiware> make protective mutexes so at least we in-our-selves are safe?
IRC [11:52] <archiware> i know this wont fix the general problem of an extension calling the same function
IRC [11:52] <archiware> but we would at least not shoot ourselves in the foot.
IRC [11:53] <archiware> what do you think?
IRC [11:55] <archiware> ah, to your question about timegm()...
IRC [11:55] <archiware> well, on Darwin, definitely: not safe
IRC [11:55] <Dossy> ugh
IRC [11:56] <archiware> the thing is: nothing about that in the docs
IRC [11:56] <Dossy> i say we start implementing a decent, thread-safe, time management library.
IRC [11:56] <Dossy> :-)
IRC [11:56] <archiware> I recall i had some discussions with Jim some time ago
IRC [11:56] <archiware> but this is just something we have absolutely no time to do.
IRC [11:57] <archiware> In fact, OS vendors have to take care about that, don't they?
IRC [11:57] <Dossy> they *should*, but there's no reason why an OS-independent implementation can't be done
IRC [11:58] <Dossy> that just contains procs "analyze" and "synth" - what about the code required to load the .gif's in, etc?
IRC [11:58] <Dossy> sorry, w/w
IRC [11:59] <Dossy> time for lunch.
IRC [12:00] <martinh> hmmm. ns_httpget issue. when I get the file via wget it comes through fine, when i get the same thing via ns_httpget and then write it to a file it ends up like 50% bigger.
IRC [12:00] <martinh> getting a flash animation, in case it matters.
IRC [12:01] <archiware> I would say: lets wrap all those time-stuff with some wrappers and make platform-specific ifdef's
IRC [12:02] <archiware> this way we are safe, and extension writers should call the same wrappers
IRC [12:02] <archiware> if they want to be safe as well.
IRC [12:04] <archiware> i do not think there are too many of those wrappers to be done.
IRC [12:11] <martinh> ok. . .something to do with the binaryness of the file. . .
IRC [12:18] <Dossy> archiware: that's probably step #1, yeah.
IRC [12:19] <archiware> you already wanted (or did it) replace some mt-unsafe calls, right?
IRC [12:19] <Dossy> for the dns stuff, yeah
IRC [12:20] <archiware> you remember the bug# for that?
IRC [12:20] <Dossy> um, no. look in ChangeLog for dns.c
IRC [12:20] <archiware> ok
IRC [12:20] <Dossy> #1008721
IRC [12:21] <Dossy> http://aolserver.com/sf/bug/1008721
IRC [12:21] <archiware> i will try to compile the list of all those calls used in AS and write Ns_<blabla>
IRC [12:21] <Dossy> well, just compile the list and document it on the wiki pelase :)
IRC [12:22] <archiware> I have access to Solaris, Mac OSX and Linux and I'll make appropriate ifdef's for the platforms
IRC [12:22] <archiware> i will do.
IRC [12:22] <Dossy> we may want to name these platform-wrappers NsX_... or something
IRC [12:23] <Dossy> I wonder what the NSPR does for these things ...
IRC [12:23] <Dossy> perhaps we can just use or lift stuff from NSPR
IRC [12:23] <archiware> Hey, that's a good tip!
IRC [12:23] <archiware> I will have to examine that in more detail
IRC [12:23] <Dossy> right - that's why documenting the unsafe stuff gives us a "requirements list" for a solution
IRC [12:24] <archiware> In fact I wanted to fix this in Tcl as well
IRC [12:24] <Dossy> implementing the wrappers may duplicate unnecessary work. but until we have a laundry list of unsafe calls, we won't know what the scope of work really is
IRC [12:24] <archiware> right.
IRC [12:25] <archiware> The fix for Tcl is much more complex, given the number of platforms it supports...
IRC [12:27] <archiware> In fact, it would be a good idea to make Tcl wrappers for those guys and export them from there
IRC [12:27] <archiware> This way all users of Tcl lib would benefit of this work
IRC [12:28] <Dossy> :)
IRC [12:28] <archiware> I will look into this as well. This will have to be solved this way or another.
IRC [12:29] <archiware> It is a real PITA. A great one!
IRC [12:34] <Dossy> So, I'm about to release 4.0.8 -- anyone have a good reason why I shouldn't?
IRC [12:38] <archiware> Go ahead.
IRC [12:43] <Dossy> firing off an internal email, make sure everyone agrees.
IRC [12:56] *** frodoroot joined the chat.
IRC [12:57] <frodoroot> what do I need to load/source/include in my tcl scripts to use the ns_crypt command or other ns commands
IRC [12:58] <archiware> you mean under standard Tcl shell ?
IRC [12:59] <frodoroot> that's right
IRC [13:00] <archiware> zvlinux:/usr/local/homes/zv/dev/lexxapps # LD_LIBRARY_PATH=/usr/local/homes/zv/dev/lexxapps/bin;export LD_LIBRARY_PATH
IRC [13:00] <archiware> zvlinux:/usr/local/homes/zv/dev/lexxapps # tclsh
IRC [13:01] <archiware> % load ./bin/libnsd.so
IRC [13:01] <archiware> % info comm ns_crypt
IRC [13:01] <archiware> ns_crypt
IRC [13:01] <archiware> All clear?
IRC [13:01] <frodoroot> neato
IRC [13:01] <frodoroot> thanks
IRC [13:01] <frodoroot> I'l try it
IRC [13:02] <archiware> Beware: LD_LIBRARY_PATH you should normally set to: /usr/local/aolserver/lib
IRC [13:02] <archiware> since this is where AS librarries are usually installed
IRC [13:02] <frodoroot> I didn't set it and I get "could not find Nsd_Init"
IRC [13:02] <archiware> The paths I gave above are from our system.
IRC [13:04] <archiware> So, the correct is: LD_LIBRARY_PATH=/usr/local/aolserver/lib; export LD_LIBRARY_PATH
IRC [13:04] <archiware> Then, fire up tclsh and do: load /usr/local/aolserver/lib/libnsd.so
IRC [13:06] <archiware> This mess with LD_LIBRARY_PATH is needed since libnsd.so is dynamically linked with libnsthread.so file
IRC [13:06] <archiware> and the linker needs to know how to resolve it when Tcl loads libnsd.so library.
IRC [13:08] <frodoroot> if the .so file is in the shared object cache (I'm on linux) ldconfig shows it as being loaded do I even need to set LD_LIBRARY_PATH?
IRC [13:09] <archiware> I'm not sure. Try it out and you'll see.
IRC [13:23] <archiware> off, home
IRC [14:03] <Dossy> OK, 4.0.8 is out.
IRC [14:26] * jhavard cheers from the sideline
IRC [14:36] <Dossy> bot, 4.0.8 release notes is http://sourceforge.net/project/shownotes.php?release_id=266271
AIM [14:36] *** pingdashf joined the chat.
IRC [14:37] <Dossy> bot, latest version?
IRC [14:37] <Dossy> bot, latest version is 4.0.8
IRC [14:37] <Dossy> latest version?
IRC [14:37] <Dossy> heh.
IRC [14:39] *** frankie joined the chat.
IRC [14:41] <Dossy> i really want to roll a nsopenssl-3.0beta22 tarball up ... should probably do that
IRC [14:53] <frankie> Dossy: btw, nsopenssl
IRC [14:53] <frankie> Dossy: what's the reason to have a libnsopenssl?
IRC [14:54] <frankie> Dossy: a so file I mean to be loaded along with nsopenssl.so
IRC [14:59] <Dossy> i honestly don't know?
IRC [15:00] <Dossy> so that you could possibly load libnsopenssl in a plain tclsh and make outgoing SSL conns?
IRC [15:00] <Dossy> although it's not set up to even do that yet
IRC [15:00] <Dossy> lame
IRC [15:01] <Dossy> but, it appears, that's the direction it's heading or something
IRC [15:18] <frankie> mmm
IRC [15:19] <martinh> hmmm. how to make tcl not handle this binary data as a utf string.
IRC [15:22] <martinh> i've got this blob i'm pulling from the db and it insists on treating it as utf. . .
IRC [16:46] *** zoro2 joined the chat.
IRC [17:07] <Dossy> ...
IRC [17:16] *** zoro2 parted the chat.
IRC [17:27] *** zoro2 joined the chat.
IRC [17:29] *** iharding joined the chat.
IRC [17:30] *** zoro2 parted the chat.
IRC [17:38] *** iharding parted the chat.
IRC [17:38] *** zoro2 joined the chat.
IRC [17:56] *** zoro2 parted the chat.
IRC [18:02] *** zoro2 joined the chat.
IRC [18:05] *** zoro2 parted the chat.
IRC [18:10] *** zoro2 joined the chat.
IRC [18:28] *** zoro2 parted the chat.
IRC [19:00] *** zoro2 joined the chat.
IRC [19:09] *** frodoroot parted the chat.
IRC [19:16] *** zoro2 parted the chat.
IRC [19:39] *** frankie parted the chat.
IRC [21:37] <jhavard> wait a minute.
IRC [21:38] <jhavard> ns_sock* commands... does that implement everything necessary to implement a non-http server with aolserver?
IRC [22:13] <jhavard> hrm, well, using nssha1 as a base, I managed to whip up a module for uuid's
IRC [22:23] <jhavard> http://www.havpyro.com/nsuuid.tar.gz
IRC [23:30] *** brunom joined the chat.
IRC [23:45] <Dossy> Howdy, bruno.
IRC [23:50] <Dossy> OK, time to go to bed ...