Kayak failing on Mono since 0.7.0

47 views
Skip to first unread message

jeroen bobbeldijk

unread,
Jul 21, 2011, 9:31:57 AM7/21/11
to Kayak HTTP
Hi!

We use Kayak for our application, our application runs on Mono, and
Kayak did as well before 0.7.0.
Since I tried to upgrade and re-implement Kayak, it doesn't work
anymore, and it kills the rest of the application.
Even testing KayakExamples on mono fails, it prints:
--- Posted task.
--- Executing Task ---
--- Done Executing Task ---

And after that, nothing, while on windows:
--- Posted task.
--- Executing Task ---
KayakServer binding to
KayakServer: accepting connection
--- Done Executing Task ---

And then it works fine, on Windows.

My own re-implementation works fine on Windows too.
Any idea why this stopped working? I don't see any debug information
or errors.

Regards,

Jeroen

Benjamin van der Veen

unread,
Jul 21, 2011, 1:10:09 PM7/21/11
to kayak...@googlegroups.com
On Thu, Jul 21, 2011 at 6:31 AM, jeroen bobbeldijk <jerb...@gmail.com> wrote:
Hi!

We use Kayak for our application, our application runs on Mono, and
Kayak did as well before 0.7.0.
Since I tried to upgrade and re-implement Kayak, it doesn't work
anymore, and it kills the rest of the application.
Even testing KayakExamples on mono fails.

Hi Jeroen, 

What version of Mono are you using and which version of Kayak last worked on it?

Benjamin

Benjamin van der Veen

unread,
Jul 21, 2011, 6:56:44 PM7/21/11
to kayak...@googlegroups.com
On Thu, Jul 21, 2011 at 6:31 AM, jeroen bobbeldijk <jerb...@gmail.com> wrote:
We use Kayak for our application, our application runs on Mono, and
Kayak did as well before 0.7.0.
Since I tried to upgrade and re-implement Kayak, it doesn't work
anymore, and it kills the rest of the application.

I just pushed a commit to master that should fix this (it works on my machine!), or at least reveal further information:


The bug is very subtle and reveals a slight different between the implementation of System.Net.Sockets.Socket.LocalEndPoint on .NET and Mono, and possibly a difference between the way the compilers treat the Debug class. Freaky! 

Either way, this cleans out a bit of cruft and should give us some clues. Let me know if it helps and I'll push a new package!

Oh, and FWIW, there's a subtle bug that appears on Mono/OS X—in none of my example code is the server ever actually explicitly unbinding the listening socket—and on OS X at least, the OS doesn't appear to immediately reclaim that port when the process exits. :S This actually gets into some slightly hairy issues with the semantics of the event loop…I'll have to reflect on this.

jeroen bobbeldijk

unread,
Jul 22, 2011, 4:54:02 AM7/22/11
to Kayak HTTP
Thanks!

Last version working was 0.6.2 I guess.
Used mono version: 2.10.1.

Will report later if it worked!

Jeroen

On Jul 22, 12:56 am, Benjamin van der Veen <b...@bvanderveen.com>
wrote:
> On Thu, Jul 21, 2011 at 6:31 AM, jeroen bobbeldijk <jerbo...@gmail.com>wrote:
>
>
>
> > We use Kayak for our application, our application runs on Mono, and
> > Kayak did as well before 0.7.0.
> > Since I tried to upgrade and re-implement Kayak, it doesn't work
> > anymore, and it kills the rest of the application.
>
> I just pushed a commit to master that should fix this (it works on my
> machine!), or at least reveal further information:
>
> https://github.com/kayak/kayak/commit/2dcab7654a0476c274d71a50599fc52...

jeroen bobbeldijk

unread,
Jul 22, 2011, 5:25:03 AM7/22/11
to Kayak HTTP
No changes, not even in the output. Just:
--- Posted task.
--- Executing Task ---
--- Done Executing Task ---

Like it doesn't even get to the point of "KayakServer binding to"

Tried using mono with the --debug switch + pdb, sadly, I can't really
use that on the dll.

Jeroen


On Jul 22, 12:56 am, Benjamin van der Veen <b...@bvanderveen.com>
wrote:
> On Thu, Jul 21, 2011 at 6:31 AM, jeroen bobbeldijk <jerbo...@gmail.com>wrote:
>
>
>
> > We use Kayak for our application, our application runs on Mono, and
> > Kayak did as well before 0.7.0.
> > Since I tried to upgrade and re-implement Kayak, it doesn't work
> > anymore, and it kills the rest of the application.
>
> I just pushed a commit to master that should fix this (it works on my
> machine!), or at least reveal further information:
>
> https://github.com/kayak/kayak/commit/2dcab7654a0476c274d71a50599fc52...

Benjamin van der Veen

unread,
Jul 22, 2011, 8:27:28 AM7/22/11
to kayak...@googlegroups.com


On Jul 22, 2011, at 2:25, jeroen bobbeldijk <jerb...@gmail.com> wrote:

No changes, not even in the output. Just:
--- Posted task.
--- Executing Task ---
--- Done Executing Task ---

Like it doesn't even get to the point of "KayakServer binding to"

Tried using mono with the --debug switch + pdb, sadly, I can't really
use that on the dll.

You're recompiling and running the sample app from the latest master? Are you using the mono compiler or the .NET one?

jeroen bobbeldijk

unread,
Jul 24, 2011, 2:01:07 PM7/24/11
to Kayak HTTP
Yes I am. And I'm compiling on Visual Studio 2010.
Application is supposed to run on Windows and Linux, that's why I'm
compiling on .NET.

On 22 jul, 14:27, Benjamin van der Veen <b...@bvanderveen.com> wrote:

Benjamin van der Veen

unread,
Jul 31, 2011, 4:47:30 PM7/31/11
to kayak...@googlegroups.com
On Thu, Jul 21, 2011 at 6:31 AM, jeroen bobbeldijk <jerb...@gmail.com> wrote:
Hi!

We use Kayak for our application, our application runs on Mono, and
Kayak did as well before 0.7.0.
Since I tried to upgrade and re-implement Kayak, it doesn't work
anymore, and it kills the rest of the application.

Jeroen,

I've done some poking around and I believe this is a bug in the Mono 2.10 implementation of Socket.BeginConnect. Could you try to downgrade to 2.8 and see if it works?

Benjamin

Reply all
Reply to author
Forward
0 new messages