f



Tcl Web Service with Authorization kills Tcl

Hi!

I am trying to use web services with authorization using wsdl on 
tclhttpd 3.5.1, ActiveTcl8.4.18, WS::Server/Utils/Client 1.0.8. tls 
1.50, tdom 0.8.2, SuSE Linux 10.0.

Are there any known issues using WSDL and authorization?

Server side is exactly the example in 
http://members.cox.net/~gerald.lester/WebServices/Tcl%20Web%20Service%20Example.html

As client side is using authorization http headers are appended to 
client commands. Reading the definitions of the offered services is fine.

   ::WS::Client::GetAndParseWsdl\
     http://localhost:8015/service/wsExamples/wsdl\
    {"Authorization" "Basic ZmlzOnNVc2VANi40"}

but executing

   set results [::WS::Client::DoCall wsExamples SimpleEcho {TestString 
{This is a test}} {"Authorization" "Basic ZmlzOnNVc2VANi40"}}

returns

Unexpected EOF received from Server

and the tclhttpd process aborts.

/home/sg/bin/sgw: line 4:  7550 Segmentation fault 
${TCLSH:-"tclsh8.4"} /opt/tclhttpd3.5.1/bin/httpd.tcl -debug 1

TIA

Stefan

0
3/25/2008 2:52:14 PM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

40 Replies
1220 Views

Similar Articles

[PageSpeed] 32

Stefan Finzel wrote:
> Hi!
> 
> I am trying to use web services with authorization using wsdl on 
> tclhttpd 3.5.1, ActiveTcl8.4.18, WS::Server/Utils/Client 1.0.8. tls 
> 1.50, tdom 0.8.2, SuSE Linux 10.0.
> 
> Are there any known issues using WSDL and authorization?

None that I know of.

I'll not have a chance to look at this for a while.  I suggest that you 
attempt to debug/fix it on your own and file a bug report (with patch) 
against the appropriate software.

> 
> Server side is exactly the example in 
> http://members.cox.net/~gerald.lester/WebServices/Tcl%20Web%20Service%20Example.html 
> 
> 
> As client side is using authorization http headers are appended to 
> client commands. Reading the definitions of the offered services is fine.
> 
>   ::WS::Client::GetAndParseWsdl\
>     http://localhost:8015/service/wsExamples/wsdl\
>    {"Authorization" "Basic ZmlzOnNVc2VANi40"}
> 
> but executing
> 
>   set results [::WS::Client::DoCall wsExamples SimpleEcho {TestString 
> {This is a test}} {"Authorization" "Basic ZmlzOnNVc2VANi40"}}
> 
> returns
> 
> Unexpected EOF received from Server
> 
> and the tclhttpd process aborts.
> 
> /home/sg/bin/sgw: line 4:  7550 Segmentation fault ${TCLSH:-"tclsh8.4"} 
> /opt/tclhttpd3.5.1/bin/httpd.tcl -debug 1
> 
> TIA
> 
> Stefan
> 


-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
0
Gerald.Lester (2014)
3/25/2008 5:22:50 PM
On Mar 25, 7:52 am, Stefan Finzel <Stefan.G.R.Fin...@T-Online.de>
wrote:
> Hi!
>
> I am trying to use web services with authorization using wsdl on
> tclhttpd 3.5.1, ActiveTcl8.4.18, WS::Server/Utils/Client 1.0.8. tls
> 1.50, tdom 0.8.2, SuSE Linux 10.0.
>
> Are there any known issues using WSDL and authorization?
>
> Server side is exactly the example inhttp://members.cox.net/~gerald.lester/WebServices/Tcl%20Web%20Service...
>
> As client side is using authorization http headers are appended to
> client commands. Reading the definitions of the offered services is fine.
>
>    ::WS::Client::GetAndParseWsdl\
>      http://localhost:8015/service/wsExamples/wsdl\
>     {"Authorization" "Basic ZmlzOnNVc2VANi40"}
>
> but executing
>
>    set results [::WS::Client::DoCall wsExamples SimpleEcho {TestString
> {This is a test}} {"Authorization" "Basic ZmlzOnNVc2VANi40"}}
>
> returns
>
> Unexpected EOF received from Server
>
> and the tclhttpd process aborts.
>
> /home/sg/bin/sgw: line 4:  7550 Segmentation fault
> ${TCLSH:-"tclsh8.4"} /opt/tclhttpd3.5.1/bin/httpd.tcl -debug 1


Whoa, a client request causes the server to seg fault? Not good.

My opinion is that tclhttpd is a disaster, and it is too bad that the
WS package relies on it. But this is a side issue. One thing that I
have noticed is that the WS package relies heavily on tDOM. This is a
C 'extension'. It is possible that something which doesn't exist is
referenced, or something is deleted twice. Chances are it has nothing
to do with the authorization, but who knows. Why use basic auth? First
see if it works without. Simplify the situation by removing basic
auth.

0
tom.rmadilo (754)
3/26/2008 4:37:29 AM
Stefan Finzel wrote:

<snip>

> 
> As client side is using authorization http headers are appended to
> client commands. Reading the definitions of the offered services is fine.
> 

<snip>

> 
> and the tclhttpd process aborts.
> 
> /home/sg/bin/sgw: line 4:  7550 Segmentation fault ${TCLSH:-"tclsh8.4"}
> /opt/tclhttpd3.5.1/bin/httpd.tcl -debug 1
> 

I managed to make a tclhttpd process segfault by passing malformed
headers in the client request. In that particular case, tclhttpd didn't
handle the headers appropriately, but of course that's not an excuse for
segfaulting.

I reported that issue to c.l.t. on 4-Feb-2008 with a back trace
provided. You might want to see whether the back traces are similar.

Greetings,

Erik
-- 
  leunissen@       nl | Merge the left part of these two lines into one,
e.          hccnet.   | respecting a character's position in a line.
0
look7 (425)
3/26/2008 7:21:00 AM
tom.rmadilo wrote:

> 
> Whoa, a client request causes the server to seg fault? Not good.
> 
> My opinion is that tclhttpd is a disaster,

However, it can't be blamed for the segfault since tclhttpd itself is
Tcl only.


 and it is too bad that the
> WS package relies on it. But this is a side issue. One thing that I
> have noticed is that the WS package relies heavily on tDOM. This is a
> C 'extension'. It is possible that something which doesn't exist is
> referenced, or something is deleted twice. Chances are it has nothing
> to do with the authorization, but who knows. Why use basic auth? First
> see if it works without. Simplify the situation by removing basic
> auth.
> 


-- 
  leunissen@       nl | Merge the left part of these two lines into one,
e.          hccnet.   | respecting a character's position in a line.
0
look7 (425)
3/26/2008 7:33:35 AM
Just to create some more confusion:

The call for offered services also uses basic authorization and never 
causes segmentation faults.

I also tested tcl8.4.17 on a 64 bit SuSE Linux 9.3 and there are no 
segmentation faults.

But both tcl8.4.17/18 on a 32 bit SuSE Linux 10.0 crash tclhttpd.

My tclhttpd and applications have been running with authorization on 
several productive servers for more than 5 years without any problems on 
SunOS and Linux both with 32 and 64 bit so far.

Maybe i am in trouble due to an operating system issue.



Stefan Finzel schrieb:
> Hi!
> 
> I am trying to use web services with authorization using wsdl on 
> tclhttpd 3.5.1, ActiveTcl8.4.18, WS::Server/Utils/Client 1.0.8. tls 
> 1.50, tdom 0.8.2, SuSE Linux 10.0.
> 
> Are there any known issues using WSDL and authorization?
> 
> Server side is exactly the example in 
> http://members.cox.net/~gerald.lester/WebServices/Tcl%20Web%20Service%20Example.html 
> 
> 
> As client side is using authorization http headers are appended to 
> client commands. Reading the definitions of the offered services is fine.
> 
>   ::WS::Client::GetAndParseWsdl\
>     http://localhost:8015/service/wsExamples/wsdl\
>    {"Authorization" "Basic ZmlzOnNVc2VANi40"}
> 
> but executing
> 
>   set results [::WS::Client::DoCall wsExamples SimpleEcho {TestString 
> {This is a test}} {"Authorization" "Basic ZmlzOnNVc2VANi40"}}
> 
> returns
> 
> Unexpected EOF received from Server
> 
> and the tclhttpd process aborts.
> 
> /home/sg/bin/sgw: line 4:  7550 Segmentation fault ${TCLSH:-"tclsh8.4"} 
> /opt/tclhttpd3.5.1/bin/httpd.tcl -debug 1
> 
> TIA
> 
> Stefan
> 
0
3/26/2008 9:16:04 AM
Stefan Finzel wrote:
> Hi!
> 
> I am trying to use web services with authorization using wsdl on 
> tclhttpd 3.5.1, ActiveTcl8.4.18, WS::Server/Utils/Client 1.0.8. tls 
> 1.50, tdom 0.8.2, SuSE Linux 10.0.
....

The best thing to do would be to try and get a C-level stack trace using 
a debugger. I'm not sure if ActiveTcl comes with a symbols-enabled build 
though. Of the extensions you list, my prime suspect would be tls. 
Generally speaking Tcl is very stable, so I'd be surprised if it was a 
pure Tcl script causing the crash. tdom is also pretty stable in my 
experience: I don't believe I've ever had it crash on me. Are you using 
tls at all in this crash scenario (i.e. https)?

-- Neil
0
nem3909 (1000)
3/26/2008 1:30:53 PM
tom.rmadilo wrote:
> On Mar 25, 7:52 am, Stefan Finzel <Stefan.G.R.Fin...@T-Online.de>
> wrote:
>...
> My opinion is that tclhttpd is a disaster, and it is too bad that the
> WS package relies on it.  

Tom,

I plan to have it play standalone and with WUB when I get the time (I don't 
make use of that much of tclhttpd), but if someone wants to take a crack at 
it first, that would be great (drop me a short email about it since I have 
some ideas).

I'd ***love*** if you would help to get it to working with AOLserver!

-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
0
Gerald.Lester (2014)
3/26/2008 1:42:16 PM
I got it working at least using ActiveTcl8.4.17.0.283511 on my 64 bit 
SuSE Linux 9.3 box by replacing the single line 731 in Utilities.tcl 
proc ::WS::Utils::convertTypeToDict

   if {$childName in $matchList} {

with

   if {0 <= [lsearch -exact $matchList $childName]} {




Stefan Finzel schrieb:
> Just to create some more confusion:
> 
> The call for offered services also uses basic authorization and never 
> causes segmentation faults.
> 
> I also tested tcl8.4.17 on a 64 bit SuSE Linux 9.3 and there are no 
> segmentation faults.
> 
> But both tcl8.4.17/18 on a 32 bit SuSE Linux 10.0 crash tclhttpd.
> 
> My tclhttpd and applications have been running with authorization on 
> several productive servers for more than 5 years without any problems on 
> SunOS and Linux both with 32 and 64 bit so far.
> 
> Maybe i am in trouble due to an operating system issue.
> 
0
3/26/2008 2:36:17 PM
Stefan Finzel wrote:
> I got it working at least using ActiveTcl8.4.17.0.283511 on my 64 bit 
> SuSE Linux 9.3 box by replacing the single line 731 in Utilities.tcl 
> proc ::WS::Utils::convertTypeToDict
> 
>   if {$childName in $matchList} {
> 
> with
> 
>   if {0 <= [lsearch -exact $matchList $childName]} {

Stefan,

Go immediately to tcl.sf.net and file a bug report with as much detail as 
possible.

Also see if the following little program blows up on you:

set matchList [list a b c d]
set childNmae a
if {$childName in $matchList} {
     puts {It is in!}
} else {
     puts {It is not in!}
}

-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
0
Gerald.Lester (2014)
3/26/2008 3:24:02 PM
ActiveTcl, SuSE Linux Tcl and self compiled Tcl 8.4.x complain

syntax error in expression "$childName in $matchList": extra tokens at 
end of expression

as the 'in' operator semes to be available for tcl 8.5 only. I thougth 
it was already available in a late 8.4 version, but i am wrong.


Gerald W. Lester schrieb:
> Stefan Finzel wrote:
>> I got it working at least using ActiveTcl8.4.17.0.283511 on my 64 bit 
>> SuSE Linux 9.3 box by replacing the single line 731 in Utilities.tcl 
>> proc ::WS::Utils::convertTypeToDict
>>
>>   if {$childName in $matchList} {
>>
>> with
>>
>>   if {0 <= [lsearch -exact $matchList $childName]} {
> 
> Stefan,
> 
> Go immediately to tcl.sf.net and file a bug report with as much detail 
> as possible.
> 
> Also see if the following little program blows up on you:
> 
> set matchList [list a b c d]
> set childNmae a
> if {$childName in $matchList} {
>     puts {It is in!}
> } else {
>     puts {It is not in!}
> }
> 
0
3/26/2008 3:35:36 PM
Looks like a NULL pointer in tdom.
Is there a way to get some more information using gdb?

gdb /opt/ActiveTcl-8.4.18/bin/tclsh 5138

....
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0xb78fa6a4 in XML_ParseBuffer () from 
/opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so
#2  0xb78fa63d in XML_Parse () from 
/opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so
#3  0xb7888bd6 in domReadDocument () from 
/opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so
#4  0xbfeaa61c in ?? ()
#5  0x00000000 in ?? ()

strace -p 5138

....
[b7f13410] gettimeofday({1206543058, 685861}, {4294967236, 0}) = 0
[b7f13410] time(NULL)                   = 1206543058
[b7f13410] brk(0x8558000)               = 0x8558000
[b7f13410] gettimeofday({1206543058, 752029}, {4294967236, 0}) = 0
[b7f13410] gettimeofday({1206543058, 752071}, {4294967236, 0}) = 0
[b7f13410] gettimeofday({1206543058, 752355}, {4294967236, 0}) = 0
[b7f13410] gettimeofday({1206543058, 752396}, {4294967236, 0}) = 0
[b7f13410] gettimeofday({1206543058, 752458}, {4294967236, 0}) = 0
[b7f13410] gettimeofday({1206543058, 752489}, {4294967236, 0}) = 0
[b7f13410] select(5, [0 3 4], [], [], {0, 0}) = 0 (Timeout)
[b7f13410] gettimeofday({1206543058, 752559}, {4294967236, 0}) = 0
[b7f13410] gettimeofday({1206543058, 752585}, {4294967236, 0}) = 0
[b7f13410] gettimeofday({1206543058, 752612}, {4294967236, 0}) = 0
[b7f13410] gettimeofday({1206543058, 752637}, {4294967236, 0}) = 0
[b7f13410] gettimeofday({1206543058, 752958}, {4294967236, 0}) = 0
[b7f13410] gettimeofday({1206543058, 752986}, {4294967236, 0}) = 0
[b7f13410] mmap2(NULL, 1925189632, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x44bcb000
[00000000] --- SIGSEGV (Segmentation fault) @ 0 (0) ---



Neil Madden schrieb:
> Stefan Finzel wrote:
>> Hi!
>>
>> I am trying to use web services with authorization using wsdl on 
>> tclhttpd 3.5.1, ActiveTcl8.4.18, WS::Server/Utils/Client 1.0.8. tls 
>> 1.50, tdom 0.8.2, SuSE Linux 10.0.
> ...
> 
> The best thing to do would be to try and get a C-level stack trace using 
> a debugger. I'm not sure if ActiveTcl comes with a symbols-enabled build 
> though. Of the extensions you list, my prime suspect would be tls. 
> Generally speaking Tcl is very stable, so I'd be surprised if it was a 
> pure Tcl script causing the crash. tdom is also pretty stable in my 
> experience: I don't believe I've ever had it crash on me. Are you using 
> tls at all in this crash scenario (i.e. https)?
> 
> -- Neil
0
3/26/2008 3:37:20 PM
* Stefan Finzel <Stefan.G.R.Finzel@T-Online.de>
| Looks like a NULL pointer in tdom.
--<snip-snip>--
| [b7f13410] mmap2(NULL, 1925189632, PROT_READ|PROT_WRITE,
| MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x44bcb000
| [00000000] --- SIGSEGV (Segmentation fault) @ 0 (0) ---

The first arg being NULL is ok in mmap().  The second argument
1925189632 however is probably nonsense, it gives the desired mapping
length and looks suspiciously like an uninit value to me.

Note that mmap() succeeds (returning a valid pointer), but if you
actually try to use that much memory (1.8GB), it might not be
possible...

Can you run it under valgrind?

R'
0
ralfixx (1283)
3/26/2008 4:03:32 PM
valgrind /opt/ActiveTcl-8.4.18/bin/tclsh8.4 
/opt/tclhttpd3.5.1/bin/httpd.tcl -debug 1


==7267== Invalid write of size 4
==7267==    at 0x55DE43D: XML_SetParamEntityParsing (in 
/opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
==7267==    by 0x580E971: domReadDocument (in 
/opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
==7267==  Address 0x474C9D4 is not stack'd, malloc'd or (recently) free'd
==7267==
==7267== Invalid write of size 1
==7267==    at 0x4024720: memmove (in 
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==7267==    by 0x55DE76A: XML_GetBuffer (in 
/opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
==7267==    by 0x55DE613: XML_Parse (in 
/opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
==7267==    by 0x580EBD5: domReadDocument (in 
/opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
==7267==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==7267==
==7267== Process terminating with default action of signal 11 (SIGSEGV)
==7267==  Access not within mapped region at address 0x0
==7267==    at 0x4024720: memmove (in 
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==7267==    by 0x55DE76A: XML_GetBuffer (in 
/opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
==7267==    by 0x55DE613: XML_Parse (in 
/opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
==7267==    by 0x580EBD5: domReadDocument (in 
/opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
==7267==
==7267== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 109 from 2)
==7267== malloc/free: in use at exit: 4,837,951 bytes in 51,907 blocks.
==7267== malloc/free: 353,882 allocs, 301,975 frees, 37,261,788 bytes 
allocated.
==7267== For counts of detected errors, rerun with: -v
==7267== searching for pointers to 51,907 not-freed blocks.
==7267== checked 4,430,740 bytes.
==7267==
==7267== LEAK SUMMARY:
==7267==    definitely lost: 1,024 bytes in 1 blocks.
==7267==      possibly lost: 0 bytes in 0 blocks.
==7267==    still reachable: 4,836,927 bytes in 51,906 blocks.
==7267==         suppressed: 0 bytes in 0 blocks.
==7267== Rerun with --leak-check=full to see details of leaked memory.
Segmentation fault


Ralf Fassel schrieb:
> * Stefan Finzel <Stefan.G.R.Finzel@T-Online.de>
> | Looks like a NULL pointer in tdom.
> --<snip-snip>--
> | [b7f13410] mmap2(NULL, 1925189632, PROT_READ|PROT_WRITE,
> | MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x44bcb000
> | [00000000] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> 
> The first arg being NULL is ok in mmap().  The second argument
> 1925189632 however is probably nonsense, it gives the desired mapping
> length and looks suspiciously like an uninit value to me.
> 
> Note that mmap() succeeds (returning a valid pointer), but if you
> actually try to use that much memory (1.8GB), it might not be
> possible...
> 
> Can you run it under valgrind?
> 
> R'
0
3/26/2008 4:49:22 PM
valgrind --leak-check=full /opt/ActiveTcl-8.4.18/bin/tclsh8.4 
/opt/tclhttpd3.5.1/bin/httpd.tcl -debug 1

==7314== Invalid write of size 4
==7314==    at 0x55DE43D: XML_SetParamEntityParsing (in 
/opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
==7314==    by 0x580E971: domReadDocument (in 
/opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
==7314==  Address 0x4411CFC is not stack'd, malloc'd or (recently) free'd
==7314==
==7314== Invalid write of size 1
==7314==    at 0x4024720: memmove (in 
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==7314==    by 0x55DE76A: XML_GetBuffer (in 
/opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
==7314==    by 0x55DE613: XML_Parse (in 
/opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
==7314==    by 0x580EBD5: domReadDocument (in 
/opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
==7314==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==7314==
==7314== Process terminating with default action of signal 11 (SIGSEGV)
==7314==  Access not within mapped region at address 0x0
==7314==    at 0x4024720: memmove (in 
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==7314==    by 0x55DE76A: XML_GetBuffer (in 
/opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
==7314==    by 0x55DE613: XML_Parse (in 
/opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
==7314==    by 0x580EBD5: domReadDocument (in 
/opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
==7314==
==7314== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 109 from 2)
==7314== malloc/free: in use at exit: 4,837,951 bytes in 51,907 blocks.
==7314== malloc/free: 353,852 allocs, 301,945 frees, 37,260,974 bytes 
allocated.
==7314== For counts of detected errors, rerun with: -v
==7314== searching for pointers to 51,907 not-freed blocks.
==7314== checked 4,430,740 bytes.
==7314==
==7314==
==7314== 1,024 bytes in 1 blocks are definitely lost in loss record 24 of 31
==7314==    at 0x40235B5: malloc (in 
/usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
==7314==    by 0x57FF853: parserCreate (in 
/opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
==7314==
==7314== LEAK SUMMARY:
==7314==    definitely lost: 1,024 bytes in 1 blocks.
==7314==      possibly lost: 0 bytes in 0 blocks.
==7314==    still reachable: 4,836,927 bytes in 51,906 blocks.
==7314==         suppressed: 0 bytes in 0 blocks.
==7314== Reachable blocks (those to which a pointer was found) are not 
shown.
==7314== To see them, rerun with: --leak-check=full --show-reachable=yes
Segmentation fault


Stefan Finzel schrieb:
> valgrind /opt/ActiveTcl-8.4.18/bin/tclsh8.4 
> /opt/tclhttpd3.5.1/bin/httpd.tcl -debug 1
> 
> 
> ==7267== Invalid write of size 4
> ==7267==    at 0x55DE43D: XML_SetParamEntityParsing (in 
> /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
> ==7267==    by 0x580E971: domReadDocument (in 
> /opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
> ==7267==  Address 0x474C9D4 is not stack'd, malloc'd or (recently) free'd
> ==7267==
> ==7267== Invalid write of size 1
> ==7267==    at 0x4024720: memmove (in 
> /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
> ==7267==    by 0x55DE76A: XML_GetBuffer (in 
> /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
> ==7267==    by 0x55DE613: XML_Parse (in 
> /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
> ==7267==    by 0x580EBD5: domReadDocument (in 
> /opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
> ==7267==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
> ==7267==
> ==7267== Process terminating with default action of signal 11 (SIGSEGV)
> ==7267==  Access not within mapped region at address 0x0
> ==7267==    at 0x4024720: memmove (in 
> /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
> ==7267==    by 0x55DE76A: XML_GetBuffer (in 
> /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
> ==7267==    by 0x55DE613: XML_Parse (in 
> /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
> ==7267==    by 0x580EBD5: domReadDocument (in 
> /opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
> ==7267==
> ==7267== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 109 from 2)
> ==7267== malloc/free: in use at exit: 4,837,951 bytes in 51,907 blocks.
> ==7267== malloc/free: 353,882 allocs, 301,975 frees, 37,261,788 bytes 
> allocated.
> ==7267== For counts of detected errors, rerun with: -v
> ==7267== searching for pointers to 51,907 not-freed blocks.
> ==7267== checked 4,430,740 bytes.
> ==7267==
> ==7267== LEAK SUMMARY:
> ==7267==    definitely lost: 1,024 bytes in 1 blocks.
> ==7267==      possibly lost: 0 bytes in 0 blocks.
> ==7267==    still reachable: 4,836,927 bytes in 51,906 blocks.
> ==7267==         suppressed: 0 bytes in 0 blocks.
> ==7267== Rerun with --leak-check=full to see details of leaked memory.
> Segmentation fault
> 
> 
> Ralf Fassel schrieb:
>> * Stefan Finzel <Stefan.G.R.Finzel@T-Online.de>
>> | Looks like a NULL pointer in tdom.
>> --<snip-snip>--
>> | [b7f13410] mmap2(NULL, 1925189632, PROT_READ|PROT_WRITE,
>> | MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x44bcb000
>> | [00000000] --- SIGSEGV (Segmentation fault) @ 0 (0) ---
>>
>> The first arg being NULL is ok in mmap().  The second argument
>> 1925189632 however is probably nonsense, it gives the desired mapping
>> length and looks suspiciously like an uninit value to me.
>>
>> Note that mmap() succeeds (returning a valid pointer), but if you
>> actually try to use that much memory (1.8GB), it might not be
>> possible...
>>
>> Can you run it under valgrind?
>>
>> R'
0
3/26/2008 4:59:13 PM
* Stefan Finzel <Stefan.G.R.Finzel@T-Online.de>
| valgrind --leak-check=full /opt/ActiveTcl-8.4.18/bin/tclsh8.4
| /opt/tclhttpd3.5.1/bin/httpd.tcl -debug 1
--<snip-snip>--
| ==7314== Invalid write of size 1
| ==7314==    at 0x4024720: memmove (in
| /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
| ==7314==    by 0x55DE76A: XML_GetBuffer (in
| /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
| ==7314==    by 0x55DE613: XML_Parse (in
| /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
| ==7314==    by 0x580EBD5: domReadDocument (in
| /opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
| ==7314==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
| ==7314==
| ==7314== Process terminating with default action of signal 11 (SIGSEGV)
| ==7314==  Access not within mapped region at address 0x0
| ==7314==    at 0x4024720: memmove (in
| /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
| ==7314==    by 0x55DE76A: XML_GetBuffer (in
| /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
| ==7314==    by 0x55DE613: XML_Parse (in
| /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
| ==7314==    by 0x580EBD5: domReadDocument (in
| /opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)

Well, sounds like it is passing a 0-pointer as destination to
memmove()...

Next steps would be to get the code for libtdom and/or libTclexpat,
recompile with debug-info, repeat, find the cause for the 0-pointer,
and send in a patch ;-)

R'
0
ralfixx (1283)
3/26/2008 5:31:02 PM
> | ==7314== Process terminating with default action of signal 11 (SIGSEGV)
> | ==7314==  Access not within mapped region at address 0x0
> | ==7314==    at 0x4024720: memmove (in
> | /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
> | ==7314==    by 0x55DE76A: XML_GetBuffer (in
> | /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
> | ==7314==    by 0x55DE613: XML_Parse (in
> | /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
> | ==7314==    by 0x580EBD5: domReadDocument (in
> | /opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
>
> Well, sounds like it is passing a 0-pointer as destination to
> memmove()...
>
> Next steps would be to get the code for libtdom and/or libTclexpat,
> recompile with debug-info, repeat, find the cause for the 0-pointer,
> and send in a patch ;-)

This sounds really weird..., tdom should not use libtclexpat, (unless
something changed in how AS builds their distro). tdom builds in expat
lib statically, and libtclexpat does too.., (tclexpat should be from
the tclxml package). There was some discussion about problems this
might cause between Jeff Hobbs and Rolf Ade IIRC, but not sure about
the details.

Try getting libtclexpat out of the picture...

Michael




0
schlenk (1615)
3/26/2008 5:41:07 PM
On Mar 26, 6:42 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
> tom.rmadilo wrote:
> > On Mar 25, 7:52 am, Stefan Finzel <Stefan.G.R.Fin...@T-Online.de>
> > wrote:
> >...
> > My opinion is that tclhttpd is a disaster, and it is too bad that the
> > WS package relies on it.
>
> Tom,
>
> I plan to have it play standalone and with WUB when I get the time (I don't
> make use of that much of tclhttpd), but if someone wants to take a crack at
> it first, that would be great (drop me a short email about it since I have
> some ideas).
>
> I'd ***love*** if you would help to get it to working with AOLserver!

The first step in that direction is to remove any channel code,
otherwise you will probably have trouble reusing your code for
different I/O situations.

I was unable to get tWSDL/TWiST working with tclhttpd  because it does
something with the Tcl event loop, and the code gets stuck in fcopy.
The exact same code does work (doesn't get stuck) with Tcl sockets,
simple std* channels, Tcl Threads and with AOLserver. So the key is to
reformulate the basic application as a single threaded model, then
wrap it with whatever is necessary.

I also have a pure Tcl replacement for the AOLserver API (server
layer), at least enough to serve web services and tcl pages.

Anyway, I'll re-look at the WS::Server code once again.
0
tom.rmadilo (754)
3/26/2008 7:33:25 PM
tom.rmadilo wrote:
> On Mar 26, 6:42 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
>> tom.rmadilo wrote:
>>> On Mar 25, 7:52 am, Stefan Finzel <Stefan.G.R.Fin...@T-Online.de>
>>> wrote:
>>> ...
>>> My opinion is that tclhttpd is a disaster, and it is too bad that the
>>> WS package relies on it.
>> Tom,
>>
>> I plan to have it play standalone and with WUB when I get the time (I don't
>> make use of that much of tclhttpd), but if someone wants to take a crack at
>> it first, that would be great (drop me a short email about it since I have
>> some ideas).
>>
>> I'd ***love*** if you would help to get it to working with AOLserver!
> 
> The first step in that direction is to remove any channel code,
> otherwise you will probably have trouble reusing your code for
> different I/O situations.
> 
> I was unable to get tWSDL/TWiST working with tclhttpd  because it does
> something with the Tcl event loop, and the code gets stuck in fcopy.
> The exact same code does work (doesn't get stuck) with Tcl sockets,
> simple std* channels, Tcl Threads and with AOLserver. So the key is to
> reformulate the basic application as a single threaded model, then
> wrap it with whatever is necessary.
> 
> I also have a pure Tcl replacement for the AOLserver API (server
> layer), at least enough to serve web services and tcl pages.
> 
> Anyway, I'll re-look at the WS::Server code once again.

Tom,

I use ::Url_PrefixInstall to install the URLs that my service applies to.

I use ::Httpd_ReturnData to return the data.

I do not do anything with the event loop.

It should be straight forward to the package embeddable with its own little 
"server".  I'm not experienced enough with Wub or AOLserver to replace those 
two calls.

-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
0
Gerald.Lester (2014)
3/26/2008 8:51:01 PM
On Mar 26, 1:51 pm, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
> tom.rmadilo wrote:
> > On Mar 26, 6:42 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
> >> tom.rmadilo wrote:
> >>> On Mar 25, 7:52 am, Stefan Finzel <Stefan.G.R.Fin...@T-Online.de>
> >>> wrote:
> >>> ...
> >>> My opinion is that tclhttpd is a disaster, and it is too bad that the
> >>> WS package relies on it.
> >> Tom,
>
> >> I plan to have it play standalone and with WUB when I get the time (I don't
> >> make use of that much of tclhttpd), but if someone wants to take a crack at
> >> it first, that would be great (drop me a short email about it since I have
> >> some ideas).
>
> >> I'd ***love*** if you would help to get it to working with AOLserver!
>
> > The first step in that direction is to remove any channel code,
> > otherwise you will probably have trouble reusing your code for
> > different I/O situations.
>
> > I was unable to get tWSDL/TWiST working with tclhttpd  because it does
> > something with the Tcl event loop, and the code gets stuck in fcopy.
> > The exact same code does work (doesn't get stuck) with Tcl sockets,
> > simple std* channels, Tcl Threads and with AOLserver. So the key is to
> > reformulate the basic application as a single threaded model, then
> > wrap it with whatever is necessary.
>
> > I also have a pure Tcl replacement for the AOLserver API (server
> > layer), at least enough to serve web services and tcl pages.
>
> > Anyway, I'll re-look at the WS::Server code once again.
>
> Tom,
>
> I use ::Url_PrefixInstall to install the URLs that my service applies to.
>
> I use ::Httpd_ReturnData to return the data.
>
> I do not do anything with the event loop.
>
> It should be straight forward to the package embeddable with its own little
> "server".  I'm not experienced enough with Wub or AOLserver to replace those
> two calls.

Right, so for instance the below proc uses ::Httpd_ReturnData:

proc ::WS::Server::callOperation {service sock args} {...}


My thought is that the callOperation would change so that it doesn't
handle the sock, but probably the caller, or higher level wrapper, of
this proc would do that.
0
tom.rmadilo (754)
3/26/2008 9:18:02 PM
On Mar 26, 2:33 pm, "tom.rmadilo" <tom.rmad...@gmail.com> wrote:
> On Mar 26, 6:42 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
>
> > tom.rmadilo wrote:

> I also have a pure Tcl replacement for the AOLserver API (server
> layer), at least enough to serve web services and tcl pages.

How does this Tcl replacement for the AOLserver API compare
with nstcl (http://sourceforge.net/projects/nstcl/) and nstclhttpd
(http://sourceforge.net/projects/nstclhttpd/)?

escargo
0
escargo (54)
3/27/2008 12:38:52 PM
tom.rmadilo wrote:
 > On Mar 26, 1:51 pm, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
 >> I use ::Url_PrefixInstall to install the URLs that my service applies to.
 >>
 >> I use ::Httpd_ReturnData to return the data.
 >>
 >> I do not do anything with the event loop.
 >>
 >> It should be straight forward to the package embeddable with its own little
 >> "server".  I'm not experienced enough with Wub or AOLserver to replace those
 >> two calls.
 >
 > Right, so for instance the below proc uses ::Httpd_ReturnData:
 >
 > proc ::WS::Server::callOperation {service sock args} {...}
 >
 >
 > My thought is that the callOperation would change so that it doesn't
 > handle the sock, but probably the caller, or higher level wrapper, of
 > this proc would do that.

That would be fine, the only thing that any of the routines use the socket 
for is to pass it to ::Httpd_ReturnData.

The other option would be to have the caller pass in a dummy socket and have 
a ::Httpd_ReturnData stub that stores the results which the caller then 
accesses and does what it has to with.

-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
0
Gerald.Lester (2014)
3/27/2008 2:08:34 PM
On Mar 27, 5:38 am, escargo <esca...@skypoint.com> wrote:
> > > tom.rmadilo wrote:
> > I also have a pure Tcl replacement for the AOLserver API (server
> > layer), at least enough to serve web services and tcl pages.
>
> How does this Tcl replacement for the AOLserver API compare
> with nstcl (http://sourceforge.net/projects/nstcl/) and nstclhttpd
> (http://sourceforge.net/projects/nstclhttpd/)?

First, note that I said "at least enough to serve web services and tcl
pages". AOLserver does much more than that, but web services are
pretty thin on requirements compared to a generic web server.

Also note that I am not interested in replacing AOLserver, the
replacement layer allows me to use some other I/O model to handle web
services (including a unix pipeline). Since my tWSDL/TWiST application
is not deeply invested in the AOLserver API, it was relatively easy to
create a replacement layer. tWSDL/TWiST was developed for AOLserver,
but the same code and configuration files work with many different I/O
models.
0
tom.rmadilo (754)
3/28/2008 1:57:50 AM
I stopped investigating this problem further. I've more than 20 tclhttpd 
server running on SunOS and Linux boxes with different operating system 
versions. But there is only one box actually causing segmentation fault 
problems. It's my athlon box using SuSE Linux 10.x used only for 
software development.

schlenk schrieb:
>> | ==7314== Process terminating with default action of signal 11 (SIGSEGV)
>> | ==7314==  Access not within mapped region at address 0x0
>> | ==7314==    at 0x4024720: memmove (in
>> | /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
>> | ==7314==    by 0x55DE76A: XML_GetBuffer (in
>> | /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
>> | ==7314==    by 0x55DE613: XML_Parse (in
>> | /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
>> | ==7314==    by 0x580EBD5: domReadDocument (in
>> | /opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
>>
>> Well, sounds like it is passing a 0-pointer as destination to
>> memmove()...
>>
>> Next steps would be to get the code for libtdom and/or libTclexpat,
>> recompile with debug-info, repeat, find the cause for the 0-pointer,
>> and send in a patch ;-)
> 
> This sounds really weird..., tdom should not use libtclexpat, (unless
> something changed in how AS builds their distro). tdom builds in expat
> lib statically, and libtclexpat does too.., (tclexpat should be from
> the tclxml package). There was some discussion about problems this
> might cause between Jeff Hobbs and Rolf Ade IIRC, but not sure about
> the details.
> 
> Try getting libtclexpat out of the picture...
> 
> Michael
> 
> 
> 
> 
0
3/29/2008 7:08:45 AM
In article <b2e0ac27-21e9-47e7-abdd-1a7df0d6b901@d4g2000prg.googlegroups.com>,
schlenk  <schlenk@uni-oldenburg.de> wrote:
>
>> | ==7314== Process terminating with default action of signal 11 (SIGSEGV)
>> | ==7314==  Access not within mapped region at address 0x0
>> | ==7314==    at 0x4024720: memmove (in
>> | /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
>> | ==7314==    by 0x55DE76A: XML_GetBuffer (in
>> | /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
>> | ==7314==    by 0x55DE613: XML_Parse (in
>> | /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
>> | ==7314==    by 0x580EBD5: domReadDocument (in
>> | /opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
>>
>> Well, sounds like it is passing a 0-pointer as destination to
>> memmove()...
>>
>> Next steps would be to get the code for libtdom and/or libTclexpat,
>> recompile with debug-info, repeat, find the cause for the 0-pointer,
>> and send in a patch ;-)
>
>This sounds really weird..., tdom should not use libtclexpat, (unless
>something changed in how AS builds their distro). tdom builds in expat
>lib statically, and libtclexpat does too.., (tclexpat should be from
>the tclxml package). There was some discussion about problems this
>might cause between Jeff Hobbs and Rolf Ade IIRC, but not sure about
>the details.
>
>Try getting libtclexpat out of the picture...

Michael is definitely right. tdom (at least with an unhacked build
system) does not use libtclexpat, but links expat statically. 

But yes, there seem to be some difficult to solve problems (even the
gurus hadn't an adivce, so far), if you do both [package require tdom]
and [package require tclxml].

rolf
0
pointsman (41)
3/29/2008 1:28:11 PM
tom.rmadilo schrieb:

> My opinion is that tclhttpd is a disaster

What about Tclhttpd is a disaster?
I find it very pleasant and enjoyable to develop web applications on it, 
compared to AOLserver...

Eckhard
0
3/29/2008 11:33:03 PM
Both packages SOAP and WSDL are planned to be avaiable on my tclhttpd 
servers. But using both of them seems to be not possible.

But is it a restriction to be bound to one of them?


The segmentation fault while executing some WSDL commands happened due 
to SOAP using Tclexpat. A forgotten link to a source file using

   package require SOAP::Domain 1.4
   SOAP::export ...

loaded the package before package WSDL. I do not know why/how basic 
authorization blew up the problem after all.


schlenk schrieb:
>> | ==7314== Process terminating with default action of signal 11 (SIGSEGV)
>> | ==7314==  Access not within mapped region at address 0x0
>> | ==7314==    at 0x4024720: memmove (in
>> | /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
>> | ==7314==    by 0x55DE76A: XML_GetBuffer (in
>> | /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
>> | ==7314==    by 0x55DE613: XML_Parse (in
>> | /opt/ActiveTcl-8.4.18/lib/Tclexpat2.6/libTclexpat2.6.so)
>> | ==7314==    by 0x580EBD5: domReadDocument (in
>> | /opt/ActiveTcl-8.4.18/lib/tdom0.8.2/libtdom0.8.2.so)
>>
>> Well, sounds like it is passing a 0-pointer as destination to
>> memmove()...
>>
>> Next steps would be to get the code for libtdom and/or libTclexpat,
>> recompile with debug-info, repeat, find the cause for the 0-pointer,
>> and send in a patch ;-)
> 
> This sounds really weird..., tdom should not use libtclexpat, (unless
> something changed in how AS builds their distro). tdom builds in expat
> lib statically, and libtclexpat does too.., (tclexpat should be from
> the tclxml package). There was some discussion about problems this
> might cause between Jeff Hobbs and Rolf Ade IIRC, but not sure about
> the details.
> 
> Try getting libtclexpat out of the picture...
> 
> Michael
> 
> 
> 
> 
0
3/31/2008 7:51:53 AM
On Mar 29, 4:33 pm, EL <eckhardnos...@gmx.de> wrote:
> tom.rmadilo schrieb:
>
> > My opinion is that tclhttpd is a disaster
>
> What about Tclhttpd is a disaster?
> I find it very pleasant and enjoyable to develop web applications on it,
> compared to AOLserver...

Well, you started another thread "why...."?

Application servers are very hard to write. If you don't write them
correctly, you get questions like yours.

Tclhttpd is first of all: slow. But unfortunately, you have to write
code which is tied to the server. I think that it is best to write
most code in a server independent environment, and then link it to the
I/O model. It is slightly easier to do this with AOLserver, but you
can't guarantee it in either case. But, since AOLserver doesn't use
the event loop, it is easier to write code without regard to I/O.



0
tom.rmadilo (754)
4/1/2008 12:28:45 AM
On Mar 31, 8:28 pm, "tom.rmadilo" <tom.rmad...@gmail.com> wrote:

I must add that I too find it a pleasant environment to write web
applications.  Very easy too.



> Tclhttpd is first of all: slow. But unfortunately, you have to write
> code which is tied to the server. I think that it is best to write
> most code in a server independent environment, and then link it to the

In terms of speed, no user has complained yet.  Indeed, it seems to be
faster than some alternative technologies.


The code we write for web development is independent of the web model,
apart from the html generation parts.  As a matter of fact., a large
part of the code is reused in a desktop environment.





0
newtophp2000 (175)
4/1/2008 1:41:14 PM
On Mar 27, 8:57 pm, "tom.rmadilo" <tom.rmad...@gmail.com> wrote:
> On Mar 27, 5:38 am, escargo <esca...@skypoint.com> wrote:
>
> > > > tom.rmadilo wrote:
> > > I also have a pure Tcl replacement for the AOLserver API (server
> > > layer), at least enough to serve web services and tcl pages.
>
> > How does this Tcl replacement for the AOLserver API compare
> > with nstcl (http://sourceforge.net/projects/nstcl/) and nstclhttpd
> > (http://sourceforge.net/projects/nstclhttpd/)?
>
> First, note that I said "at least enough to serve web services and tcl
> pages". AOLserver does much more than that, but web services are
> pretty thin on requirements compared to a generic web server.
>
> Also note that I am not interested in replacing AOLserver, the
> replacement layer allows me to use some other I/O model to handle web
> services (including a unix pipeline). Since my tWSDL/TWiST application
> is not deeply invested in the AOLserver API, it was relatively easy to
> create a replacement layer. tWSDL/TWiST was developed for AOLserver,
> but the same code and configuration files work with many different I/O
> models.

OK. That means that you are minimizing what you are doing, and not
providing any comparison between what you provide and what the
other packages provide. Somebody else will have to do the comparison
then.

escargo
0
escargo (54)
4/1/2008 3:04:35 PM
newtophp2000@yahoo.com wrote:
> On Mar 31, 8:28 pm, "tom.rmadilo" <tom.rmad...@gmail.com> wrote:
> 
> I must add that I too find it a pleasant environment to write web
> applications.  Very easy too.
> 
> 
> 
>> Tclhttpd is first of all: slow. But unfortunately, you have to write
>> code which is tied to the server. I think that it is best to write
>> most code in a server independent environment, and then link it to the
> 
> In terms of speed, no user has complained yet.  Indeed, it seems to be
> faster than some alternative technologies.

TclHttpd was measured as faster than Apache and most (if not all) of the 
Java Servers by Brent Welch when he as at Sun.  Doing the same set of 
measurements it came out slower than AOLserver.  His report was that it was 
not hard to measure it as faster than Apache, but you needed really hot disk 
and networks to see that it was slower than AOLserver.

It is also reported that WUB is faster than TclHttpd -- but it is also a bit 
of a different beast (as I understand it WUB is a framework for creating 
"web" applications, not an out of the box web server like TclHttpd -- Colin 
please correct me if I misspoke).

Thus of the "full" web servers, TclHttpd is normally considered one of the 
faster -- it is just that Tom is looking at it from the perspective of the 
"fastest" server and sees it as slow.  Of course on the flip side, IMHO 
TclHttpd is an easier server to get started working with -- but then again I 
may be biased since I've got copyright notices inside of it.

P.S. -- I'm looking forward to working with WUB sometime in the future.


-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
0
Gerald.Lester (2014)
4/1/2008 3:37:33 PM
On Apr 1, 8:37 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:

> Thus of the "full" web servers, TclHttpd is normally considered one of the
> faster -- it is just that Tom is looking at it from the perspective of the
> "fastest" server and sees it as slow.  Of course on the flip side, IMHO
> TclHttpd is an easier server to get started working with -- but then again I
> may be biased since I've got copyright notices inside of it.

Also: speed isn't everything. I would never suggest not using tclhttpd
if it works good enough for what you need. It is also Tcl only, which
is a big plus.

That is the reason I looked at trying to run my web services software
from tclhttpd, but for whatever reason it didn't work when [fcopy] was
used to write the POSTed XML document to disk. In the process of
debugging this issue, I was still able to serve the info pages for the
web services. But what I noticed was that tclhttpd was very slow at
serving this dynamically generated documentation. (I was doing load
testing).

So the issue (for me) wasn't that it was slower than AOLserver, the
problem was that it was slower (much much slower) than my Tcl only
replacement for AOLserver:

tclhttpd/GET documentation: 40-50/sec

This performance is to serve the generated documentation, for example:

http://junom.com/ws/stockquoter2/

POSTing a SOAP request and returning the result I got these numbers:
  tcpserver     50/sec (one process per request)
  socket       100/sec (without Tcl Threads)
  thread       160-195/sec (10 warmed up Tcl Threads)
  aolserver    300-350/sec (10 threads)

The ranges for thread/aolserver models are due to the number of
simultaneous requests, and/or slightly different config optimizations,
so the high numbers are the most representative of the relative I/O
(and http layer) performance differences.

Something is not working well in either the tclhttpd I/O or http layer
(the part that reads the request, headers, POSTed data, query, etc.)
So my criticism is based only on this puzzling performance issue, and
the problem with using [fcopy].
0
tom.rmadilo (754)
4/1/2008 7:50:49 PM
tom.rmadilo wrote:
> On Apr 1, 8:37 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
> ...
> 
> That is the reason I looked at trying to run my web services software
> from tclhttpd, but for whatever reason it didn't work when [fcopy] was
> used to write the POSTed XML document to disk.

Tom, the TclHttpd "way" of doing it is not to write to the disk at all but 
rather to build the document in memory and return it via ::Httpd_ReturnData.

My guess is that since you were doing load testing, your code got called 
while in the middle of the write and a global/namespace variable got zapped.

>...
> 
> tclhttpd/GET documentation: 40-50/sec

On my testing of the web server stuff I was able to get close to 
100/sec/thread (please do not compare my numbers to Tom's as we were running 
on different hardware with different networks).  I also noticed that having 
more than 3 threads per cpu did not help.

> 
> This performance is to serve the generated documentation, for example:
> 
> http://junom.com/ws/stockquoter2/
> 
> POSTing a SOAP request and returning the result I got these numbers:
>   tcpserver     50/sec (one process per request)
>   socket       100/sec (without Tcl Threads)
>   thread       160-195/sec (10 warmed up Tcl Threads)
>   aolserver    300-350/sec (10 threads)

I expect, but have not tested the WS::Standalone based server code that I 
sent you should be faster than the TclHttpd one.  I'd love to have some 
feedback if you could run it on the same hardware/network that you did your 
testing on to see how it stacks up.

Later,

-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
0
Gerald.Lester (2014)
4/1/2008 8:56:14 PM
On Apr 1, 1:56 pm, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
> tom.rmadilo wrote:
> > On Apr 1, 8:37 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
> > ...
>
> > That is the reason I looked at trying to run my web services software
> > from tclhttpd, but for whatever reason it didn't work when [fcopy] was
> > used to write the POSTed XML document to disk.
>
> Tom, the TclHttpd "way" of doing it is not to write to the disk at all but
> rather to build the document in memory and return it via ::Httpd_ReturnData.

My performance test was done with a GET (of documentation), so there
was no writing the XML document to disk. Also, the return document is
never written to disk. I never was able to run a POST, because my code
used [fcopy], which didn't work.


> My guess is that since you were doing load testing, your code got called
> while in the middle of the write and a global/namespace variable got zapped.

Well, the POST never worked even with a single request, I ran ab with
concurrency 1 and total requests 1.

>
> > tclhttpd/GET documentation: 40-50/sec
>
> On my testing of the web server stuff I was able to get close to
> 100/sec/thread (please do not compare my numbers to Tom's as we were running
> on different hardware with different networks).  I also noticed that having
> more than 3 threads per cpu did not help.

Right, only relative performance is useful in the numbers I presented.
I wasn't using Tcl Threads with tclhttpd, just a basic setup. I assume
this is more or less equivalent to my 'socket' setup, which ran at 100/
sec. This is what I was expecting to get, or something close to it.

> I expect, but have not tested the WS::Standalone based server code that I
> sent you should be faster than the TclHttpd one.  I'd love to have some
> feedback if you could run it on the same hardware/network that you did your
> testing on to see how it stacks up.

Hmmm, when did you send me WS::Standalone? I would love to test this
out.

BTW, I can pull in the svn code from google, is this still the best
place to get updates?

Thanks,

Tom
0
tom.rmadilo (754)
4/1/2008 9:54:59 PM
tom.rmadilo wrote:
> On Apr 1, 1:56 pm, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
>> tom.rmadilo wrote:
>>> On Apr 1, 8:37 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
>>> ...
>>...
>> I expect, but have not tested the WS::Standalone based server code that I
>> sent you should be faster than the TclHttpd one.  I'd love to have some
>> feedback if you could run it on the same hardware/network that you did your
>> testing on to see how it stacks up.
> 
> Hmmm, when did you send me WS::Standalone? I would love to test this
> out.

About two weeks ago, I'll resend.  If you do not get it today -- email me 
directly.

> BTW, I can pull in the svn code from google, is this still the best
> place to get updates?

Ah, I have work on my machine which I've not test or documented enough to 
commit there.


-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
0
Gerald.Lester (2014)
4/2/2008 1:03:47 PM
tom.rmadilo wrote:
> On Apr 1, 1:56 pm, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
>> tom.rmadilo wrote:
>>> On Apr 1, 8:37 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
>>> ...
>>> That is the reason I looked at trying to run my web services software
>>> from tclhttpd, but for whatever reason it didn't work when [fcopy] was
>>> used to write the POSTed XML document to disk.
>> Tom, the TclHttpd "way" of doing it is not to write to the disk at all but
>> rather to build the document in memory and return it via ::Httpd_ReturnData.
> 
> My performance test was done with a GET (of documentation), so there
> was no writing the XML document to disk. Also, the return document is
> never written to disk. I never was able to run a POST, because my code
> used [fcopy], which didn't work.
[...]

When you say [fcopy] didn't work, what exactly was the error? I know 
that there has been some recent effort to fix a bug with async fcopy and 
the -size option. I've used [fcopy] many times, both synchronous and 
async and never experienced a problem, but then I've also avoided using 
the -size option so far. Could you post some example code of what you 
were trying to do and how it failed? A basic:

     fcopy $sock $file

should work fine, as should an async:

     fcopy -command cleanup $sock $file

-- Neil
0
nem3909 (1000)
4/2/2008 1:07:09 PM
On Apr 2, 6:07 am, Neil Madden <n...@cs.nott.ac.uk> wrote:
> tom.rmadilo wrote:
> > My performance test was done with a GET (of documentation), so there
> > was no writing the XML document to disk. Also, the return document is
> > never written to disk. I never was able to run a POST, because my code
> > used [fcopy], which didn't work.

> When you say [fcopy] didn't work, what exactly was the error? I know
> that there has been some recent effort to fix a bug with async fcopy and
> the -size option. I've used [fcopy] many times, both synchronous and
> async and never experienced a problem, but then I've also avoided using
> the -size option so far. Could you post some example code of what you
> were trying to do and how it failed? A basic:

Neil,

I did more research on this issue and I think I have resolved it. I
have a Tcl only AOLserver replacement layer, it works great for simple
tcl pages, but would be unsuitable as a generic web server
replacement. Anyway, AOLserver does not handle the POSTed data
automatically (this obviously helps if you have a huge file to upload,
it can go straight to disk).

My mistake was thinking that I had to do the same thing in tclhttpd.
In fact, all this POSTed data gets put into a global variable. So, my
[fcopy] was sitting around waiting for more bytes to read on the input
channel, which had already been drained.

Here is my startup.tcl file, the change I made was to replace the
'accept' proc which handles the interface between AOLserver and the
web service code:

# For using tWSDL/TWiST with tclhttpd

namespace eval ::twist {

    variable pageroot
    variable initialized 0
    variable home
    variable startFile [info script]
}

proc ::twist::workingDirectory { } {

    return [pwd]
}

proc ::twist::getStartFile { } {

    variable startFile

    return $startFile
}

proc ::twist::receive {
    sock
    url
} {

    fconfigure $sock -translation binary
    set in $sock
    set out $sock
    set sockList [list $in $out]

    upvar #0 Httpd$sock HTTPDATA

    if {![::ns_conn start $sockList]} {
	return -code error "::ns::conn::receive: Sock error in startup"
    }

    ::ns::conn::request $HTTPDATA(line)

    ::ns::conn::listToSet $HTTPDATA(headerlist) $::ns::conn::headers
    ::ns::conn::host

    # Assume success
    set status 200

    set targetFile [ns_url2file [ns_conn url]]

    # Either file exists or is directory with index.tcl
    # If not, return file not found.
    if {![file exists $targetFile]} {

	set status 404

    } elseif {[file isdirectory $targetFile]} {

	set targetFile [file join $targetFile index.tcl]

	if {![file exists $targetFile]} {
	    set status 404
	}
    }

    if {"$status" ne "200"} {
	ns_return $status text/plain "Issues $status"
	return -code return
    }

    # File exists
    source $targetFile


}

Stderr "Sourced twist file startup.tcl"

set twsdlHome [file normalize [file join [file dirname [info script]]
twsdl]]

source [file join $twsdlHome init.tcl]

# Replacment proc for tclhttpd
proc ::wsdl::server::accept { why } {

    log Notice "Accepting Connection with $why"

    foreach {server service port binding address} $why {break}

    # 0. Get POSTed Data:
    set headerSet [ns_conn headers]
    set length [ns_set iget $headerSet "Content-length"]
    set tmpFile [ns_tmpnam]
    log Notice "Using tmpFile = $tmpFile"
    set fp [ns_openexcl $tmpFile]
    fconfigure $fp -translation binary

    # Changes for tclhttpd:
    set sockin $::ns::conn::sockin

    upvar #0 Httpd$sockin HTTPDATA

    set inXML $HTTPDATA(query)

    puts $fp $inXML

    # Finish changes for tclhttpd
    close $fp

    # 0.1 Package File and Headers:
    set headerLength [ns_set size $headerSet]

    for {set i 0} {$i < $headerLength} {incr i} {
	lappend headers [ns_set key $headerSet $i] [ns_set value $headerSet
$i]
    }

    set requestID [::request::new $headers $tmpFile $why]

    # 2. Let Binding handle the request
    set responseList [[set ::wsdb::bindings::$
{binding}::handleRequest] $requestID]

    ns_return [lindex $responseList 0] [lindex $responseList 1]
[lindex $responseList 3]
}

::ns::info::setOption home $twsdlHome
::ns::info::setOption pageroot [file join $twsdlHome packages wsapi]

::Url_PrefixInstall /twist ::twist::receive

# End startup.tcl

After these changes I reran the apache bench to post the SOAP request.
Performance appears to be 70-90/sec, which is what I was expecting to
see.

Now if I can just figure out how to use threads in tclhttpd. How is
thread code initialized for a particular custom service?
0
tom.rmadilo (754)
4/2/2008 7:22:53 PM
tom.rmadilo wrote:
>...
> 
> Now if I can just figure out how to use threads in tclhttpd. How is
> thread code initialized for a particular custom service?

On the command line you specify how many threads to use.  The thread 
specific initialization goes in httpdthread.tcl.  It is fairly well commented.

Do not hesitate to yell if you need more directions.

Also -- did you get the standalone code?

-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
0
Gerald.Lester (2014)
4/2/2008 7:53:46 PM
tom.rmadilo schrieb:

> Application servers are very hard to write. If you don't write them
> correctly, you get questions like yours.

Maybe, but maybe the author of this code has just not thought that 
somebody wants to use it for sending more than status 200 or 302? And 
maybe the way I changed the code in Direct_Url just works fine and 
resolves the issue?

> Tclhttpd is first of all: slow. 

Might be for you, following the thread further on. But I find it *very* 
fast... at least for my playground applications.
However, it would be interresting to know how it performs under 
pressure, e.g. how it handles a hundret requests at the same time. Is 
there some data or experiences? Also it would be interresting to hear 
about security issues...


> But unfortunately, you have to write
> code which is tied to the server. 

That's true, yes. And I would like to have a layer like that of Tclhttpd 
..tml templates and procedure handlers in AOLserver or Apache.
I like this way of mixing Tcl code into HTML a lot, it's so more natural 
than <% %> or <? ?>.


Eckhard
0
4/2/2008 9:48:18 PM
On Apr 2, 2:48 pm, EL <eckhardnos...@gmx.de> wrote:
> tom.rmadilo schrieb:
>
> > Application servers are very hard to write. If you don't write them
> > correctly, you get questions like yours.
>
> Maybe, but maybe the author of this code has just not thought that
> somebody wants to use it for sending more than status 200 or 302? And
> maybe the way I changed the code in Direct_Url just works fine and
> resolves the issue?
>
> > Tclhttpd is first of all: slow.
>
> Might be for you, following the thread further on. But I find it *very*
> fast... at least for my playground applications.
> However, it would be interresting to know how it performs under
> pressure, e.g. how it handles a hundret requests at the same time. Is
> there some data or experiences? Also it would be interresting to hear
> about security issues...
>
> > But unfortunately, you have to write
> > code which is tied to the server.
>
> That's true, yes. And I would like to have a layer like that of Tclhttpd
> .tml templates and procedure handlers in AOLserver or Apache.
> I like this way of mixing Tcl code into HTML a lot, it's so more natural
> than <% %> or <? ?>.
>
> Eckhard

EL,

Please note that I have always said that if it works, and you are
happy, that is perfect, I can't argue with success and happiness.

Also, note that I have corrected my statements about speed, please
read my most recent post. Tclhttpd appears to be only a little slower
than the tcl socket model (one thread), very much within what I was
expecting.

Finally note that Apache is much worse than tclhttpd from an API
standpoint. AOLserver is just a little better than tclhttpd.

If you really like mixing Tcl code and html, maybe check out my tic-
tac-toe templating system:

http://junom.com/document/twt/view/www/

This templating system works with just tclsh.

0
tom.rmadilo (754)
4/2/2008 10:27:51 PM
On Apr 2, 12:53 pm, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
> tom.rmadilo wrote:
> >...
>
> > Now if I can just figure out how to use threads in tclhttpd. How is
> > thread code initialized for a particular custom service?
>
> On the command line you specify how many threads to use.  The thread
> specific initialization goes in httpdthread.tcl.  It is fairly well commented.

> Do not hesitate to yell if you need more directions.

Thanks, if this comes up, I will start a new thread.

> Also -- did you get the standalone code?

Yes, and I'll start a new thread on this as well. I'm getting way OT.
0
tom.rmadilo (754)
4/2/2008 10:34:39 PM
Reply:

Similar Artilces:

tcl-gaul: Genetic Algorithms for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-gaul Tcl-gaul is a Tcl extension for genetic/evolutionary algorithm processing.It relies on the GAUL library: http://gaul.sourceforge.net/ * A genetic algorithm (GA) is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. They are a particular class of evolutionary algorithms that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover. For an introduction to genetic algorithms visit: http://gaul.sourceforge.net/intro.html Platform: Linux (GAUL library dependency) Home page: http://sourceforge.net/projects/tcl-gaul/ Man page: http://tcl-gaul.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

tcl-pam: PAM authentication for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-pam Tcl-pam is a Tcl interface to the PAM* service of Linux. It provides a Tcl package that allows Tcl scripts to use PAM to authenticate users and programs. It relies on linux-pam library: http://www.kernel.org/pub/linux/libs/pam/ * PAM (Pluggable Authentication Modules): A mechanism to integrate multiple low−level authentication schemes into a high−level application programming interface (API). This enables programs that rely on authentication to be written independently of the underlying authentication scheme. Platform: Linux Home page: http://sourceforge.net/projects/tcl-pam/ Man page: http://tcl-pam.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

tcl-mq: POSIX Message Queues for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-mp Tcl-mp is a Tcl interface to POSIX Message Queues*. It provides a Tcl package that allows scripts to create/open/close/unlink multiple parallel message queues, and to send/receive messages synchronously and asynchronously to/from them. * A POSIX message queue is an Inter-Process Communication mechanism available on Linux and some other POSIX-compliant operating systems. It allows to or more processes (or threads) to communicate under the same OS. The messages are buffered by the kernel, which gives them kernel persistency. A message queue can be thought of as a linked list of messages. Threads with adequate permission can put messages onto the queue, and threads with adequuate permission can remove messages from the queue. Each message is assigned a priority by the sender, and the oldest message of highest priority is always retrieved first. Unlike PIPES and FIFOS, no requirement exists that someone be waiting for a message to arrive on a queue, before some process writes a message to that queue. It's not even a requirement for both processes to exist at the same time. Read mq_overview(7) for more details Platform: Linux Home page: http://sourceforge.net/projects/tcl-mp/ Man page: http://tcl-mp.sourceforge.net/ Author: Alexandros Stergiakis alsterg On Sep 3, 11:37=A0am, Alexandros Stergiakis <alst...@gmail.com> wrote: > This is an announcement for a relatively new Tcl pro...

tcl-syslog: Unix system logging for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-syslog Tcl-syslog is a Tcl interface to the *nix syslog service. It provides a Tcl package that allows Tcl scripts to log messages to syslog. Platform: Linux/Unix Home page: http://sourceforge.net/projects/tcl-syslog/ Man page: http://tcl-syslog.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

tcl-mmap: A POSIX mmap interface for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-mmap Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides a Tcl package that allows Tcl scripts to: 1) Memory map files for improved access efficiency; 2) Share memory between related processes; 3) Easily implement cyclic persistent log files. * See the mmap(2) man page. Platform: Linux/Unix Home page: http://sourceforge.net/projects/tcl-mmap/ Man page: http://tcl-mmap.sourceforge.net/ Author: Alexandros Stergiakis On Sep 3, 11:48=A0am, Alexandros Stergiakis <alst...@gmail.com> wrote: > This is an announcement for a relatively new Tcl project: tcl-mmap > > Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides > a Tcl package that allows Tcl scripts to: 1) Memory map files for > improved access efficiency; 2) Share memory between related processes; > 3) Easily implement cyclic persistent log files. > > * See the mmap(2) man page. > Great to see this and the other packages you made. Looking at the manpage it looks a bit misformatted before the usage example. Any specific reason to use GPL for this instead the usual Tcl/MIT/BSD style license used? Michael schlenk wrote: > On Sep 3, 11:48 am, Alexandros Stergiakis <alst...@gmail.com> wrote: >> This is an announcement for a relatively new Tcl project: tcl-mmap >> >> Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides >> a Tcl package that...

tcl-snmptools: SNMP v1/v2/v3 operations for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-snmptools Tcl-snmptools is a Tcl interface to the Net-SNMP library which provides operations for the management of remote SNMP agents. It supports all the standard SNMP v1/v2/v3 operations: connect, close, get, set, getnext, walk, bulkget, bulkwalk, trap, translate and others. It is currently in a functional state, but more work and testing needs to be done. Home page: http://sourceforge.net/projects/tcl-snmptols/ Man page: http://tcl-snmptols.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

Opening a TCL program from within another TCL program in ANSYS Tcl-Tk
Hi everyone, I have been pulling my hair with this one for a couple of days and still have not found a fix. I'm working within ANSYS Tcl-Tk implementation. I created a Tcl-Tk script that generates a simple window with three buttons. Each button opens another window which is created in a separate Tcl file. The second window have a lot of text entries, variables, procedures, etc. I can open the second Tcl file by itself and everything works as supposed, but when I open it using the button in the first window, it opens but any procedure called by the widgets on the second window are not found... Here's the deal... Since I'm working within the ANSYS implementation of Tcl-Tk, I'm actually using an ANSYS command to open the second window. The command I use is: ### ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ IBR_CAS.tcl' ### It actually sends a command back to ANSYS telling it to execute a Tcl command... I know this is not pretty but its the only way i was able to make it at least show the window. ############################## #Main Tcl (excerpt): ############################## namespace eval Tools { proc IBRCambpell {} { #source O:/mad_projects_2/ANSYS/Macros/IBR_CAS.tcl ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ IBR_CAS.tcl' } proc viewManager {} { ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ ViewManager.tcl' } proc powerAnnotation {} { ans_sendcommand ~eui,'source ...

Calling .Net Web Service Operations from Tcl Web Services 1.8 Client
If anyone has utilized the client portion of Gerald Lester's Tcl Web Services extension to call .Net web service operations and would be willing to post example code, it would be greatly appreciated. Thanks in advance. Here are specs for a service that I need to call: Web service URL: http://sample/url/WS/OrderTracking.Service.asmx Two web methods: public DHAddress GetOrderShippingAddress(long orderNumber) public bool SetTrackingNumber(long orderNumber, string trackingNumber) Order number to test is: 20071234567 Security is implemented using a SOAP header: OrderTracking_Service wse = new OrderTracking_Service(); AuthHeader auth = new AuthHeader(); auth.Username = "username"; auth.Password = "password"; wse.AuthHeaderValue = auth; ..... (make web method call here) Mark Case wrote: > If anyone has utilized the client portion of Gerald Lester's Tcl Web > Services extension to call .Net web service operations and would be willing > to post example code, it would be greatly appreciated. Thanks in advance. > > Here are specs for a service that I need to call: > > Web service URL: > http://sample/url/WS/OrderTracking.Service.asmx > > Two web methods: > > public DHAddress GetOrderShippingAddress(long orderNumber) > > public bool SetTrackingNumber(long orderNumber, string trackingNumber) > > Order number to test is: 20071234567 > > Security is implemented using a SOAP hea...

tcl application with tcl application
Here is another question, I have one tcl-based application A, my co- worker has a tcl-based application B. Now I want to integrate my application A into the application B. After integration, I want to be able to run A's tcl command in B. Assume I can only change A's code, is there any way to do this? On 17 Dez., 07:03, teacupfull business <teacupfull.busin...@gmail.com> wrote: > Here is another question, I have one tcl-based application A, my co- > worker has a tcl-based application B. Now I want to integrate my > application A into the application B. >...

How Tcl speaks for itself and how Tcl is not spoken for...
Hello It's Friday and... well... Two things about Tcl going through my mind this week, a nice anecdote and a eyebrow-rising thing on Wikipedia: Anecdote: Until three months ago I worked in a scientific institue where I wrote much software in Tcl, especially a big Build and Report System, some tools for automatic checking of coding style and other things. Tcl had a bad reputation there (not because of me... they dropped Tcl before I started there in favour of Joy, then JavaScript and now Python) and besides me, there was only one co-worker who appearantly writes some small Tcl-Scripts to support other researchers in their work. To get completely rid of Tcl, they even started to reimplement all things, I wrote in Tcl in Python just to have it in a language, that most of them know (which is a good decision on the one hand, but on the other hand, I think, it would be better to simply learn Tcl ;-), which made me a little bit sad. Now there is a new collegue who has to maintain some of the things I wrote. Comming from Perl he wasn't exactly enthusiastic when he heard, that he must maintain my old code in such an obscure language.. Two weeks ago, I got mail from him. He's just studying a complex system of scripts that are used for a sandboxed build system for source code which comes from external untrusted source and must be compiled and tested. Of course it's written in Tcl (and some bash-Scripting). He told me, that although he has never looked at Tcl before,...

TCL web server running TCL Server pages (.tsp)
I have been using TCL server pages (running on tclhttpd) for over 10 years= for various things like database front-ends, Server side Windows managemen= t(tcl/vbscript(WMI) and Access), and recently a client side Smartphone port= al(tcl/javascript). I am curious if others are using TCL Server pages and f= or what purpose? For intranet usage I recently used tclhttpd to provide vnc (tightvnc &fvwm) sessions to legacy X11 applications, database interfaces, Excel/csv files and PDF documents on request. http://bu4.taipudex.com/pinyin.htm is a dictionary trial By the way http://w3tech...

How to compile tcl or encrypt tcl
I use TclPro1.5 to compile my tcl script with tixwish in the Solaris before. But I cannot use the same method in Linux. Why? Is there any utility for me to compile or encrypt the code by using tixwish? The following is the simple code if I use the tixwish: #!/home/albertl/local/bin/tixwish puts "haha" And after using procomp by the TclPro1.5 Error in startup script: The TclPro ByteCode Loader is not available or does not support the correct version while executing "error "The TclPro ByteCode Loader is not available or does not support the correct version"" invoked from within "if {[catch {package require tbcload 1.3} err] == 1} { error "The TclPro ByteCode Loader is not available or does not support the correct version" ...." (file "a.tbc" line 4) The problem seems that tbcload1.3 cannot be found? But tbcload is already there "/home/albertl/local/lib/tbcload1.3" Why? Can anyone tell me? stratus schrieb: > I use TclPro1.5 to compile my tcl script with tixwish in the Solaris before. > But I cannot use the same method in Linux. Why? > > Is there any utility for me to compile or encrypt the code by using tixwish? > Tixwish is just a wish shell with the Tix package baked in. If TclPro does not have a specific bigwish with Tix included your out of luck on that road (but could build your own if you liked). You might have success with freewrap or TDK, don't know for su...

Calling .Net Web Service Operations from Tcl Web Services 1.8 Client - Follow-up
This is a follow-up reply to a thread started on Nov. 22 with a subject of Calling .Net Web Service Operations from Tcl Web Services 1.8 Client. That thread has fallen way down on the discussion list. In response to a couple of replys from Gerald Lester and Tom J: Thanks for the prompt reply - especially since it was on Thanksgiving Day. Any recommendations you can make with this additional info will be greatly appreciated. +-- When I try it, using the sample you supplied, I get this result: invoked from within "parseResults $serviceName $operationName $body" invoked from within "::WS::Client::DoCall OrderTracking_Service GetOrderAddress $GetOrderAddressRequest $auth " invoked from within "set DHAddress [ ::WS::Client::DoCall OrderTracking_Service GetOrderAddress $GetOrderAddressRequest $auth ]" (file "test1.tcl" line 28) +-- Obviously, I'm doing something incorrectly. I've supplied the code and WSDL in hopes you can spot my problem. Here's the code: package require WS::Client package require dict ::WS::Client::GetAndParseWsdl http://sample/url/WS/OrderTracking.Service.asmx?WSDL dict set GetOrderAddressRequest orderNumber 20071234567 dict set auth Username username dict set auth Password password set DHAddress [ ::WS::Client::DoCall OrderTracking_Service GetOrderAddress $GetOrderAddressRequest $auth ] puts $DHAddress +-- WSDL: <?xml version="1.0" encoding="utf-8" ?> - ...

Extending TCL in C with tcl.h - Disabliing [<tcl-cmd>] feature
Hi, TCL has a command execution syntax like this: [<tcl cmd>] Anything inside the 3rd bracket will be executed as a Tcl command by the Tcl interprater. Is there any way I can disable/delete this Tcl construct [ <tcl-cmd>]? In other words, my Tcl interprator should print "[32]" for tcl command puts "[32]" It should not try to treat [] as a special character. Is this any way possible while extending Tcl in C with tcl.h? Thank you, Arijit * arijit79@gmail.com | puts "[32]" | | It should not try to treat [] as a special character. Check out the TCL quoting rules. http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M10 http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M15 Any of puts {[32]} puts "\[32\]" will do the trick. R' On May 8, 3:14 am, ariji...@gmail.com wrote: > Is there any way I can disable/delete this Tcl construct [ <tcl-cmd>]? By doing this, you would disable the primary functionality of Tcl. I'm certain you could go into the tcl source and stop it - but why not talk about what you are really trying to do. Perhaps someone can give you a better way of doing what you are wanting to do. ...

web services with tcl
I see rivet and websh how are they different? gavino schrieb: > I see rivet and websh > > how are they different? > Websh is a bit more of a framework, it does more things for you. Rivet is very similar to the PHP model. Michael gavino wrote: > I see rivet and websh > > how are they different? > Also see TclHttpd and AolServer -- +--------------------------------+---------------------------------------+ | Gerald W. Lester | |"The man who fights for his ideals is the man who is alive." - Cervante...

TCL
Hello, i would like to build TCL/TK as a separate DLL-Library. Can anyone tell me how this can be done with VC 6.0? Best regards, Reinhold "Reinhold.kwauka" <bernd-reinhold.kwauka@t-online.de> wrote: >Hello, > >i would like to build TCL/TK as a separate DLL-Library. Can anyone tell me >how this can be done >with VC 6.0? > >Best regards, >Reinhold > 1) get the source from http://tcl.sourceforge.net/ 2) open a command prompt 3) cd to the win/ subdirectory 4) call vcvars32.bat located in ??\vc98\bin\ of vc6 for wherever you installed it. 5) type @ the prompt: nmake -f makefile.vc -- David Gravereaux <davygrvy@pobox.com> [species: human; planet: earth,milkyway(western spiral arm),alpha sector] Reinhold.kwauka wrote: > Hello, > > i would like to build TCL/TK as a separate DLL-Library. Can anyone tell me > how this can be done > with VC 6.0? > > Best regards, > Reinhold > > Its already done. Just download a binary release for windows and check \Program Files\Tcl\lib for the DLLs and static libraries. ...

Tcl
Hello, where can I see for tcl syntacs and how-to run a tcl test? Thank You Vittore ___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: ptolemy-hackers-request@ptolemy.eecs.berkeley.edu ...

Tcl
Hello all. I found on hobbes the afaik latest Tcl for Os/2 v8.35 Is there any newer port, cause i try to update the eggdrop and that says: Your Tcl version is much too old for Eggdrop to use. You should download and compile a more recent version. The most reliable current version is 8.5.X and can be downloaded from ftp://tcl.activestate.com/pub/tcl/tcl8_5/. -- With the best regards from the Netherlands, Tu, "Tellerbop" <Tellerbop@wint.nl>, hai scritto questo in data Wed, 14 Jan 2009 19:11:18 UTC: > Hello all. > > I found on hobbes the afaik latest Tcl for Os/2...

mojolicious and realtime web, events getting thier do? does tcl do this ? when tcl be epoll based?
https://www.youtube.com/watch?v=HRWzhJDyHB8 ...

Does anyone have a Tcl Script which does a Multi Part File Upload to web site ( TCL CGI )
Hello all, I am after a Tcl script which I can use on my apache Linux server which a user can upload files or pictures to the site with ... Any help is appreciated, Thank you for the help, Sean - HeliHobby.com Sean wrote: > Hello all, > > I am after a Tcl script which I can use on my apache Linux server > which a user can upload files or pictures to the site with ... > > Any help is appreciated, > > Thank you for the help, > > Sean - HeliHobby.com I use ncgi for ths (from tcllib). It rocks! high quality code that never fails. For instance the file upload...

ANNOUNCE: Free Small TCL/Rivet and Tcl/tanzer Web Hosting Accounts available on my domain
Hi all. I have a Virtual Private Server (VPS) on superlinux.net. I have Rivet and tanzer installed on this server. the server is just one of those tiny servers (1 CPU core and 256MB RAM and 10GB Hardisk). If you want to make a website using Rivet or tanzer and get it hosted on my VPS, just email me your name and other full details to make you an SFTP account to upload your scripts on my domain. And you're welcome. ...

Tcl extension: check Tcl version?
Is there a recommended way to check if a (binary) Tcl extension is loaded to the same Tcl version that was used for linking the extension? Currently I'm encountering a problem with an extension that I have built (and linked) with libtk8.3.so and that can be loaded under wish8.5 as well (without re-bulding, using package require). A number of newly provided commands work well in spite of the version mixture, but others don't, and wish8.5 crashes when these commands are used. Is this behavior normal, i.e. should I check that compile-time version and run-time version are identical? Or does this indicate some subtle coding problem? Thanks for any suggestions Olaf Olaf Dietrich wrote: > Is there a recommended way to check if a (binary) Tcl extension > is loaded to the same Tcl version that was used for linking > the extension? > > Currently I'm encountering a problem with an extension that > I have built (and linked) with libtk8.3.so and that can be > loaded under wish8.5 as well (without re-bulding, using > package require). A number of newly provided commands work > well in spite of the version mixture, but others don't, and > wish8.5 crashes when these commands are used. > > Is this behavior normal, i.e. should I check that compile-time > version and run-time version are identical? Or does this > indicate some subtle coding problem? Not subtle. Major problem. DO NOT DO THAT. If you want to be loadable across mult...

MS Dictation and TCL
I'm trying to use the MS dictation tool while in TCL 8.5 program. The text starts to appear, but then the program crashes. It would be great to find a way to make this work. Thanks! Barney Tcl 8.5 (wish 8.5) makeindex (12/14/2007) MSWinXP sp3 plenty of ram and storage ...

Inline::Tcl vs. Inline::Tcl
The readme for CPAN's Inline::Tcl says this: > This module is not related to the Inline::Tcl module, but it might be > valuable to have some compatibility between the two. > This sentence seems to suggest that there is another module named Inline::Tcl somewhere. Is this true, and if so, where can I find it? Mumia W. wrote: > The readme for CPAN's Inline::Tcl says this: > > > This module is not related to the Inline::Tcl module, but it might be > > valuable to have some compatibility between the two. > > > > This sentence seems to suggest ...

Web resources about - Tcl Web Service with Authorization kills Tcl - comp.lang.tcl

National Defense Authorization Act for Fiscal Year 2014 - Wikipedia, the free encyclopedia
... E. Deutch (D, FL-21) on October 22, 2013 During the 113th United States Congress , four separate bills titled the "National Defense Authorization ...

Prize Promotion App Authorization Request - Facebook
Desktop-Hilfe Deutsch Prize Promotion App Authorization Request Please fill out the following to request permission to administer a promotion ...

Authorization Failed - LinkedIn
Sorry you are not authorized to perform this action. To find out more please contact LinkedIn customer service .

NDAA (National Defense Authorization Act)
Signed by Obama, December 31, 2011.

Secretary Kerry Testifies on the Authorization for the Use of Military Force against ISIL - YouTube
U.S. Secretary of State John Kerry testifies before the Senate Foreign Relations Committee on the Authorization for the Use of Military Force ...

Online security: your two-factor authorization checklist
Twitter reportedly is getting ready to roll out two-factor authentication in the coming weeksa development that comes not a moment too soon as ...

China firmly opposes US congress defense authorization bill
China firmly opposes US congress defense authorization bill People's Daily Online 23, ( People's Daily Online) China voiced firm opposition ...

President Obama Signs 2-Year Budget Deal and Defense Authorization Act
Politico President Obama Signs 2-Year Budget Deal and Defense Authorization Act In The Capital President Obama on Thursday signed the two-year ...

VMWARE, INC. : VMware Announces Authorization of Stock Repurchase Program
PALO ALTO, CA 11/29/12 VMware, Inc. , the global leader in virtualization and cloud infrastructure, today announced that its Board of Directors ...

Google Play Store gets major redesign, adds fingerprint authorization in Android 6.0
A short while ago, Google revealed a new redesign for its mobile Play Store which, among other changes, would separate apps and entertainment ...

Resources last updated: 3/13/2016 1:04:53 PM