You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mark Hindess <ma...@googlemail.com> on 2010/06/09 21:49:14 UTC

[porting] Quick update on FreeBSD porting

I've made some more progress on FreeBSD porting.  Both x86 and x86_64
are now at the point where they are able to run ant/ecj/junit thus the
builds can run on a Harmony JRE.  Unfortunately there is an outstanding
JIT issue which means that -Xint must always be used on x86.  (I think
Ilya was looking at this?)

I've fixed most of the networking issues up to a point.  However,
FreeBSD is really more like Windows in the way it supports IPv4/IPv6
addresses/sockets so there isn't much more I can do without
re-implementing the unix natives to support the same dual socket
mechanisms used in the windows natives.  I don't really have much
enthusiasm for the major redesign/refactoring that would be needed to do
this work properly.  There are some good descriptions of the problems
that the current implementation has at [0] and [1].

These references don't even begin to explain the confusing behaviour
seen when you are trying to debug these issues.  For example, if you
take an IPv6 udp socket with IPV6_V6ONLY set to zero, connect to a
mapped IPv4 address, then call send.  It fails with 'Invalid argument'
(an errno that isn't even mentioned in the send man page - which is odd
since FreeBSD man pages are excellent).  I'd have expected the connect
to fail (w/No route to host) if it was going to fail.  (Indeed it does
fail this way if you set IPV6_V6ONLY to 1.)

Things work reasonably well if you set -Djava.net.preferIPv4Stack=true.

There are several other failures but most of these seem to be down to
differences in platform behaviour and the existing FreeBSDs seem to fail
a lot of these too - so I'd put these down as invalid tests.  I intend
to continue to investigate the remaining test failures if/when I have
time.

I will probably produce a FreeBSD/x86_64 download for the next milestone
release so people can kick it a little and raise bugs for things that
they'd like to see fixed for real world applications.

If we can resolve the x86 issue I'll build one for that arch too.

Regards,
 Mark.

[0] http://diario.beerensalat.info/2008/10/12/java_and_ipv6_on_bsd.html
[1] http://fixunix.com/freebsd/544872-java-ipv6-bsd-does-not-work-well.html



Re: [porting] Quick update on FreeBSD porting

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/10/10 07:57, Mark Hindess wrote:
> I probably could figure out how to create a syntactically-correct ports
> tree entry however I'm not really familiar enough with the best practice
> to do a good job of it.  In particular, the "ant fetch-depends" step
> would likely be frowned upon and I'm not sure how to get around that
> in an acceptable way.
You'd have to create ports for all the depends and list them as
BUILD_DEPENDS or RUN_DEPENDS.

As my signature says, I can certainly help create this port.

- -- 
- ------------------------------------------------------------------------
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C
Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354
VP Apache Infrastructure; Member, Apache Software Foundation
Committer,                        FreeBSD Foundation
Consultant,                       P6M7G8 Inc.
Sr. System Admin,                 Ridecharge Inc.

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iD8DBQFMEJvpdbiP+9ubjBwRAlF+AJ9yYBAS0yUr1YSYbjccDqI0hIA9IQCgj6Zg
9MS9nDn6riuKBh1aK8oOGKA=
=EQiP
-----END PGP SIGNATURE-----

Re: [porting] Quick update on FreeBSD porting

Posted by Mark Hindess <ma...@googlemail.com>.
In message <4C...@p6m7g8.com>, "Philip M. Gollucci" writes:
>
> On 06/09/10 19:49, Mark Hindess wrote:
> >
> > I've fixed most of the networking issues up to a point.  However,
> > FreeBSD is really more like Windows in the way it supports IPv4/IPv6
> > addresses/sockets so there isn't much more I can do without
> > re-implementing the unix natives to support the same dual socket
> > mechanisms used in the windows natives.  I don't really have much
> > enthusiasm for the major redesign/refactoring that would be needed
> > to do this work properly.  There are some good descriptions of the
> > problems that the current implementation has at [0] and [1].
>
> I'm dumb founded, if you going to say FBSD has any strengths, its
> network stack is certainitly one of them.  Though I've not messed with
> ipv6 much.

None of my statements quoted above were actually intended to convey any
judgement about the FBSD TCP/IP implementation.  When I wrote "problems
that the current implementation has" I was referring to Harmony problems
not to FreeBSD problems.

I did mention one specific issue (that you edited out) with the
implementation that I found confusing but that could just be a
misunderstanding on my part.

> > I will probably produce a FreeBSD/x86_64 download for the next
> > milestone release so people can kick it a little and raise bugs for
> > things that they'd like to see fixed for real world applications.
>
> To add an entry to the FreeBSD ports tree all thats required is a
> .tar.gz or whatever variant of the code.  I believe you previously
> mentioned it built before.

I probably could figure out how to create a syntactically-correct ports
tree entry however I'm not really familiar enough with the best practice
to do a good job of it.  In particular, the "ant fetch-depends" step
would likely be frowned upon and I'm not sure how to get around that
in an acceptable way.

Regards,
 Mark.





Re: [porting] Quick update on FreeBSD porting

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/09/10 19:49, Mark Hindess wrote:
> I've fixed most of the networking issues up to a point.  However,
> FreeBSD is really more like Windows in the way it supports IPv4/IPv6
> addresses/sockets so there isn't much more I can do without
> re-implementing the unix natives to support the same dual socket
> mechanisms used in the windows natives.  I don't really have much
> enthusiasm for the major redesign/refactoring that would be needed to do
> this work properly.  There are some good descriptions of the problems
> that the current implementation has at [0] and [1].
I'm dumb founded, if you going to say FBSD has any strengths, its
network stack is certainitly one of them.  Though I've not messed with
ipv6 much.


> I will probably produce a FreeBSD/x86_64 download for the next milestone
> release so people can kick it a little and raise bugs for things that
> they'd like to see fixed for real world applications.
To add an entry to the FreeBSD ports tree all thats required is a
.tar.gz or whatever variant of the code.  I believe you previously
mentioned it built before.
- -- 
- ------------------------------------------------------------------------
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C
Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354
VP Apache Infrastructure; Member, Apache Software Foundation
Committer,                        FreeBSD Foundation
Consultant,                       P6M7G8 Inc.
Sr. System Admin,                 Ridecharge Inc.

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iD8DBQFMEBNidbiP+9ubjBwRAjjNAJ4wUNNS2MYBr9aK6FbgSHKAWgPYfACfSWVn
+epog57N7oCcoeaQIrY6DNQ=
=hZBu
-----END PGP SIGNATURE-----