2004/09/24
IRC [00:31] *** zoro2 joined the chat.
IRC [00:35] *** zoro2 parted the chat.
IRC [00:36] *** zoro2 joined the chat.
IRC [01:16] *** zoro2 parted the chat.
IRC [03:29] *** zoro2 joined the chat.
IRC [04:16] *** zoro2 parted the chat.
IRC [04:16] *** zoro2 joined the chat.
IRC [04:17] *** zoro2 parted the chat.
IRC [04:25] *** frankie joined the chat.
IRC [07:54] *** aolserver-scribe parted the chat.
AIM [09:20] *** RSeeger00 joined the chat.
IRC [09:35] <Dossy> hi rseeger :)
AIM [09:39] <RSeeger00> Morning Dossy
IRC [10:02] <Dossy> blergh
IRC [10:04] <AndyPiskorski> Morning Dossy. So, when do you think my #999452 ns_addrbyhost -all patch can go in?
IRC [10:18] <Dossy> andy: Not sure, but I'm not sure I like the implementation - the second cache, etc.
IRC [10:19] <Dossy> I'm thinking that the cache should cache all addr's, and the API that asks for only one should just return the first.
IRC [10:25] <Dossy> Comments?
IRC [10:31] *** bosman parted the chat.
IRC [10:52] <AndyPiskorski> Your idea sounds better, but is harder to implement.
IRC [10:52] <AndyPiskorski> At least, it requires completely changingt the cache implementation. That's not rocket science of course, but my goal for that patch was to be as low risk as possible.
AIM [10:53] <RSeeger00> Do they both provide the same behavior to the outside world (ie, when called)? If so, why not go with what works now, and just change the implementation later to optimize it (which it seems Dossy's implementation would aim at)
IRC [10:55] <AndyPiskorski> Yes, they should both provide the same behavior. Not quite the same when it comes to cache misses, but that is out of scope I think.
IRC [10:57] <AndyPiskorski> Oh, wait, maybe I was being dumb. Dossy's suggestion might be easy to do after all. Let me spend a few minutes hacking on it and I'll get back to you.
IRC [10:59] <Dossy> I actually think my suggested implementation is simpler than what you've currently got. That's why I'm suggesting it. :-)
IRC [11:16] <AndyPiskorski> Ugh, if I have a Tcl_DString (or Ns_DString, same thing) which is the string rep of a Tcl list, how do I get ONLY the first item on that list? Is there some good way to do that without cons'ing up a Tcl_Obj SOLEY for this purpose?
IRC [11:18] <AndyPiskorski> I suppose I could use Tcl_SplitList, but it still allocates memory. I'd really rather do this in place.
AIM [11:20] <RSeeger00> Create a Tcl_Obj from the char rep, and then ask for the first element of the list? I don't see another way, really... since its just a char* until you make it a Tcl_Obj
AIM [11:21] <RSeeger00> If you're creating a list, why not build the list as a Tcl_Obj instead of a DString?
IRC [11:21] <AndyPiskorski> Because you can't cache Tcl_Obj's server wide (at least not without special Tcl Thread Extension magic anyway, which the AOLserver core does not yet use).
IRC [11:21] <AndyPiskorski> The existing AOLserver DNS cacheing code caches strings, and must cache only strings.
IRC [11:22] <AndyPiskorski> The CALLER'S of that code could be changed to take Tcl_Obj's rather than Ns_DStrings, but that's a much bigger change, and I'm sure not going to do it now.
IRC [11:22] <AndyPiskorski> So the interface to the DNS functions must stay exactly the same, returning an Ns_DString.
AIM [11:23] <RSeeger00> Ah, so you're being passed a DString, k.
IRC [11:23] <AndyPiskorski> Converting DString to Tcl_Obj and then back to DString will certainly work, it's just, uh, not exactly optimal.
IRC [11:23] <AndyPiskorski> Yup.
AIM [11:24] <RSeeger00> Yeah, looks like SplitList is the lowest memory consumption path then... probly the fastest too
IRC [11:24] <Dossy> eek, no
IRC [11:25] <Dossy> Splitlist is overkill. while (!isspace(UCHAR(*s))) { s++; }
IRC [11:25] <Dossy> IP addresses are safely non-escaped Tcl lists since they must match [0-9. ]
IRC [11:26] <Dossy> So, a whitespace-delimited list of IP addresses is a proper Tcl list.
IRC [11:26] <Dossy> So, we just store the DString containing that (whitespace-delimited IP addresses).
IRC [11:26] <AndyPiskorski> Hm, I COULD easily change the ns_hostbyaddr and ns_addrbyhost Tcl commands to use Tcl_Obj's all the way down, but I'd be worried about breaking any other callers of the existing C functions. I'd really rather NOT change the old C API at all.
IRC [11:26] <Dossy> To pop the first IP address off the "list" we just return the bytes from start to the first space.
IRC [11:26] <Dossy> you can't Ns_Cache Tcl_Obj's, anyway - not worth changing the API to use Tcl_Obj's.
IRC [11:27] <Dossy> And you'd anyway have to introduce Ns_ObjGetHostByAddr or somesuch.
IRC [11:27] <AndyPiskorski> Oh right, duh.
IRC [11:27] <Dossy> changing the old API to use Tcl_Obj would break massive amounts of existing code. :-P
IRC [11:28] <Dossy> this is all done via a dstring trunc. - as I said, once we roll the 4.0.9a release out to production, before the official 4.0.9 release, I'll implement your RFE.
IRC [11:28] <AndyPiskorski> Actually, I'm pretty sure you COULD cache the Tcl_Obj representation of the Tcl list using Zoran's Thread Extension stuff. Not necessarily worth it though, and of course it would make AOLserver hard dependent on Thread Extension, rather than just optional as it is now.
IRC [11:29] <Dossy> Tcl_Obj's can't be accessed from two threads concurrently ...
IRC [11:29] <Dossy> so, if you want to cache Tcl_Obj's, you'd have to Tcl_DuplicateObj every time you fetch out of the Ns_Cache - why bother? :-)
IRC [11:29] <Dossy> esp. if what your caching is a Tcl_StringObj type
IRC [11:29] <AndyPiskorski> I haven't looked at how the Thread Extension handles that, I just know that Zoran said it's smart about it.
IRC [11:30] <Dossy> duplicating and creating a new Tcl_Obj when it's a StringObjType is pretty much the same cost, IIRC
IRC [11:30] <AndyPiskorski> Oh, you said you'd implement my -all RFE? I missed that. :)
IRC [11:35] <Dossy> I just said it now. :-)
IRC [11:36] <AndyPiskorski> I think I'm half way to implementing your suggestion, you want me to finish, test, and post a patch?
IRC [11:40] *** frankie parted the chat.
IRC [11:43] <Dossy> sure.
IRC [11:43] <Dossy> can't hurt.
IRC [11:43] <Dossy> I might not apply your patch as-is anyway, you understand.
IRC [11:43] <Dossy> But, if you do all the legwork, that'd be great. Automated tests would be keen, too --
IRC [11:43] <Dossy> I don't know if you've seen the example tests I've been coding up or not.
IRC [11:45] <AndyPiskorski> No, I haven't seen any automated tests. Excellent idea, but I'm not going to do it for this.
IRC [11:46] <AndyPiskorski> Btw, what do you want, I leave the all_p arg in there for GetAddr(), so a C caller can use it that way if they want? Or just eliminate the arg altogether?
IRC [11:47] <AndyPiskorski> Because the normal code path always goes through DnsGet(), and with your new suggestion, DnsGet ALWAYS uses calls GetAddr() with all_p == 1.
IRC [11:51] <Dossy> GetAddr() is not a public API, so I wouldn't add the all_p arg.
IRC [11:52] <AndyPiskorski> Ok, cool, I'll take it out, that means a bit less code.
IRC [11:53] <Dossy> yup.
IRC [12:10] *** rubick joined the chat.
IRC [12:59] *** rubick parted the chat.
IRC [13:10] <Dossy> 34 open bugs at SF.
IRC [13:10] <Dossy> Anyone here using nsgd?
IRC [13:13] *** frodoroot joined the chat.
IRC [13:13] <frodoroot> hi all
IRC [13:14] <Dossy> hi nate.
IRC [13:15] *** frankie joined the chat.
IRC [13:17] <AndyPiskorski> Crud. On Windows, anyone know what I need to #include in order for getaddrinfo() to work? Right now I'm getting compile errors.
IRC [13:18] <AndyPiskorski> AOLserver already does a #include <winsock2.h>, so I'm confused...
IRC [13:19] <Dossy> andy: compile errors? how are you compiling?
IRC [13:19] <AndyPiskorski> Hm, possibly I need to tell my Windows XP build to look at the "Microsoft 2003 Platform SDK Core" that I installed, in order to get it?
IRC [13:19] <Dossy> you shouldn't have HAVE_GETADDRINFO defined on windows - no
IRC [13:19] <Dossy> or did you hack things to define it?
IRC [13:19] <AndyPiskorski> I am using MS VC++ with a fixed up version of the old project files in sourcefore.
IRC [13:19] <Dossy> aha.
IRC [13:20] <AndyPiskorski> Yes, I defined HAVE_GETADDRINFO myself.
IRC [13:20] <Dossy> let me try a win32 build here
IRC [13:20] <AndyPiskorski> It SHOULD work on Windows, but it doesn't.
IRC [13:20] <Dossy> hmmm
IRC [13:21] <Dossy> i haven't built on win32 in a few weeks
IRC [13:21] <AndyPiskorski> Maybe, I just need to point VC++ to a newer version of the winsock*.h files or something.
IRC [13:21] <Dossy> nope
IRC [13:22] <Dossy> i think i know what it is
IRC [13:23] <AndyPiskorski> ???
IRC [13:25] <Dossy> what header is it defined in on win32?
IRC [13:25] <AndyPiskorski> Is what defined in?
IRC [13:25] *** rubick joined the chat.
IRC [13:26] <AndyPiskorski> Ah, looks like getaddrinfo() is defined in "WS2tcpip.h".
IRC [13:26] <AndyPiskorski> (That's in the "Platform SDK" stuff though, which I don't even think I'm using.)
IRC [13:27] <AndyPiskorski> Oh wait, sorry:
IRC [13:27] <AndyPiskorski> It's acctually in WSPiApi.h
IRC [13:29] <Dossy> Hmm.
IRC [13:33] <Dossy> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/getaddrinfo_2.asp
IRC [13:33] <Dossy> yeah, wspiapi.h --
IRC [13:35] <Dossy> although including that doesn't help
IRC [13:35] <Dossy> including ws2tcpip.h makes the build work
IRC [13:42] <AndyPiskorski> Where did you add the #include ? In what file?
IRC [13:46] <Dossy> include/nsthread.h
IRC [13:47] <Dossy> About to commit it now.
IRC [13:47] <Dossy> commited into HEAD --
AIM [13:49] *** RSeeger00 joined the chat.
IRC [13:49] <Dossy> just backported to 4.0 branch.
IRC [13:50] <Dossy> > #define HAVE_GETADDRINFO
IRC [13:50] <Dossy> > #define HAVE_GETNAMEINFO
IRC [13:50] <Dossy> > #include <ws2tcpip.h>
IRC [13:50] <Dossy> >
IRC [13:50] <Dossy> addd those in include/nsthread.h around Line 120.
IRC [13:50] <Dossy> brb.
AIM [13:50] *** RSeeger00 joined the chat.
IRC [13:52] <AndyPiskorski> Dossy, that doesn't work for me.
IRC [13:53] <AndyPiskorski> Did you add it right under the #include <winsock2.h> line?
AIM [13:58] *** RSeeger00 joined the chat.
IRC [13:59] <AndyPiskorski> Aha, getaddrinfo() is defined in the newer Platform SDK WS2tcpip.h, but NOT in the WS2tcpip.h that comes with VC++. My VC++ must be using the older one.
IRC [14:00] <AndyPiskorski> Dossy, you used the command line compiler to test this, and it worked? I should switch to that sometime soon, all these VC++ "project files" really suck.
AIM [14:02] *** RSeeger00 joined the chat.
IRC [14:12] <Dossy> yes.
IRC [14:12] <Dossy> I'm using the free MSVC++ Toolkit 2003
IRC [14:12] <Dossy> Of course, it's not clear if it really IS using the getaddrinfo() code or not :)
IRC [14:13] <Dossy> Probably should add a ns_info buildinfo or something
IRC [14:13] <Dossy> some way to introspect at run-time how AOLserver was built or somesuch.
IRC [14:14] <AndyPiskorski> Or just build all 3 versions of the GetAddr() code, pick which one is the default at compile time.
IRC [14:14] <AndyPiskorski> That might be handier for testing purposes too.
IRC [14:14] <Dossy> Although you can't build all 3 on all platforms.
IRC [14:15] <Dossy> That's kinda the problem, really.
IRC [14:15] <AndyPiskorski> Hm, right.
IRC [14:20] <AndyPiskorski> Dossy, what version of Windows were you using?
IRC [14:22] <Dossy> winxp home.
IRC [14:25] <Dossy> oh interesting - looks like it's not using getaddrinfo on win32
IRC [14:25] <Dossy> or if it is, [ns_hostbyaddr ""] maps to localhost on win32 getnameinfo :)
IRC [14:29] <Dossy> andy: see http://aolserver.com/sf/bug/989725
IRC [14:29] <Dossy> IMHO, we should be able to close that ticket now - could you verify?
IRC [14:30] <AndyPiskorski> Way cool, I will test that fix later today.
IRC [14:30] <Dossy> Also, http://aolserver.com/sf/bug/994224 -- can you review the patch I attached?
IRC [14:31] <AndyPiskorski> (And the logrolling fix too, Real Soon Now.)
IRC [14:31] <Dossy> great.
IRC [14:31] <Dossy> want to close out all the open bugs, then start tackling the RFE's
IRC [14:31] <Dossy> my personal goal is to get the open bugs in SF under 20 by 12/31/2004.
IRC [14:32] <Dossy> and ideally, only bugs opened in 2004
IRC [14:32] <Dossy> there are still 5 bugs from 2001, two bugs from 2002, and 9 bugs from 2003 open.
IRC [14:32] *** bartt joined the chat.
IRC [14:35] <AndyPiskorski> Damn, I finally tracked down the Platform SDK on how to tell VC++ to include and link against the SDK stuff FIRST. But AFAICT, I ALREADY had VC++ configured that way!
IRC [14:36] <AndyPiskorski> So I've no idea how to make getaddrinfo() work on Windows XP, even though it should. I'm just going to turn off the HAVE_GETADDRINFO for now in my build.
IRC [14:38] <Dossy> Hmm.
IRC [14:39] <Dossy> try including ws2tcpip.h AND wsipapi.h
IRC [14:39] <Dossy> er wspiapi.h
IRC [14:39] <Dossy> what I found: you must include ws2tcpip.h *before* wspiapi.h
IRC [14:47] <AndyPiskorski> Btw, what is that #define WIN32_LEAN_AND_MEAN in include/nsthread.h for?
IRC [14:50] <jhavard> I don't think my programmer understands that I've been up since 6:30am YESTERDAY
IRC [14:50] <jhavard> and that I would have gotten to sleep many hours ago if he hadn't fucked up.
IRC [14:50] <jhavard> I'm too tired to be bitter and angry.
IRC [14:56] <Dossy> andy: it tells the win32 .h headers to not define lots of unnecessary crap
IRC [14:56] <Dossy> like all the stdafx stuff, etc.
IRC [14:57] <Dossy> it makes the build, well, LEAN AND MEAN :P
IRC [14:57] <Dossy> jhavard: climb up on his desk, drop your trou and crap on his keyboard. for best effect, do it while he's typing on it.
IRC [14:57] <Dossy> and then utter the magic phrase: "here's your code, you can have it back."
IRC [14:58] <Dossy> a steaming pile of shit.
IRC [14:58] <AndyPiskorski> Um, but WIN32_LEAN_AND_MEAN does not appear anywhere else in the AOLserver code. So how can it do anything?
IRC [14:59] <Dossy> there's #ifdef's in all the win32 .h files
IRC [14:59] <Dossy> grep around in your MSVC++ include\ dir
IRC [15:00] <AndyPiskorski> Oh, crap. My dns.c is now compiling fine, WITH the getaddinfo() stuff,
IRC [15:00] <AndyPiskorski> but linking of nsd.dll is failing with "unresolved external symbol _LogError".
IRC [15:00] <AndyPiskorski> And the string "_LogError" appears NOWHERE in the AOLserver source, of course.
IRC [15:02] <Dossy> it's LogError
IRC [15:02] <Dossy> in dns.c
IRC [15:03] <Dossy> you took the #define HAVE_GETADDRINFO and HAVE_GETNAMEINFO out?
IRC [15:03] <jhavard> I've also come up with Havard's law of test verification.
IRC [15:03] <Dossy> heh
IRC [15:03] <AndyPiskorski> No, I didn't touch it.
IRC [15:03] <jhavard> If full verification is slightly more work than spot checking and you only spot check, only the spot checked results will be correct.
IRC [15:04] <Dossy> andy: your project files still defining them or something?
IRC [15:04] <Dossy> yup
IRC [15:04] <AndyPiskorski> Oh, I think I the bug. Weird that it worked before though.
IRC [15:04] <Dossy> havard: the cat's not dead 'til you open the box.
IRC [15:04] <Dossy> what the bug?
IRC [15:05] <Dossy> I curious you the bug.
IRC [15:05] <Dossy> man, that whole dns.c is a beast.
IRC [15:06] <Dossy> fugly hackery.
IRC [15:06] <jhavard> fix it.
IRC [15:06] <jhavard> you have 20 minutes.
IRC [15:06] <Dossy> if I could see the best way to fix it, I would.
IRC [15:06] <Dossy> :P
IRC [15:06] <Dossy> don't start that, I'll rewrite the whole damned file :P
IRC [15:06] <jhavard> s/fix/rewrite
IRC [15:06] <jhavard> damn, my brain's lagged.
IRC [15:06] <Dossy> seriously.
IRC [15:06] <Dossy> you need sleep.
IRC [15:06] <jhavard> I seriously do.
IRC [15:09] <AndyPiskorski> No, damnit, there is no bug in dns.c, your ifdef's in there are correct, Dossy.
IRC [15:10] <Dossy> andy: I'm puzzled, then.
IRC [15:10] <Dossy> must be something specific to your build env
IRC [15:16] <Dossy> I think next week, I'll work on the new "nsauth" module to replace "nsperm" --
IRC [15:44] <AndyPiskorski> Dossy, FYI, I finally got all my getaddrinfo() stuff working on Windows.
IRC [15:45] <AndyPiskorski> I'm pretty sure that my VC++ 6.0 was too old and it can ONLY work with the Platform SDK stuff.
IRC [15:45] <AndyPiskorski> However, maybe your free MSVC++ Toolkit 2003 already includes that Platform SDK stuff, I dunno.
AIM [16:34] *** RSeeger00 joined the chat.
IRC [16:48] <Dossy> andy: glad to hear it's working - is the fix simple?
IRC [16:53] <AndyPiskorski> [sigh] I really should have said, I got my linking snafu fixed.
IRC [16:54] <AndyPiskorski> As far as actually using getaddrinfo(), well, I am telling it to, but I am not certain whether it really is or not.
IRC [16:54] <AndyPiskorski> I'd swear I DID have 'ns_addrbyhost {}' returned a failure rather than working for a while, but right now it just works, which at least implies that it is NOT using getaddrinfo(), same as your stuff.
IRC [17:01] <Dossy> or, it is using getaddrinfo and it does tolerate {}
IRC [17:01] <Dossy> Ah, on Linux it throws an error.
IRC [17:02] <Dossy> Perhaps on Win32 it doesn't. Hmm.
IRC [17:12] <AndyPiskorski> Yeah, I dunno.
IRC [17:12] <AndyPiskorski> Dossy, the 4.0 branch does not build:
IRC [17:12] <AndyPiskorski> /bin/rm -f nsthreadtest
IRC [17:12] <AndyPiskorski> gcc -pipe -L../nsthread -L../nsd -o nsthreadtest nsthreadtest.o libnsthread.so -L/usr/local/lib -ltcl8.4g -ldl -lpthread -lieee -lm -Wl,--export-dynamic -Wl,-rpath,/web/aol40-branch/lib -Wl,-rpath,/usr/local/lib
IRC [17:12] <AndyPiskorski> libnsthread.so: undefined reference to `fork1'
IRC [17:12] <AndyPiskorski> collect2: ld returned 1 exit status
IRC [17:12] <AndyPiskorski> make[1]: *** [nsthreadtest] Error 1
AIM [17:12] <OnlineHost> You have been removed from the room for scrolling.
IRC [17:13] <AndyPiskorski> Any idea why?
IRC [17:14] <AndyPiskorski> That's from an anonymous CVS checkout, btw.
IRC [17:32] *** frankie parted the chat.
IRC [17:52] *** zoro2 joined the chat.
IRC [17:54] <frodoroot> what projects exist out there for webservers that run network appliances such as a router or is aolserver a good choice for such things?
IRC [18:07] *** frodoroot parted the chat.
IRC [18:38] <Dossy> Andy: What platform/OS?
IRC [19:25] *** zoro2 parted the chat.
IRC [19:54] <AndyPiskorski> Linux. 4.0.8 builds fine, but the tip of the 4.0 branch fails.
IRC [20:18] *** rubick parted the chat.
IRC [20:33] <Dossy> Are you serious? What "Linux"?
IRC [20:33] <Dossy> I build on Linux daily and it builds fine. :-)
IRC [20:33] <Dossy> Debian sarge ...
IRC [21:15] *** bartt parted the chat.
IRC [21:28] *** Boutit305 joined the chat.
IRC [21:32] *** Boutit305 parted the chat.
IRC [22:13] <AndyPiskorski> Sorry, false alarm. The 4.0 branch builds fine, it was just some kind of Heisenberg in my running of the configure script. (Damned if I know what precisely.)