You can subscribe to this list here.
2005 |
Jan
|
Feb
(53) |
Mar
(62) |
Apr
(88) |
May
(55) |
Jun
(204) |
Jul
(52) |
Aug
|
Sep
(1) |
Oct
(94) |
Nov
(15) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(130) |
Feb
(105) |
Mar
(34) |
Apr
(61) |
May
(41) |
Jun
(92) |
Jul
(176) |
Aug
(102) |
Sep
(247) |
Oct
(69) |
Nov
(32) |
Dec
(140) |
2007 |
Jan
(58) |
Feb
(51) |
Mar
(11) |
Apr
(20) |
May
(34) |
Jun
(37) |
Jul
(18) |
Aug
(60) |
Sep
(41) |
Oct
(105) |
Nov
(19) |
Dec
(14) |
2008 |
Jan
(3) |
Feb
|
Mar
(7) |
Apr
(5) |
May
(123) |
Jun
(5) |
Jul
(1) |
Aug
(29) |
Sep
(15) |
Oct
(21) |
Nov
(51) |
Dec
(3) |
2009 |
Jan
|
Feb
(36) |
Mar
(29) |
Apr
|
May
|
Jun
(7) |
Jul
(4) |
Aug
|
Sep
(4) |
Oct
|
Nov
(13) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
(9) |
Apr
(11) |
May
(16) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(92) |
Nov
(28) |
Dec
(16) |
2013 |
Jan
(9) |
Feb
(2) |
Mar
|
Apr
(4) |
May
(4) |
Jun
(6) |
Jul
(14) |
Aug
(12) |
Sep
(4) |
Oct
(13) |
Nov
(1) |
Dec
(6) |
2014 |
Jan
(23) |
Feb
(19) |
Mar
(10) |
Apr
(14) |
May
(11) |
Jun
(6) |
Jul
(11) |
Aug
(15) |
Sep
(41) |
Oct
(95) |
Nov
(23) |
Dec
(11) |
2015 |
Jan
(3) |
Feb
(9) |
Mar
(19) |
Apr
(3) |
May
(1) |
Jun
(3) |
Jul
(11) |
Aug
(1) |
Sep
(15) |
Oct
(5) |
Nov
(2) |
Dec
|
2016 |
Jan
(7) |
Feb
(11) |
Mar
(8) |
Apr
(1) |
May
(3) |
Jun
(17) |
Jul
(12) |
Aug
(3) |
Sep
(5) |
Oct
(19) |
Nov
(12) |
Dec
(6) |
2017 |
Jan
(30) |
Feb
(23) |
Mar
(12) |
Apr
(32) |
May
(27) |
Jun
(7) |
Jul
(13) |
Aug
(16) |
Sep
(6) |
Oct
(11) |
Nov
|
Dec
(12) |
2018 |
Jan
(1) |
Feb
(5) |
Mar
(6) |
Apr
(7) |
May
(23) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(6) |
Oct
(6) |
Nov
(10) |
Dec
(3) |
2019 |
Jan
(26) |
Feb
(15) |
Mar
(9) |
Apr
|
May
(8) |
Jun
(14) |
Jul
(10) |
Aug
(10) |
Sep
(4) |
Oct
(2) |
Nov
(20) |
Dec
(10) |
2020 |
Jan
(10) |
Feb
(14) |
Mar
(29) |
Apr
(11) |
May
(25) |
Jun
(21) |
Jul
(23) |
Aug
(12) |
Sep
(19) |
Oct
(6) |
Nov
(8) |
Dec
(12) |
2021 |
Jan
(29) |
Feb
(9) |
Mar
(8) |
Apr
(8) |
May
(2) |
Jun
(2) |
Jul
(9) |
Aug
(9) |
Sep
(3) |
Oct
(4) |
Nov
(12) |
Dec
(13) |
2022 |
Jan
(4) |
Feb
|
Mar
(4) |
Apr
(12) |
May
(15) |
Jun
(7) |
Jul
(10) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(8) |
Dec
|
2023 |
Jan
(15) |
Feb
|
Mar
(23) |
Apr
(1) |
May
(2) |
Jun
(10) |
Jul
|
Aug
(22) |
Sep
(19) |
Oct
(2) |
Nov
(20) |
Dec
|
2024 |
Jan
(1) |
Feb
|
Mar
(16) |
Apr
(15) |
May
(6) |
Jun
(4) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(13) |
Nov
(18) |
Dec
(6) |
2025 |
Jan
(12) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(11) |
Jun
(5) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Zoran V. <zv...@ar...> - 2006-05-03 19:23:33
|
On 03.05.2006, at 20:56, Stephen Deasey wrote: > > Can you write a test that fails? This is a very good question.... I do not know. I know the app breaks which worked with older + newer cache code up to that version... I do not do anything really weird there... just ns_cache_eval. What is the change you did really after? Zoran |
From: Stephen D. <sd...@gm...> - 2006-05-03 18:56:18
|
On 5/1/06, Zoran Vasiljevic <zv...@ar...> wrote: > zvpb:~/sf/naviserver/nsd zoran$ diff -u cache.c.1.7 cache.c.1.8 > --- cache.c.1.7 2006-05-01 10:07:00.000000000 +0200 > +++ cache.c.1.8 2006-04-19 18:21:18.000000000 +0200 > @@ -36,7 +36,7 @@ > #include "nsd.h" > -NS_RCSID("@(#) $Header: /cvsroot/naviserver/naviserver/nsd/cache.c,v > 1.7 2006/04/15 21:14:57 sdeasey Exp $"); > +NS_RCSID("@(#) $Header: /cvsroot/naviserver/naviserver/nsd/cache.c,v > 1.8 2006/04/18 19:42:16 sdeasey Exp $"); > struct Cache; > @@ -437,9 +437,9 @@ > Ns_CacheUnsetValue(entry); > ePtr->value =3D value; > ePtr->size =3D size; > - if (ttl > 0) { > + if (ttl > 0 || cachePtr->ttl > 0) { > Ns_GetTime(&now); > - Ns_IncrTime(&ePtr->expires, ttl, 0); > + Ns_IncrTime(&ePtr->expires, ttl ? ttl : cachePtr->ttl, 0); > } > cachePtr->currentSize +=3D size; > if (ePtr->cachePtr->maxSize > 0) { > > I have troubles with our code because of the above change. > The 1.7 release works, the 1.8 not. I get following error: > > timeout waiting for update or entry flushed > > when I do [ns_cache_eval ...] > > Now, is this right (and it opens another hole) or is this > wrong? We use: > > ns_cache_create -ttl 600 > ns_cache_eval $cname $key {...} > > When I go and bump the cachetimeout parameter to 60 (default is 3) > the process waits for 60 seconds and throws the same error message. > There's one test for cache entries with a ttl, cache-6.6, which works for m= e. Can you write a test that fails? |
From: Vlad S. <vl...@cr...> - 2006-05-01 17:57:31
|
I agree, i was just surprised that DB driver never calls DbClose on exit, if i need to do it i have to write proc that will call ns_db bouncepool for every registered pool on server exit for Berkeley Db module i will do on_exit callback internally but just wanted to see other opinions on the topic in general Andrew Piskorski wrote: > On Mon, May 01, 2006 at 01:23:52PM -0400, Vlad Seryakov wrote: > >> Subject: Module unloading > > Well, don't think you're talking about module unloading at all > (good!). You seem to be talking about callbacks to call when shutting > down the Naviserver process. > >> Funny thing i encountered today, working with Berkeley module, i >> discovered that once loaded, DB driver is never closed, in case of DB it >> needs to be closed otherwise datafile can be corrupted. > > What do you mean the, "DB driver is never closed"? What is the actual > problem, specifically? > >> I am thinking to make it more generic, to add Ns_ModuleShutdown call to >> the modules and if defined, register it and on server shutdown call them >> in reverse order. Each module will decide what to do it if such public > > There is already a Tcl ns_atshutdown command. Is it not sufficient > for whatever special case handling you need to do for you use of > Berkeley DB on Naviserver process shutdown? > >> And for nsdb module i would close all pools on exit, for SQL drivers >> that is not the problem but for others it could be important. > > If it's not necessary, why do it? Could it hang or otherwise break or > delay orderly process shutdown? If not, then it seems like a > reasonable and maybe desirable thing to do. And if it is desirable, > why not just do it by default all the time, for all nsdb database > pools? > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Vlad S. <vl...@cr...> - 2006-05-01 17:54:52
|
Not unload, but call proc on "unload", similar to init during loading, that will be shutdown proc on server exit Zoran Vasiljevic wrote: > > On 01.05.2006, at 19:23, Vlad Seryakov wrote: > >> Funny thing i encountered today, working with Berkeley module, i >> discovered that once loaded, DB driver is never closed, in case of DB >> it needs to be closed otherwise datafile can be corrupted. >> >> I am thinking to make it more generic, to add Ns_ModuleShutdown call >> to the modules and if defined, register it and on server shutdown call >> them in reverse order. Each module will decide what to do it if such >> public function is defined. >> >> And for nsdb module i would close all pools on exit, for SQL drivers >> that is not the problem but for others it could be important. >> >> Any objections? > > How would you unload the shared library? > IIRC, Tcl has a generic wrapper for that... > > Cheers > Zoran > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Andrew P. <at...@pi...> - 2006-05-01 17:52:53
|
On Mon, May 01, 2006 at 01:23:52PM -0400, Vlad Seryakov wrote: > Subject: Module unloading Well, don't think you're talking about module unloading at all (good!). You seem to be talking about callbacks to call when shutting down the Naviserver process. > Funny thing i encountered today, working with Berkeley module, i > discovered that once loaded, DB driver is never closed, in case of DB it > needs to be closed otherwise datafile can be corrupted. What do you mean the, "DB driver is never closed"? What is the actual problem, specifically? > I am thinking to make it more generic, to add Ns_ModuleShutdown call to > the modules and if defined, register it and on server shutdown call them > in reverse order. Each module will decide what to do it if such public There is already a Tcl ns_atshutdown command. Is it not sufficient for whatever special case handling you need to do for you use of Berkeley DB on Naviserver process shutdown? > And for nsdb module i would close all pools on exit, for SQL drivers > that is not the problem but for others it could be important. If it's not necessary, why do it? Could it hang or otherwise break or delay orderly process shutdown? If not, then it seems like a reasonable and maybe desirable thing to do. And if it is desirable, why not just do it by default all the time, for all nsdb database pools? -- Andrew Piskorski <at...@pi...> http://www.piskorski.com/ |
From: Zoran V. <zv...@ar...> - 2006-05-01 17:51:44
|
On 01.05.2006, at 19:23, Vlad Seryakov wrote: > Funny thing i encountered today, working with Berkeley module, i > discovered that once loaded, DB driver is never closed, in case of > DB it needs to be closed otherwise datafile can be corrupted. > > I am thinking to make it more generic, to add Ns_ModuleShutdown > call to the modules and if defined, register it and on server > shutdown call them in reverse order. Each module will decide what > to do it if such public function is defined. > > And for nsdb module i would close all pools on exit, for SQL > drivers that is not the problem but for others it could be important. > > Any objections? How would you unload the shared library? IIRC, Tcl has a generic wrapper for that... Cheers Zoran |
From: Vlad S. <vl...@cr...> - 2006-05-01 17:24:07
|
Funny thing i encountered today, working with Berkeley module, i discovered that once loaded, DB driver is never closed, in case of DB it needs to be closed otherwise datafile can be corrupted. I am thinking to make it more generic, to add Ns_ModuleShutdown call to the modules and if defined, register it and on server shutdown call them in reverse order. Each module will decide what to do it if such public function is defined. And for nsdb module i would close all pools on exit, for SQL drivers that is not the problem but for others it could be important. Any objections? -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Zoran V. <zv...@ar...> - 2006-05-01 08:19:29
|
zvpb:~/sf/naviserver/nsd zoran$ diff -u cache.c.1.7 cache.c.1.8 --- cache.c.1.7 2006-05-01 10:07:00.000000000 +0200 +++ cache.c.1.8 2006-04-19 18:21:18.000000000 +0200 @@ -36,7 +36,7 @@ #include "nsd.h" -NS_RCSID("@(#) $Header: /cvsroot/naviserver/naviserver/nsd/cache.c,v 1.7 2006/04/15 21:14:57 sdeasey Exp $"); +NS_RCSID("@(#) $Header: /cvsroot/naviserver/naviserver/nsd/cache.c,v 1.8 2006/04/18 19:42:16 sdeasey Exp $"); struct Cache; @@ -437,9 +437,9 @@ Ns_CacheUnsetValue(entry); ePtr->value = value; ePtr->size = size; - if (ttl > 0) { + if (ttl > 0 || cachePtr->ttl > 0) { Ns_GetTime(&now); - Ns_IncrTime(&ePtr->expires, ttl, 0); + Ns_IncrTime(&ePtr->expires, ttl ? ttl : cachePtr->ttl, 0); } cachePtr->currentSize += size; if (ePtr->cachePtr->maxSize > 0) { I have troubles with our code because of the above change. The 1.7 release works, the 1.8 not. I get following error: timeout waiting for update or entry flushed when I do [ns_cache_eval ...] Now, is this right (and it opens another hole) or is this wrong? We use: ns_cache_create -ttl 600 ns_cache_eval $cname $key {...} When I go and bump the cachetimeout parameter to 60 (default is 3) the process waits for 60 seconds and throws the same error message. Cheers Zoran |
From: Stephen D. <sd...@gm...> - 2006-04-22 20:39:50
|
On 4/19/06, Zoran Vasiljevic <zv...@ar...> wrote: > > On 19.04.2006, at 21:18, Stephen Deasey wrote: > > > > > If any one's interested in looking into thread local caches: > > > So we are back to thread local caches, storing objects > directly i.e. w/o shimmering... > I believe this is simpler to do as thread-wide stuff as > there is no locking involved, or? I just didn't want to put a lot of special case code in there for the two different cache types. Yet at the same time, I wanted to hide the guts of cache usage to make it easier. If you look at the nscache module it's a real mess. There's more code there than the current C and Tcl implementations combined. There's also nice to have stuff, like accurate stats which combine the stats from the individual threads to some master stats table, for example. But yeah, it's certainly possible. |
From: Zoran V. <zv...@ar...> - 2006-04-19 20:09:58
|
On 19.04.2006, at 21:18, Stephen Deasey wrote: > > If any one's interested in looking into thread local caches: So we are back to thread local caches, storing objects directly i.e. w/o shimmering... I believe this is simpler to do as thread-wide stuff as there is no locking involved, or? Zoran > > I was thinking that this could be pushed down into the C API. But I > don't know if this makes sense. More checking of how the ADP code > uses thread local caches for Tcl code needs to be done. > > We could add a flags option NS_CACHE_THREAD_LOCAL or whatever to > Ns_CacheCreate(). Ns_CacheLock/Unlock could depend on this flag. > > One thing I looked at is gathering stats in the thread local cache and > then periodically flushing them to some common structure. I think > there's an example of this in the cache code I posted to the SF > tracker. > > Unfortunately you can't keep it completely in the C layer, as you'd > like to optimise Tcl by storing Tcl objects directly, rather than > stringifying them. > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, =20 > security? > Get stuff done quickly with pre-integrated technology to make your =20 > job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache =20 > Geronimo > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=120709&bid&3057&dat=121642= > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel |
From: Stephen D. <sd...@gm...> - 2006-04-19 19:18:48
|
On 4/19/06, Vlad Seryakov <vl...@cr...> wrote: > It is thread storage but in case of conn thread which never ends, > cleanup needs to be performs as with Ns_Cls* Hmm, an eviction policy -- sounds like a thread local Ns_Cache... Or, if cleanup is performed at the end of conn processing, as with Ns_Cls, and a conn runs in a single thread until completion, how is it different to Ns_Cls? If any one's interested in looking into thread local caches: I was thinking that this could be pushed down into the C API. But I don't know if this makes sense. More checking of how the ADP code uses thread local caches for Tcl code needs to be done. We could add a flags option NS_CACHE_THREAD_LOCAL or whatever to Ns_CacheCreate(). Ns_CacheLock/Unlock could depend on this flag. One thing I looked at is gathering stats in the thread local cache and then periodically flushing them to some common structure. I think there's an example of this in the cache code I posted to the SF tracker. Unfortunately you can't keep it completely in the C layer, as you'd like to optimise Tcl by storing Tcl objects directly, rather than stringifying them. |
From: Vlad S. <vl...@cr...> - 2006-04-19 18:00:15
|
It is thread storage but in case of conn thread which never ends, cleanup needs to be performs as with Ns_Cls* But yes, i will think about it more, for now we close this topic because it is removed already from the core Stephen Deasey wrote: > On 4/18/06, Vlad Seryakov <vl...@cr...> wrote: >> As for static tls key, i would create 2 public functions that return and >> set TLS data, this way key can still be private. >> >> Also, we run cleanups on connection close, so we can cleanup this data >> as well. > > > Hmm, clean up on connection close? It doesn't sound like your > describing Thread Local Storage to me -- more like Ns_Cls*. > > This needs to be thought through a bit more. Exactly what problems is > this solving, and how? > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=k&kid0709&bid&3057&dat1642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Stephen D. <sd...@gm...> - 2006-04-19 17:10:07
|
On 4/18/06, Vlad Seryakov <vl...@cr...> wrote: > > As for static tls key, i would create 2 public functions that return and > set TLS data, this way key can still be private. > > Also, we run cleanups on connection close, so we can cleanup this data > as well. Hmm, clean up on connection close? It doesn't sound like your describing Thread Local Storage to me -- more like Ns_Cls*. This needs to be thought through a bit more. Exactly what problems is this solving, and how? |
From: Zoran V. <zv...@ar...> - 2006-04-19 15:50:14
|
On 19.04.2006, at 16:53, Vlad Seryakov wrote: > On the other hand, on my servers i often use 0.0.0.0 as address, so > nsd listens on all registered interfaces. For me it sound more > logical then trying to determine what IP address i am resolving to, > if no specific then listen on all. Something like: [19/Apr/2006:17:28:43][681.2684415384][-main-] Notice: nssock: listening on 0.0.0.0:8050 [19/Apr/2006:17:28:43][681.25186304][-driver-] Notice: starting [19/Apr/2006:17:28:43][681.25186304][-driver-] Notice: driver: accepting connections ? Allright, I see, this could be the trick to bypass that reverse lookup. I think I'm going to use that for the time being and see if this fixes our blues. Thanks for the tip. Cheers Zoran |
From: Vlad S. <vl...@cr...> - 2006-04-19 14:53:24
|
On the other hand, on my servers i often use 0.0.0.0 as address, so nsd listens on all registered interfaces. For me it sound more logical then trying to determine what IP address i am resolving to, if no specific then listen on all. Zoran Vasiljevic wrote: > > On 19.04.2006, at 16:31, Vlad Seryakov wrote: > >> So, it is logically that reverse DNS is used to get the name. > > > OK. This makes sense only if there is no hostname assigned > to the nsssock. Because if it is, the reverse-lookup has > absolutely no meaning, and is shooting ourselves in the > foot. > > Therefore I'd do that reverse lookup only if no hostname > is defined to nssock, like this below. > Is this OK for everybody? > > ------------------ driver.c:Ns_DriverInit() > > host = Ns_ConfigGetValue(path, "hostname"); > bindaddr = address = Ns_ConfigGetValue(path, "address"); > defserver = Ns_ConfigGetValue(path, "defaultserver"); > > /* > * If the listen address was not specified, attempt to determine it > * through a DNS lookup of the specified hostname or the server's > * primary hostname. > */ > > if (address == NULL) { > he = gethostbyname(host ? host : Ns_InfoHostname()); > > /* > * If the lookup suceeded but the resulting hostname does not > * appear to be fully qualified, attempt a reverse lookup on the > * address which often returns the fully qualified name. > * > * NB: This is a common but sloppy configuration for a Unix > * network. > */ > > /*-------- ^^^^^^^^^^^^^^^^ -------*/ > > if (host == NULL && he != NULL && he->h_name != NULL && > strchr(he->h_name, '.') == NULL) { > he = > gethostbyaddr(he->h_addr_list[0],he->h_length,he->h_addrtype); > } > > /* > * If the lookup suceeded, use the first address in host entry > list. > */ > > if (he == NULL || he->h_name == NULL) { > Ns_Log(Error, "%s: could not resolve %s: %s", module, > host ? host : Ns_InfoHostname(), strerror(errno)); > return NS_ERROR; > } > if (*(he->h_addr_list) == NULL) { > Ns_Log(Error, "%s: no addresses for %s", module, > he->h_name); > return NS_ERROR; > } > > memcpy(&ia.s_addr, he->h_addr_list[0], sizeof(ia.s_addr)); > address = ns_inet_ntoa(ia); > > /* > * Finally, if no hostname was specified, set it to the hostname > * derived from the lookup(s) above. > */ > > if (host == NULL) { > host = he->h_name; > } > } > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Zoran V. <zv...@ar...> - 2006-04-19 14:42:38
|
On 19.04.2006, at 16:31, Vlad Seryakov wrote: > So, it is logically that reverse DNS is used to get the name. OK. This makes sense only if there is no hostname assigned to the nsssock. Because if it is, the reverse-lookup has absolutely no meaning, and is shooting ourselves in the foot. Therefore I'd do that reverse lookup only if no hostname is defined to nssock, like this below. Is this OK for everybody? ------------------ driver.c:Ns_DriverInit() host = Ns_ConfigGetValue(path, "hostname"); bindaddr = address = Ns_ConfigGetValue(path, "address"); defserver = Ns_ConfigGetValue(path, "defaultserver"); /* * If the listen address was not specified, attempt to determine it * through a DNS lookup of the specified hostname or the server's * primary hostname. */ if (address == NULL) { he = gethostbyname(host ? host : Ns_InfoHostname()); /* * If the lookup suceeded but the resulting hostname does not * appear to be fully qualified, attempt a reverse lookup on the * address which often returns the fully qualified name. * * NB: This is a common but sloppy configuration for a Unix * network. */ /*-------- ^^^^^^^^^^^^^^^^ -------*/ if (host == NULL && he != NULL && he->h_name != NULL && strchr(he->h_name, '.') == NULL) { he = gethostbyaddr(he->h_addr_list[0],he->h_length,he- >h_addrtype); } /* * If the lookup suceeded, use the first address in host entry list. */ if (he == NULL || he->h_name == NULL) { Ns_Log(Error, "%s: could not resolve %s: %s", module, host ? host : Ns_InfoHostname(), strerror(errno)); return NS_ERROR; } if (*(he->h_addr_list) == NULL) { Ns_Log(Error, "%s: no addresses for %s", module, he->h_name); return NS_ERROR; } memcpy(&ia.s_addr, he->h_addr_list[0], sizeof(ia.s_addr)); address = ns_inet_ntoa(ia); /* * Finally, if no hostname was specified, set it to the hostname * derived from the lookup(s) above. */ if (host == NULL) { host = he->h_name; } } |
From: Vlad S. <vl...@cr...> - 2006-04-19 14:30:45
|
This only work when no address parameters specified in the driver's section in nsd.tcl. Then it gets hostname and as usually happen hostname is just simple name, this is true for internal sites, all internet servers usually have fully qualified name configured. So, it is logically that reverse DNS is used to get the name. I would suggest to make driver's config parameter that would enable reverse DNS lookup having it disabled by default. Zoran Vasiljevic wrote: > > On 19.04.2006, at 16:07, Vlad Seryakov wrote: > >> We do use fully qualified hostnames but usually they are resolved or >> we specify exactly in nsd.tcl what hostname wqe are serving > > In order to keep the configuration to minimum > (we are shrink-wrapped package) we do not have > ANY configuration. > > For TCP port we take 8000 per default and that > is all. We rely on NS to get proper hostname, > then to use this hostname to get proper IP address. > On Mac, this somehow fails in certain configurations. > What fails is the reverse lookup of hostname given > address. We have not been able to find out why but > this one is making our (support) life to hell. > So we HAVE to do something. First idea was to understand > WHY the reverse lookup is done deep in NS driver code. > Next is to either disable it, or make our private > changes to disable it, because it often leads to inability > to start on a machine whose hostname cannot be reverse > looked-up (typically user workstations). > > So, is there any DEEP reason why there is an additional > IP-to-hostname translation there what I do not see at > the first glance? Because if it isn't, then I'll like > to relax that part. > > Cheers > Zoran > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Zoran V. <zv...@ar...> - 2006-04-19 14:25:21
|
On 19.04.2006, at 16:07, Vlad Seryakov wrote: > We do use fully qualified hostnames but usually they are resolved > or we specify exactly in nsd.tcl what hostname wqe are serving In order to keep the configuration to minimum (we are shrink-wrapped package) we do not have ANY configuration. For TCP port we take 8000 per default and that is all. We rely on NS to get proper hostname, then to use this hostname to get proper IP address. On Mac, this somehow fails in certain configurations. What fails is the reverse lookup of hostname given address. We have not been able to find out why but this one is making our (support) life to hell. So we HAVE to do something. First idea was to understand WHY the reverse lookup is done deep in NS driver code. Next is to either disable it, or make our private changes to disable it, because it often leads to inability to start on a machine whose hostname cannot be reverse looked-up (typically user workstations). So, is there any DEEP reason why there is an additional IP-to-hostname translation there what I do not see at the first glance? Because if it isn't, then I'll like to relax that part. Cheers Zoran |
From: Vlad S. <vl...@cr...> - 2006-04-19 14:07:29
|
We do use fully qualified hostnames but usually they are resolved or we specify exactly in nsd.tcl what hostname wqe are serving Zoran Vasiljevic wrote: > Hi! > > I've been stumbling accross this part of the code in > driver.c: > > /* > * If the listen address was not specified, attempt to determine it > * through a DNS lookup of the specified hostname or the server's > * primary hostname. > */ > > if (address == NULL) { > he = gethostbyname(host ? host : Ns_InfoHostname()); > > /* > * If the lookup suceeded but the resulting hostname does not > * appear to be fully qualified, attempt a reverse lookup on the > * address which often returns the fully qualified name. > * > * NB: This is a common but sloppy configuration for a Unix > * network. > */ > > if (he != NULL && he->h_name != NULL && > strchr(he->h_name, '.') == NULL) { > he = gethostbyaddr(he->h_addr, he->h_length, he->h_addrtype); > } > > > My problem is: why on earth is this step needed at all? > We do not make use of the fully qualified address, at least > I do not see that. > So why insist on getting one? Why not taking the address from > the "he" as returned by gethostbyname? > > Chees > Zoran > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Zoran V. <zv...@ar...> - 2006-04-19 09:59:16
|
Hi! I've been stumbling accross this part of the code in driver.c: /* * If the listen address was not specified, attempt to determine it * through a DNS lookup of the specified hostname or the server's * primary hostname. */ if (address == NULL) { he = gethostbyname(host ? host : Ns_InfoHostname()); /* * If the lookup suceeded but the resulting hostname does not * appear to be fully qualified, attempt a reverse lookup on the * address which often returns the fully qualified name. * * NB: This is a common but sloppy configuration for a Unix * network. */ if (he != NULL && he->h_name != NULL && strchr(he->h_name, '.') == NULL) { he = gethostbyaddr(he->h_addr, he->h_length, he- >h_addrtype); } My problem is: why on earth is this step needed at all? We do not make use of the fully qualified address, at least I do not see that. So why insist on getting one? Why not taking the address from the "he" as returned by gethostbyname? Chees Zoran |
From: Vlad S. <vl...@cr...> - 2006-04-18 21:38:29
|
I suggest get it out of the core for now, i will live with global Tcl vars, that was immediate fix Zoran Vasiljevic wrote: > > On 18.04.2006, at 22:48, Stephen Deasey wrote: > >> An API that allows easy sharing between C and Tcl code is an >> interesting idea, e.g. a filter written in C storing data for a page >> written in Tcl. But that's not what's been implemented. > > Too bad. I thought it is something in this direction. > >> >> As it stands, it's possible for C code to call down to Tcl and grab a >> global variable, it's impossible to get at the tls data as the tls key >> is a private variable in the nsd/tclinit.c file. >> >> One bug with the current implementation is that virtual servers will >> stomp on each others data. >> > > Even worse. Hm... in that case I'd put this out of the server > and into the module. > > Normally I do not have anything against extending core > server but the more things we put into, the more things > need to be maintained, tested, understood, etc... So > on one side I'd love to see more features and on another > I have headaches when thinking about what we already have > inside and what we alone do not grasp. Temptation is strong > to add something ad-hoc to solve an immediate problem but we > should really make our life little bit more difficult on the > short term by writing an RFE first and then discuss, eventually > bless it and then integrate it in the core. I know this sounds > somehow buerocratic but this little burden will pay off for sure > on the long term. > > For the current tls issue: ideally I'd see something like > simple way of handling stuff from Tcl and from C code which > I thought ns_tls is (would be). A Ns_Set seems OK as it has > both C and Tcl api. And, sets can be shared (thread-wide) and > thread private, so instead of pulling yet-another data-structure > inside, why not see if Ns_Set is enough for what Vlad is needing? > > Cheers > Zoran > >> >> >> On 4/18/06, Vlad Seryakov <vl...@cr...> wrote: >>> Not you exactly but both of you and Stephen:-))) >>> >>> Global Tcl vars is more cleaner Tcl-only solution but i agree >>> interoperability between C and Tcl using ns-tls would be a good feature. >>> Internally ns_tls keeps Ns_set, so getting this from C would be just >>> gettting pointer to Ns_Set structure. It just requires more C-level >>> calls something like Ns_GetTclTls()/Ns_SetTclTcls() >>> >>> Zoran Vasiljevic wrote: >>>> >>>> On 18.04.2006, at 15:52, Vlad Seryakov wrote: >>>> >>>>> You convinced me that at this moment ns_tls is not appropriate, i will >>>>> remove it >>>> >>>> Oh?! How did I do that? Apart from giving a trivial >>>> alternative, I think that this interface is ok per-se. >>>> It allows "unified" access from Tcl and C code. >>>> That is, one should be able to do the "same" from C >>>> and Tcl. Isn't it so? >>>> >>>> Cheers >>>> Zoran >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by xPML, a groundbreaking scripting >> language >> that extends applications into web and mobile media. Attend the live >> webcast >> and join the prime developer group breaking into this new coding >> territory! >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 >> _______________________________________________ >> naviserver-devel mailing list >> nav...@li... >> https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Vlad S. <vl...@cr...> - 2006-04-18 21:30:52
|
I agree, the question is: remove it completely or make it better C/Tcl sharing API? As for static tls key, i would create 2 public functions that return and set TLS data, this way key can still be private. Also, we run cleanups on connection close, so we can cleanup this data as well. Stephen Deasey wrote: > An API that allows easy sharing between C and Tcl code is an > interesting idea, e.g. a filter written in C storing data for a page > written in Tcl. But that's not what's been implemented. > > As it stands, it's possible for C code to call down to Tcl and grab a > global variable, it's impossible to get at the tls data as the tls key > is a private variable in the nsd/tclinit.c file. > > One bug with the current implementation is that virtual servers will > stomp on each others data. > > > > On 4/18/06, Vlad Seryakov <vl...@cr...> wrote: >> Not you exactly but both of you and Stephen:-))) >> >> Global Tcl vars is more cleaner Tcl-only solution but i agree >> interoperability between C and Tcl using ns-tls would be a good feature. >> Internally ns_tls keeps Ns_set, so getting this from C would be just >> gettting pointer to Ns_Set structure. It just requires more C-level >> calls something like Ns_GetTclTls()/Ns_SetTclTcls() >> >> Zoran Vasiljevic wrote: >>> On 18.04.2006, at 15:52, Vlad Seryakov wrote: >>> >>>> You convinced me that at this moment ns_tls is not appropriate, i will >>>> remove it >>> Oh?! How did I do that? Apart from giving a trivial >>> alternative, I think that this interface is ok per-se. >>> It allows "unified" access from Tcl and C code. >>> That is, one should be able to do the "same" from C >>> and Tcl. Isn't it so? >>> >>> Cheers >>> Zoran > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Zoran V. <zv...@ar...> - 2006-04-18 21:30:17
|
On 18.04.2006, at 22:48, Stephen Deasey wrote: > An API that allows easy sharing between C and Tcl code is an > interesting idea, e.g. a filter written in C storing data for a page > written in Tcl. But that's not what's been implemented. Too bad. I thought it is something in this direction. > > As it stands, it's possible for C code to call down to Tcl and grab a > global variable, it's impossible to get at the tls data as the tls key > is a private variable in the nsd/tclinit.c file. > > One bug with the current implementation is that virtual servers will > stomp on each others data. > Even worse. Hm... in that case I'd put this out of the server and into the module. Normally I do not have anything against extending core server but the more things we put into, the more things need to be maintained, tested, understood, etc... So on one side I'd love to see more features and on another I have headaches when thinking about what we already have inside and what we alone do not grasp. Temptation is strong to add something ad-hoc to solve an immediate problem but we should really make our life little bit more difficult on the short term by writing an RFE first and then discuss, eventually bless it and then integrate it in the core. I know this sounds somehow buerocratic but this little burden will pay off for sure on the long term. For the current tls issue: ideally I'd see something like simple way of handling stuff from Tcl and from C code which I thought ns_tls is (would be). A Ns_Set seems OK as it has both C and Tcl api. And, sets can be shared (thread-wide) and thread private, so instead of pulling yet-another data-structure inside, why not see if Ns_Set is enough for what Vlad is needing? Cheers Zoran > > > On 4/18/06, Vlad Seryakov <vl...@cr...> wrote: >> Not you exactly but both of you and Stephen:-))) >> >> Global Tcl vars is more cleaner Tcl-only solution but i agree >> interoperability between C and Tcl using ns-tls would be a good =20 >> feature. >> Internally ns_tls keeps Ns_set, so getting this from C would be just >> gettting pointer to Ns_Set structure. It just requires more C-level >> calls something like Ns_GetTclTls()/Ns_SetTclTcls() >> >> Zoran Vasiljevic wrote: >>> >>> On 18.04.2006, at 15:52, Vlad Seryakov wrote: >>> >>>> You convinced me that at this moment ns_tls is not appropriate, =20 >>>> i will >>>> remove it >>> >>> Oh?! How did I do that? Apart from giving a trivial >>> alternative, I think that this interface is ok per-se. >>> It allows "unified" access from Tcl and C code. >>> That is, one should be able to do the "same" from C >>> and Tcl. Isn't it so? >>> >>> Cheers >>> Zoran > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting =20 > language > that extends applications into web and mobile media. Attend the =20 > live webcast > and join the prime developer group breaking into this new coding =20 > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=110944&bid$1720&dat=121642= > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel |
From: Stephen D. <sd...@gm...> - 2006-04-18 20:48:49
|
An API that allows easy sharing between C and Tcl code is an interesting idea, e.g. a filter written in C storing data for a page written in Tcl. But that's not what's been implemented. As it stands, it's possible for C code to call down to Tcl and grab a global variable, it's impossible to get at the tls data as the tls key is a private variable in the nsd/tclinit.c file. One bug with the current implementation is that virtual servers will stomp on each others data. On 4/18/06, Vlad Seryakov <vl...@cr...> wrote: > Not you exactly but both of you and Stephen:-))) > > Global Tcl vars is more cleaner Tcl-only solution but i agree > interoperability between C and Tcl using ns-tls would be a good feature. > Internally ns_tls keeps Ns_set, so getting this from C would be just > gettting pointer to Ns_Set structure. It just requires more C-level > calls something like Ns_GetTclTls()/Ns_SetTclTcls() > > Zoran Vasiljevic wrote: > > > > On 18.04.2006, at 15:52, Vlad Seryakov wrote: > > > >> You convinced me that at this moment ns_tls is not appropriate, i will > >> remove it > > > > Oh?! How did I do that? Apart from giving a trivial > > alternative, I think that this interface is ok per-se. > > It allows "unified" access from Tcl and C code. > > That is, one should be able to do the "same" from C > > and Tcl. Isn't it so? > > > > Cheers > > Zoran |
From: Vlad S. <vl...@cr...> - 2006-04-18 14:48:11
|
Not you exactly but both of you and Stephen:-))) Global Tcl vars is more cleaner Tcl-only solution but i agree interoperability between C and Tcl using ns-tls would be a good feature. Internally ns_tls keeps Ns_set, so getting this from C would be just gettting pointer to Ns_Set structure. It just requires more C-level calls something like Ns_GetTclTls()/Ns_SetTclTcls() Zoran Vasiljevic wrote: > > On 18.04.2006, at 15:52, Vlad Seryakov wrote: > >> You convinced me that at this moment ns_tls is not appropriate, i will >> remove it > > Oh?! How did I do that? Apart from giving a trivial > alternative, I think that this interface is ok per-se. > It allows "unified" access from Tcl and C code. > That is, one should be able to do the "same" from C > and Tcl. Isn't it so? > > Cheers > Zoran > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > -- Vlad Seryakov 571 262-8608 office vl...@cr... http://www.crystalballinc.com/vlad/ |