Forum OpenACS Development: Re: NaviServer on Windows: [ns_info threads] returning unbalanced braces

Hi!

The output is:

{-thread:fdc- -service- fdc 0 1488582236 p:000007FEF2809570 a:0000000000000000 0} {-service- {} 271c 1 1488582236 p:0000000000000000 a:0000000000000000 0} {-ticker- {} 86c 0 1488582236 p:000007FEF28^M

So the output ends before the ^M

In my Windows installer "master" installation on my Laptop I've patched the affected procedure to work around the bug. Now I can get the first page. However, the NSD process gets stuck at 99% a while after when trying to serve a few images.

How can I find out where nsd.exe is stuck when it consumes 99% of CPU power? I assume that's an infinite loop, isn't it?

So either the [ns_info threads] is also used in other parts of the system, or I've got an additional issue in my configuration.

Cheers,
Frank

Dear Frank,
some few answers:

1. ]po[ is happily running on my Windows OpenACS Installer
http://www.spazioit.com/images/project-open/po_on_windows.jpg

2. As I said the issue is not blocking (at least on my Windows port), as proved in the following log
[04/Mar/2017:13:44:11][26056.4bdc][-service-] Notice: ON DELETE
[04/Mar/2017:13:44:11][26056.4bdc][-service-] Error: unmatched open brace in list
unmatched open brace in list
while executing
"foreach t [ns_info threads] {
if {[lindex $t 2] eq $hex} {
return [list name [lindex $t 0] tid [lindex $t 7]]
}
}"
(procedure "gettid" line 3)
::xo::system_stats->gettid
invoked from within
"my gettid"
(procedure "recordtimes" line 2)
::xo::system_stats->recordtimes
invoked from within
"::xo::system_stats recordtimes"
(procedure "::xo::at_delete" line 16)
invoked from within
"::xo::at_delete"
while executing callback
ns:tcltrace ::xo::at_delete
(context: trace proc)
[04/Mar/2017:13:44:11][26056.4bdc][-service-] Error: unmatched open brace in list
unmatched open brace in list
while executing
"foreach t [ns_info threads] {
if {[lindex $t 2] eq $hex} {
return [list name [lindex $t 0] tid [lindex $t 7]]
}
}"
(procedure "gettid" line 3)
::xo::system_stats->gettid
invoked from within
"my gettid"
(procedure "recordtimes" line 2)
::xo::system_stats->recordtimes
invoked from within
"::xo::system_stats recordtimes"
(procedure "::xo::at_delete" line 16)
invoked from within
"::xo::at_delete"
while executing callback
ns:tcltrace ::xo::at_delete
(context: trace proc)
(context: run trace)
[04/Mar/2017:13:44:11][26056.6264][-driver:nssock:0-] Notice: starting
[04/Mar/2017:13:44:11][26056.6264][-driver:nssock:0-] Notice: nssock:0: listening on [localhost]:8003
[04/Mar/2017:13:44:11][26056.6264][-driver:nssock:0-] Notice: driver: accepting connections

Quite likely, in the attempt of fixing this issue, you have created a bigger one.

3. Why are we the only ones having spotted this issue? Because we are the only ones using ]po[ on Naviserver on Windows. As simple as that.

Kind regards,
Maurizio

Thanks Maurizio.

I've included your "openacs" virtual server (both /packages/ and database dump) in my CygWin installation and it works without any apparent errors. So I can say that I've reproduced your installation now.

Still, running standard ]project-open[ causes the reported issues and lead to nsd.exec consuming 99% of CPU time. So I assume ]po[ uses some additional NaviServer functionality that includes an error.

However, you said that you had ]po[ packages installed on top of your installer? All of them or only the once we recently published as "installable" on top of OpenACS?

I'll probably have to go step-by-step from your "openacs" to our "projop" installation in order to determine the location of the error...

Still, it would be great if you could fix this [ns_info threads] issue together with Gustaf, as it will definitely come up again in different places...

Cheers,
Frank