Overview
| Artifact ID: | 716a449e166994fea3f7ef973c86b59ab8df9bbb |
|---|---|
| Ticket: | 617624ffffffffffffffffffffffffffffffffff
exit command hangs tcl8.4.0 |
| User & Date: | pedietz on 2002-10-02 16:12:50 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
We have a service written in TCL that performs HTTP geturl requests for backend clients.... After 10000 transactions, we have it restart -- to reset memory in case a huge web page was pulled. We are seeing our service hang on the 'exit' command in both TCL 8.4a3 and TCL8.4.0. Of note...the service uses the TLS package and runs on the AIX platform. On the hang, an SSL socket was open... The service performs HTTP requests via callbacks. It uses an timer callback for maintenance... And it reads messages from port 11555 by doing a [gets] in a while loop. Here's the code in the while loop: if { $total > 10000 } { if { $pending == 0 || $total > 15000 } { logit "SYSTEM||restarting due to MAX TRANSACTIONS $total p=$pending" exit } } Here's the log file: unix> tail log_39872.20020904 ... 152545|SYSTEM||restarting due to MAX TRANSACTIONS 10001 p=0 Notice the pid is 39872 and the time is 152545. At 16:02, the pid 39872 was still running: unix>ps -ef |grep httpserv root 39872 1 0 Sep 03 - 698:31 wictcl /wic/sys/httpserv/bin/httpserv.tcl Doing a low-level 'lsof' we see that nothing stuck in CLOSE_WAITs. unix>sudo lsof -p 39872 lsof: WARNING: compiled for AIX version 4.3.2.0; this is 4.3.3.0. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME wictcl 39872 root cwd VDIR 10,4 512 2 / (/dev/hd4) wictcl 39872 root 0u VCHR 2,2 0t0 4157 /dev/null wictcl 39872 root 1w VREG 10,10 0 17 /wic/log (/dev/wicloglv) wictcl 39872 root 2w VREG 10,10 0 17 /wic/log (/dev/wicloglv) wictcl 39872 root 3u IPv4 0x7052cadc 0t0 TCP localhost:38156->localhost:11555 (ESTABLISHED) wictcl 39872 root 4u unix 0x70373800 0t0 - >0x7038a600 wictcl 39872 root 5w VREG 10,10 1576780 14357 /wic/log (/dev/wicloglv) wictcl 39872 root 6u IPv4 0x70489adc 0t0 TCP iwww2:51407->198.178.10.180:443 (ESTABLISHED) Originally I thought this was a tcl8.4a3 issue, but we got it to happen on tcl8.4.0 when I was on vacation last week. To solve the exit problem, we replaced 'exit' with: catch {exec kill [pid]} after 5000 catch {exec kill -9 [pid]} We are moving this platform to Linux, so I will try it on TCL8.4.0 for linux in a few weeks. - foundin changed to: "obsolete: 8.4.0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "pedietz"
- subsystem changed to: "16. Commands A-H"
- title changed to: "exit command hangs tcl8.4.0"
- type changed to: "Bug"