Thread overview
Learning Vibe.d
May 23, 2020
Russel Winder
May 23, 2020
bauss
May 23, 2020
Russel Winder
May 23, 2020
bauss
May 24, 2020
Russel Winder
May 25, 2020
Daniel Kozak
May 23, 2020
Hi,

I thought I would try and do the async version of my mock AVR850 using the vibe.d TCP stuff. This is not HTTP, it is proper networking! ;-)

Problem one is that vibe.d sever processes never seem to terminate.

I am using runApplication or more likely runEventLoop in my main but it never returns. Starting the server from the command line, I Ctrl+C the process and get the message:

[main(----) INF] Received signal 2. Shutting down.

but whilst I get a command line prompt, the process is not terminated.

This is a bit of a blocker so help very much required.

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



May 23, 2020
On Saturday, 23 May 2020 at 15:47:59 UTC, Russel Winder wrote:
> Hi,
>
> I thought I would try and do the async version of my mock AVR850 using the vibe.d TCP stuff. This is not HTTP, it is proper networking! ;-)
>
> Problem one is that vibe.d sever processes never seem to terminate.
>
> I am using runApplication or more likely runEventLoop in my main but it never returns. Starting the server from the command line, I Ctrl+C the process and get the message:
>
> [main(----) INF] Received signal 2. Shutting down.
>
> but whilst I get a command line prompt, the process is not terminated.
>
> This is a bit of a blocker so help very much required.

Had similar experiences on non-windows platforms.

I think the solution is just to kill the pid.
May 23, 2020
On Sat, 2020-05-23 at 16:56 +0000, bauss via Digitalmars-d-learn wrote: […]
> 
> Had similar experiences on non-windows platforms.

I forgot to mention I was on Linux (Debian Sid).

I am (sort of) pleased it isn't just me – definitely unhappy it has happened
to others as well.

> I think the solution is just to kill the pid.

Killing from the command line is not really an option as the process is used in integration tests.

I guess I'll have to send the process SIGKILL rather than SIGTERM, which is a bit annoying.

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



May 23, 2020
On Saturday, 23 May 2020 at 17:57:22 UTC, Russel Winder wrote:
> On Sat, 2020-05-23 at 16:56 +0000, bauss via Digitalmars-d-learn wrote: […]
>> 
>> Had similar experiences on non-windows platforms.
>
> I forgot to mention I was on Linux (Debian Sid).
>
> I am (sort of) pleased it isn't just me – definitely unhappy it has happened
> to others as well.
>
>> I think the solution is just to kill the pid.
>
> Killing from the command line is not really an option as the process is used in integration tests.
>
> I guess I'll have to send the process SIGKILL rather than SIGTERM, which is a bit annoying.

Yes, when I saw it happening then I thought it was probably just me.

Since it's not then perhaps an issue should be reported for vibe.d
May 23, 2020
On Saturday, 23 May 2020 at 15:47:59 UTC, Russel Winder wrote:
> Hi,
>
> I thought I would try and do the async version of my mock AVR850 using the vibe.d TCP stuff. This is not HTTP, it is proper networking! ;-)
>
> Problem one is that vibe.d sever processes never seem to terminate.
>
> I am using runApplication or more likely runEventLoop in my main but it never returns. Starting the server from the command line, I Ctrl+C the process and get the message:
>
> [main(----) INF] Received signal 2. Shutting down.
>
> but whilst I get a command line prompt, the process is not terminated.
>
> This is a bit of a blocker so help very much required.

It’s a recent problem with vibe-core. I’ve had to switch back to version 1.8.1.

https://github.com/vibe-d/vibe-core/issues/205

-Steve

May 24, 2020
On Sat, 2020-05-23 at 20:52 +0000, Steven Schveighoffer via Digitalmars-d-
learn wrote:
[…]
> 
> It’s a recent problem with vibe-core. I’ve had to switch back to version 1.8.1.
> 
> https://github.com/vibe-d/vibe-core/issues/205

Really good to know this is a genuine problem and not just me doing something wrong! :-)

For my purposes switching to using SIGKILL rather than SIGTERM in my tests seems to work with 1.9.1, so I'll go with that till 1.9.2 or 1.10.0 produces a fix rather than revert to 1.8.1.

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



May 25, 2020
On Sun, May 24, 2020 at 10:06 AM Russel Winder via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:
>
> For my purposes switching to using SIGKILL rather than SIGTERM in my tests seems to work with 1.9.1, so I'll go with that till 1.9.2 or 1.10.0 produces a fix rather than revert to 1.8.1.
>

You can use VibeHighEventPriority version in your dub as a workaround for now, there is no need to revert to 1.8.1
May 26, 2020
On 5/25/20 5:49 AM, Daniel Kozak wrote:
> On Sun, May 24, 2020 at 10:06 AM Russel Winder via Digitalmars-d-learn
> <digitalmars-d-learn@puremagic.com> wrote:
>>
>> For my purposes switching to using SIGKILL rather than SIGTERM in my tests
>> seems to work with 1.9.1, so I'll go with that till 1.9.2 or 1.10.0 produces a
>> fix rather than revert to 1.8.1.
>>
> 
> You can use VibeHighEventPriority version in your dub as a workaround
> for now, there is no need to revert to 1.8.1
> 

I'm thinking of actually reverting to something earlier or trying to get 1.9.0 to work. I am getting tons of spurious errors in vibe-core (see [1]). The latest cost me about 2 days of tracking down an error, where occasionally (still not sure of the situation) the connection to the database is spuriously closed before the response can be fully read.

I was not getting these in an earlier version of the build.

-Steve

[1] https://github.com/vibe-d/vibe-core/issues/208