Hi, all.
I have tcl app, that has 1 main thread and some worker threads. And sometimes (about 1 time of 10) tcl crash on exit with the next error:
target thread died
while executing
"thread::send [dict get $v worker_tid] deinit"
(procedure "devs_deinit" line 6)
invoked from within
"devs_deinit"
(procedure "conn_read" line 17)
invoked from within
"conn_read ::req-sock5560df97d0"
The exit procedure is the next:
- main thread get "quit" command from tcp management socket
- main thread do "thread::send WORKER_ID deinit" for each worker
- worker thread has "thread::release [thread::id]" as last action in deinit proc
When i move thread::release from worker thread deinit proc into main thread, then i got no errors. Is it wrong to call thread::release from worker thread like i did?
понедельник, 18 декабря 2023 г. в 19:33:59 UTC+3, Harald Oehlmann:
Oleg,
I suppose, you are facing a bug in Thread 1.6.6 ?
Hm. My Thread package version is 2.8.7.
What is your Thread package, TCL, Platform ?
% puts $tcl_version
8.6
% puts [array get tcl_platform ]
osVersion 4.19.85-v8+ pointerSize 8 byteOrder littleEndian threaded 1 machine aarch64 platform unix pathSeparator : os Linux engine Tcl user USER wordSize 8
% package require Thread
2.8.7
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 496 |
Nodes: | 16 (2 / 14) |
Uptime: | 56:10:01 |
Calls: | 9,760 |
Calls today: | 1 |
Files: | 13,742 |
Messages: | 6,185,212 |