Hi guys,

Quick update: some progress.

I upgraded TCL to the latest 8.6.8 and recompiled Rivet 3.0.1, as well as
my shared library.

2 points:

1) Now the after {...} command works, only if I add a vwait forever in the
RivetChildInit script. Else the after is never triggered.

2) In my shared library C++ code that I load in the RivetChildInit and
which creates a ynet command, I am logging the address of
the pointer of the c++ session object created with a [ynet new] command.
When Apache starts, it spawns 5 children, and I see in the log of the c++
code called from the [ynet new]  command.
But here, strangely enough, the address of the session pointers are all
identical. This trigger crashes later in my code of course.
How is that possible? A system command new() can not return the same
address on the same host.
Am I missing something here?

Thank you.
Brice.


On Sat, Jun 9, 2018 at 2:33 PM, Brice Hamon <[email protected]> wrote:

> Hello Massimo.
>
> Ok thanks for the tip and I will try with a newer version of TCL.
>
> I am trying to load a shared library in the RiverchildInit which provides
> access to a messaging platform.
>
> This shared library written in C++ using the TCL C api works perfectly
> under a tclsh with a load command, but I am facing this first issue when
> loaded in Apache/Rivet.
>
> I managed to get it loaded and all the C++ threads are working correctly.
> Only the notification to TCL api callbacks were not triggered.
>
> I will report once I make the upgrade and recompile the TCL Api.
>
> Thank you,
> Brice.
>
>
> On Sat, Jun 9, 2018 at 10:03 AM, Massimo Manghi <[email protected]>
> wrote:
>
>> This looks loke the old problem with the event notifier that for some
>> versions of Tcl survive in the child process after a fork. I thought 8.6.1
>> was one of the working versions but actually that's a border version for
>> having this bug fixed. Since 5 years have passed I don't remember every
>> detail, but my memory was that this requirement was correct. Anyway can you
>> check if moving to a more recent version of Tcl changes the situation?
>>
>>  -- Massimo
>>
>> On 06/08/2018 08:24 PM, Brice Hamon wrote:
>>
>>> Hi guys,
>>>
>>> I was doing so testing with Rivet 3.0.1.
>>>
>>> I installed it on an opensuse 43.1 release
>>> 4.1.38-50-default #1 SMP PREEMPT Sun Feb 19 14:35:48 UTC 2017 (6b4d8cb)
>>> x86_64 x86_64 x86_64 GNU/Linux
>>>
>>> with no option when compiling rivet.
>>>
>>> I am using Apache2 Server version: Apache/2.4.16 (Linux/SUSE)
>>>
>>> Tcl 8.6.1
>>>
>>> All went well and I got tivet up and running.
>>>
>>> Now I have a question:
>>>
>>> Why in the RivetChildInit script each instances of apache starts, the
>>> command after or vwait forever do not work ?
>>>
>>> The command after hungs, and vwait forever is not understood.
>>>
>>> Am I missing something?
>>>
>>> Thank you.
>>> Brice.
>>>
>>>
>>
>

Reply via email to