harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess" <mark.hind...@googlemail.com>
Subject [porting] Quick update on FreeBSD porting
Date Wed, 09 Jun 2010 19:49:14 GMT

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



Mime
View raw message