Hi,
We intermittently encounter the above error when we call a ns_eval from our
naviserver codebase (with Tcl 8.5.11 ).
I can't reliably reproduce it, but it seems when we call a ns_eval AND a
new thread is created, getentry will attempt to access ::errorInfo (and
::errorCode) when they do not exist yet. (getentry is called to load
tclcurl and tdom shared libraries in our environment)
There is at least some discussion as to whether it is a Tcl bug that these
globals don't exist by default:
https://core.tcl.tk/tcl/tktview?name=3480249fff
I remember there was talk about dropping support for Tcl 8.4 in
Naviserver.. if that was the case could potentially avoid this issue using
something like:
proc getentry {store var} { variable epoch
if {[catch {nsv_set nstrace-${store}-${epoch} $var} val opts]} {
set ::errorInfo [dict get $opts -errorinfo]
set ::errorCode [dict get $opts -errorcode] set val ""
} return $val }
Otherwise just an existence check on the globals?
Or do you think there may be another issue at play here?
Thanks.
Error below:
[01/Aug/2013:11:01:02][31152.7f4b6e44c700][-ns_job_1-] Notice: Starting
thread: -ns_job_1-
[01/Aug/2013:11:01:02][31152.7f4b6e44c700][-ns_job_1-] Debug:
ns:interptrace[srv]: create nslog:initinterp
/var/log/naviserver/tlc.access.log
[01/Aug/2013:11:01:02][31152.7f4b6e44c700][-ns_job_1-] Debug:
ns:interptrace[srv]: create p:0x7f4b72096ec0 a:(nil)
[01/Aug/2013:11:01:02][31152.7f4b6e44c700][-ns_job_1-] Debug:
ns:interptrace[srv]: create nsdb:initinterp a:0x20ee560
[01/Aug/2013:11:01:02][31152.7f4b6e44c700][-ns_job_1-] Debug:
ns:interptrace[srv]: create nsproxy:initinterp a:0x2b07380
[01/Aug/2013:11:01:02][31152.7f4b6e44c700][-ns_job_1-] Debug:
ns:interptrace[srv]: allocate ns:tcltrace ns_init
getentry: store = load
getentry: var = /usr/lib/tcltk/TclCurl7.19.6/libTclCurl7.19.6.so
[01/Aug/2013:11:01:02][31152.7f4b6e44c700][-ns_job_1-] Error: can't read
"::errorInfo": no such variable
can't read "::errorInfo": no such variable
while executing
"set ei $::errorInfo"
(procedure "nstrace::getentry" line 9)
invoked from within
"nstrace::getentry load $image"
(procedure "script::_load" line 5)
invoked from within
"script::_$cmd"
(procedure "nstrace::statescript" line 14)
invoked from within
"nstrace::statescript"
(procedure "_ns_eval" line 15)
invoked from within
"_ns_eval { expr {1+1}}"
--
David Osborne
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel