Forum OpenACS Development: Re: Re: problems with tcl threads2.6 and aolserver4

Gustaf,

It is very strange! The only way i could have libthread2.6 compiled with Ns_ModuleInit was changing by hand generic/aolstub.cpp to

/* #ifdef NS_AOLSERVER */
#include "/usr/local/aolserver/include/ns.h"

althroug my CONFIG was passing parameter "--with-aolserver" the var NS_AOLSERVER was not setting. I do not know why.

This way i could have as a result from "nm libthread2.6.so|grep Module":

00001654 T Ns_ModuleInit
00011b6c D Ns_ModuleVersion

and libthread2.6.so module was loaded correct by aolserver when declaring "ns_param libthread ${homedir}/lib/thread2.6/libthread2.6.so" in modules section.

Problem now is with throttleThread 😟

When I put your modules/tcl/*xotcl files in my aolserver dir modules/tcl/ and reload aolserver thats ok. Server is up but every page i browse nothing happens and this message is written in aolserver log errors:

"throttleThread do ::throttle check 200.181.95.53 200.181.95.53"
("eval" body line 1)
invoked from within
"eval [my server] do [self] $args"
(procedure "do" line 3)
::throttle ::THREAD::Client->do
invoked from within
"my do check $requestor $pa"
(procedure "check" line 11)
::throttle->check
invoked from within
"my check"
(procedure "postauth" line 4)
::throttle->postauth
invoked from within
"throttle postauth"

(xotcl 1.3.4 is installed with make-aol; xotcl.tcl is in $aoldir/modules/tcl/ and *xotcl files are sourced because when i remove them the website pages display fine without any error):

Maybe errors in throttle_mod.xotcl script (as Malte observed)?

Thank you for your patience.

Collapse
Posted by Gustaf Neumann on
To shorten this thread, i hacked together my first apm
file
http://media.wu-wien.ac.at/download/xotcl-stuff-0.3.apm
that should work for some more people. It still assumes
that XOTcl and the Tcl Threads 2.6 are installed in place,
the two .xotcl files are changed into -procs.tcl files.

yes, there was a problem with the old version and the standard RP,
it was just working with plain AS and the
modified RP of learn@wu. I just installed on my notebook
a fresh version of OACS, and it seems to work fine....

the name is not polished, but it indicates that this
package contains different things (xotcl-thread support,
request monitor with throttleling support, value-added whos-online).
At least the first one should be moved into
a different package...

happy new year
-gustaf

Collapse
Posted by Jade Rubick on
Gustaf: are you willing to release this package in CVS?
Collapse
Posted by Gustaf Neumann on
Sure. First it should run without much tweaking,
then it should be splitted into two parts (xotcl
tread handling should not be part of a request
monitor), then adding some configuration options
and finally put it into cvs... and well, the docu
should be improved, and we have to find a way to
integrate the docs with the api browsers.

For the first part, Zoran has released a version
of libthread 2.6 that has the configuration
problems fixed (called 2.6.1). With that
the thread issues like the ones from Orzenil
should be resolved (got a positive feedback from
him).

http://prdownloads.sourceforge.net/tcl/

There is a version with improved functionality
(e.g. recording site switching, user tracking):

http://media.wu-wien.ac.at/download/xotcl-stuff-0.4.apm

Best regards
-gustaf

Collapse
Posted by Orzenil Silva Junior on
Jade: after some coordination with Gustaf he helps me to get xotcl-stuff package working. I think features included in xotcl-stuff-0.4 are very useful and Gustaf is working on it to get it better finding a way to document xotcl classes/objects/methods similar to ad_proc and add parameters to the package.

Thanks, Gustaf.

I am working now in a brief tutorial about how Gustaf help me to install requirements for xotcl-stuff and soon i will post it in this forum. Maybe other people could try it.

\Orzenil

Orzenil,

i am still puzzled about the -DNS_AOLSERVER.
it looks, as we are working with different versions.
my version is from sept 2004 or so from CVS, the
newest update is from aug. 2004. Can you check yours
as well?

thanks, -gustaf

localhost:~/import/thread2.6> find . -type f -exec fgrep RCS: \{} \;
...
* RCS: @(#) $Id: threadPoolCmd.c,v 1.26 2004/08/02 20:27:11 vasiljevic Exp $
...

Collapse
Posted by Orzenil Silva Junior on
Gustaf,

My threadPoolCmd.c version is newer than v 1.26

* RCS: @(#) $Id: threadPoolCmd.c,v 1.28 2004/11/27 06:11:02 vasiljevic Exp $

i downloaded threads2.6 from tcl.sf.net: http://prdownloads.sourceforge.net/tcl/thread2.6.tar.gz?download

following changes were introducing in v 1.28 over v 1.26 (directly from cvs):

http://cvs.sourceforge.net/viewcvs.py/tcl/thread/generic/threadPoolCmd.c?r1=1.28&r2=1.26&diff_format=u

More info about my environment:
debian gnu/linux ( linux kernel: 2.6.5-1-686)
tcl8.4.5
aolserver4.0.0r2

Unfortunately xotcl-stuff still doesnt work in my openacs-5-1-3 + dotlrn-2-1b install. Errors:

- http://servername/status/index

invalid command name "seconds"
while executing
"seconds set trend"
invoked from within
"thread::send $tid "$o $args""
(procedure "do" line 37)
::throttleThread ::THREAD->do
invoked from within
"throttleThread do $t set trend"
(procedure "counterTable" line 4)
invoked from within
"counterTable Views [list seconds Second minutes Minute hours Hour]"
invoked from within
"set views_trend [counterTable Views [list seconds Second minutes Minute hours Hour]]"
("uplevel" body line 102)
invoked from within
"uplevel {

# present usage statistics, active users, etc

...

- http://servername:8000/status/whos-online

invalid command name "Users"
while executing
"Users totalInfo"
invoked from within
"thread::send $tid "$o $args""
(procedure "do" line 37)
::throttleThread ::THREAD->do
invoked from within
"throttleThread do Users totalInfo"
invoked from within
"foreach element [throttleThread do Users totalInfo] {
foreach {user_id pa timestamp hits} $element break
if {[string first . $user_id] > 0} {
..."
("uplevel" body line 49)
invoked from within
"uplevel {
ad_page_contract {
Displays who's currently online

thanks,

Happy new year

.: My wish for 2005: learn xotcl ("exotickle" 😊 )