Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

I surely do hope that's a syntax error. -- Larry Wall in <199710011752.KAA21624@wall.org>


devel / comp.lang.tcl / thread::release from worker thread

SubjectAuthor
* thread::release from worker threadOleg Nemanov
`* thread::release from worker threadHarald Oehlmann
 `* thread::release from worker threadOleg Nemanov
  `* thread::release from worker threadHarald Oehlmann
   `- thread::release from worker threadOleg Nemanov

1
thread::release from worker thread

<d390ab2f-3be8-4dfb-8fa4-2ae8ed258829n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=12597&group=comp.lang.tcl#12597

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:4709:b0:77f:3cbe:b08e with SMTP id bs9-20020a05620a470900b0077f3cbeb08emr216608qkb.4.1702910635991;
Mon, 18 Dec 2023 06:43:55 -0800 (PST)
X-Received: by 2002:a05:6214:e47:b0:67f:421a:3029 with SMTP id
o7-20020a0562140e4700b0067f421a3029mr20149qvc.4.1702910635642; Mon, 18 Dec
2023 06:43:55 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 18 Dec 2023 06:43:55 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=194.190.114.28; posting-account=RPJNegoAAAAUgD_yLdrci9D1ZtZ1oI0L
NNTP-Posting-Host: 194.190.114.28
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d390ab2f-3be8-4dfb-8fa4-2ae8ed258829n@googlegroups.com>
Subject: thread::release from worker thread
From: oleg.o.n...@gmail.com (Oleg Nemanov)
Injection-Date: Mon, 18 Dec 2023 14:43:55 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1814
 by: Oleg Nemanov - Mon, 18 Dec 2023 14:43 UTC

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?

Re: thread::release from worker thread

<ulps9i$3j3rt$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=12598&group=comp.lang.tcl#12598

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortka...@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: thread::release from worker thread
Date: Mon, 18 Dec 2023 17:33:54 +0100
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <ulps9i$3j3rt$1@dont-email.me>
References: <d390ab2f-3be8-4dfb-8fa4-2ae8ed258829n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 18 Dec 2023 16:33:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8ea2e1a3a9905b33e1af3b58a80aed4b";
logging-data="3772285"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lXVSSoEFpOTFCU3/dspUd"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Arj5oMbCus0km+ndySRz9mRCxq4=
In-Reply-To: <d390ab2f-3be8-4dfb-8fa4-2ae8ed258829n@googlegroups.com>
Content-Language: en-GB
 by: Harald Oehlmann - Mon, 18 Dec 2023 16:33 UTC

Am 18.12.2023 um 15:43 schrieb Oleg Nemanov:
> 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?

Oleg,
I suppose, you are facing a bug in Thread 1.6.6 ?
What is your Thread package, TCL, Platform ?

Take care,
Harald

Re: thread::release from worker thread

<bd6db5f9-f79f-4b3e-9e0b-d67cb2fc09f0n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=12599&group=comp.lang.tcl#12599

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:6214:5009:b0:67f:3def:c6ca with SMTP id jo9-20020a056214500900b0067f3defc6camr325047qvb.9.1702918283747;
Mon, 18 Dec 2023 08:51:23 -0800 (PST)
X-Received: by 2002:a05:622a:199a:b0:426:467:52eb with SMTP id
u26-20020a05622a199a00b00426046752ebmr562244qtc.12.1702918283545; Mon, 18 Dec
2023 08:51:23 -0800 (PST)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Mon, 18 Dec 2023 08:51:23 -0800 (PST)
In-Reply-To: <ulps9i$3j3rt$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=194.190.114.28; posting-account=RPJNegoAAAAUgD_yLdrci9D1ZtZ1oI0L
NNTP-Posting-Host: 194.190.114.28
References: <d390ab2f-3be8-4dfb-8fa4-2ae8ed258829n@googlegroups.com> <ulps9i$3j3rt$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bd6db5f9-f79f-4b3e-9e0b-d67cb2fc09f0n@googlegroups.com>
Subject: Re: thread::release from worker thread
From: oleg.o.n...@gmail.com (Oleg Nemanov)
Injection-Date: Mon, 18 Dec 2023 16:51:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Oleg Nemanov - Mon, 18 Dec 2023 16:51 UTC

понедельник, 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

Re: thread::release from worker thread

<ulpuee$3j3rt$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=12601&group=comp.lang.tcl#12601

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortka...@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: thread::release from worker thread
Date: Mon, 18 Dec 2023 18:10:38 +0100
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <ulpuee$3j3rt$2@dont-email.me>
References: <d390ab2f-3be8-4dfb-8fa4-2ae8ed258829n@googlegroups.com>
<ulps9i$3j3rt$1@dont-email.me>
<bd6db5f9-f79f-4b3e-9e0b-d67cb2fc09f0n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 18 Dec 2023 17:10:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8ea2e1a3a9905b33e1af3b58a80aed4b";
logging-data="3772285"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+eZr5yhfJACD2ydEw7YA3J"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:GUv3JrHRb0/Cd6DiVzmcxKZPbC0=
Content-Language: en-GB
In-Reply-To: <bd6db5f9-f79f-4b3e-9e0b-d67cb2fc09f0n@googlegroups.com>
 by: Harald Oehlmann - Mon, 18 Dec 2023 17:10 UTC

Am 18.12.2023 um 17:51 schrieb Oleg Nemanov:
> понедельник, 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
>

Reading again your message: I suppose, you may not do a "thread release"
in that thread. Or, at least, the result "thread died" is correct, it died.

Wizards will hopefully answer. I reacted to quick.

Sorry,
Harald

Re: thread::release from worker thread

<4ba4af76-30a9-41f9-9c01-03642e5a2fe8n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=12607&group=comp.lang.tcl#12607

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:1994:b0:77f:1a01:64ad with SMTP id bm20-20020a05620a199400b0077f1a0164admr46932qkb.4.1702980837603;
Tue, 19 Dec 2023 02:13:57 -0800 (PST)
X-Received: by 2002:a05:620a:1a8a:b0:77f:44df:abcf with SMTP id
bl10-20020a05620a1a8a00b0077f44dfabcfmr278015qkb.5.1702980837432; Tue, 19 Dec
2023 02:13:57 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Tue, 19 Dec 2023 02:13:57 -0800 (PST)
In-Reply-To: <ulpuee$3j3rt$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=194.190.114.28; posting-account=RPJNegoAAAAUgD_yLdrci9D1ZtZ1oI0L
NNTP-Posting-Host: 194.190.114.28
References: <d390ab2f-3be8-4dfb-8fa4-2ae8ed258829n@googlegroups.com>
<ulps9i$3j3rt$1@dont-email.me> <bd6db5f9-f79f-4b3e-9e0b-d67cb2fc09f0n@googlegroups.com>
<ulpuee$3j3rt$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4ba4af76-30a9-41f9-9c01-03642e5a2fe8n@googlegroups.com>
Subject: Re: thread::release from worker thread
From: oleg.o.n...@gmail.com (Oleg Nemanov)
Injection-Date: Tue, 19 Dec 2023 10:13:57 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 8
X-Received-Bytes: 1739
 by: Oleg Nemanov - Tue, 19 Dec 2023 10:13 UTC

понедельник, 18 декабря 2023 г. в 20:10:44 UTC+3, Harald Oehlmann:
> Reading again your message: I suppose, you may not do a "thread release"
> in that thread. Or, at least, the result "thread died" is correct, it died.

Thanks, Harald. I think so too :-).

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor