Ping issue

30 views
Skip to first unread message

Niels Hanberg

unread,
Jul 3, 2012, 5:35:23 AM7/3/12
to galli...@googlegroups.com
I have found an issue where the IsolatedProcessHost will end up in a state where it is trying to read from the IPC connection but never gets an answer. 
I can replicate the issue by starting a lot of processes at the same time (I am just starting like 10 Gallio echo clients running around 1000 tests). With that said, the problem can also occur with less processes running, but the likelihood is increased with the number of processes starting and running.
The problem is occurring when the IsolatedProcessHost is pinging the hostservice in the method WaitUntilReady. The ping is expecting an exception to be thrown if the processes is not connected to the pipe, which is mostly what is happening. But in some cases the IsolatedProcessHost will end up trying to read from the pipe but never get an answer, which will end up in a timeout.
As far as I have noticed from by debugging the state is occurring when a ping is sent and the process is starting listening at the same time. Here is a piece from one of my logs:

    <logEntry severity="debug" message="Ping: 3:45:06 PM" />
    <logEntry severity="debug" message="Ping failed: 3:45:06 PM" />
    <logEntry severity="debug" message="Ping: 3:45:06 PM" />
    <logEntry severity="debug" message="Listening for connections on IPC port: 'IsolatedProcessHost.ca1395abc958a834'" />
    <logEntry severity="debug" message="Ping timed out: 3:45:12 PM" />

I have made a patch that will solve the problem, at least for the tests I ran. I had a hard time getting the Project build, and I have not succeeded in getting the tests to run, so I am not sure if I have broken anything els.
FixPingIssue.patch

Niels Hanberg

unread,
Jul 3, 2012, 7:23:22 AM7/3/12
to galli...@googlegroups.com
Made the patch a bit to fast and overlooked an unused variable.
FixPingIssue.patch

Graham Hay

unread,
Jul 3, 2012, 9:08:07 AM7/3/12
to galli...@googlegroups.com
I'll take a look at the patch, thanks.

On 3 July 2012 12:23, Niels Hanberg <n...@appharbor.com> wrote:
Made the patch a bit to fast and overlooked an unused variable.

--
You received this message because you are subscribed to the Google Groups "gallio-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gallio-dev/-/Bfe52r0jsJcJ.

To post to this group, send email to galli...@googlegroups.com.
To unsubscribe from this group, send email to gallio-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gallio-dev?hl=en.

Niels Hanberg

unread,
Jul 17, 2012, 7:02:55 AM7/17/12
to galli...@googlegroups.com
Have you had time to look at the patch? Just let me know if I should make any changes.


On Tuesday, July 3, 2012 3:08:07 PM UTC+2, Graham Hay wrote:
I'll take a look at the patch, thanks.

On 3 July 2012 12:23, Niels Hanberg <n...@appharbor.com> wrote:
Made the patch a bit to fast and overlooked an unused variable.

--
You received this message because you are subscribed to the Google Groups "gallio-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/gallio-dev/-/Bfe52r0jsJcJ.

To post to this group, send email to galli...@googlegroups.com.
To unsubscribe from this group, send email to gallio-dev+unsubscribe@googlegroups.com.

Graham Hay

unread,
Jul 24, 2012, 9:03:24 AM7/24/12
to galli...@googlegroups.com
Sorry, yes, but I wanted to release 3.4 first.

The patch looks fine but, as it's a timing issue, it's kind of hard to prove that it's fixed. And that it won't introduce any new problems. I'll apply the patch, and keep an eye out for any surprises.

If I let you know when there's a nightly build with it in, could you make sure it works for your use case?

To view this discussion on the web visit https://groups.google.com/d/msg/gallio-dev/-/HEAIDcX1cxIJ.

To post to this group, send email to galli...@googlegroups.com.
To unsubscribe from this group, send email to gallio-dev+...@googlegroups.com.

Niels Hanberg

unread,
Jul 30, 2012, 3:30:39 AM7/30/12
to galli...@googlegroups.com
Sure, just let me know when it is out and I will test it.

Btw, sorry for my late reply, was on vacation. 
Reply all
Reply to author
Forward
0 new messages