[
https://issues.jboss.org/browse/WFLY-1453?page=com.atlassian.jira.plugin....
]
David Lloyd commented on WFLY-1453:
-----------------------------------
The problem is that the Linux JDK defaults to epoll. Interestingly, XNIO actually tries
to instantiate the KQueueSelectorProvider, which would theoretically work (probably
optimally) on FreeBSD, however since the Linux JDK would lack that native code, the
construction fails. In any case though, XNIO makes the assumption at some point that the
default NIO provider on the system actually works. The system property is there for when
detection fails and this is not possible, so that is a valid workaround for now.
One thing I can do though is try to detect that the default provider doesn't work, and
fall back to the polling provider at the last.
WildFly is not running on FreeBSD due to missing Linux epoll_create
syscall
---------------------------------------------------------------------------
Key: WFLY-1453
URL:
https://issues.jboss.org/browse/WFLY-1453
Project: WildFly
Issue Type: Bug
Components: Remoting, Scripts
Affects Versions: 8.0.0.Alpha1
Environment: FreeBSD arq 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29
18:27:25 UTC 2013 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
amd64
I am running the latest FreeBSD patching -p3 on top of the latest FreeBSD 9.1.
java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) Server VM (build 23.21-b01, mixed mode)
I am running latest /usr/ports/java/linux-sun-jdk17 port which uses Java of version
1.7.0._21.
Since this is JDK for Linux, there has to be Linux compatibility layer under Java and on
top of FreeBSD.
I am running these ports in order to provide FreeBSD that Linux compatibility:
% pkg_version | grep linux
linux-f10-expat =
linux-f10-fontconfig =
linux-f10-xorg-libs =
linux_base-f10 =
I have enabled linux.ko driver in kernel
% kldstat
Id Refs Address Size Name
1 20 0xffffffff80200000 1323408 kernel
2 1 0xffffffff81524000 208758 zfs.ko
3 2 0xffffffff8172d000 5c78 opensolaris.ko
4 1 0xffffffff81812000 3e1c linprocfs.ko
5 1 0xffffffff81816000 1f43e linux.ko
Reporter: Stefan Miklosovic
Assignee: David Lloyd
Priority: Minor
When trying to start ./bin/standalone.sh, it writes these errors to the console:
09:22:43,771 INFO [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version
4.0.0.Beta1
09:22:43,823 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001:
Failed to start service jboss.remoting.endpoint.management:
org.jboss.msc.service.StartException in service jboss.remoting.endpoint.management:
JBAS017113: Failed to start service
at org.jboss.as.remoting.EndpointService.start(EndpointService.java:85)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1974)
[jboss-msc-1.1.2.Final.jar:1.1.2.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1907)
[jboss-msc-1.1.2.Final.jar:1.1.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_21]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
Caused by: java.io.IOException: Function not implemented
at sun.nio.ch.EPollArrayWrapper.epollCreate(Native Method) [rt.jar:1.7.0_21]
at sun.nio.ch.EPollArrayWrapper.<init>(EPollArrayWrapper.java:87)
[rt.jar:1.7.0_21]
at sun.nio.ch.EPollSelectorImpl.<init>(EPollSelectorImpl.java:68)
[rt.jar:1.7.0_21]
at sun.nio.ch.EPollSelectorProvider.openSelector(EPollSelectorProvider.java:36)
[rt.jar:1.7.0_21]
at org.xnio.nio.NioXnio$DefaultSelectorCreator.open(NioXnio.java:203)
at org.xnio.nio.NioXnioWorker.<init>(NioXnioWorker.java:89)
at org.xnio.nio.NioXnio.createWorker(NioXnio.java:172)
at org.jboss.remoting3.EndpointImpl.construct(EndpointImpl.java:137)
at org.jboss.remoting3.Remoting.createEndpoint(Remoting.java:60)
at org.jboss.remoting3.Remoting.createEndpoint(Remoting.java:73)
at org.jboss.as.remoting.EndpointService.start(EndpointService.java:72)
... 5 more
Which are repeated several times for different components.
The problem is with unimplemented Linux epoll syscall on Linux compatibility layer. The
state of compatibility of Linux with FreeBSD can be tracked here:
https://wiki.freebsd.org/linux-kernel
Where, specifically, the workaround for this issue is:
bq.if you run an application in the linux java which wants to use the linux epoll
functions (you should see "not implemented" messages in dmesg), you can start
java with the argument
-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider
This is exactly what I see in dmesg: syscall epoll_create not implemented.
I created simple patch for standalone.sh which resolve this by introducing FreeBSD
platform and adding that argument into JAVA_OPTS.
I am aware that WildFly is not officially supported for FreeBSD but I do not see a reason
why it could not be repaired in order to provide at least some runnable version for the
community to hack around.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira