pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48584: Linux emulation doesn't seem to support epoll



>Number:         48584
>Category:       pkg
>Synopsis:       Linux emulation doesn't seem to support epoll
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 10 02:40:00 +0000 2014
>Originator:     Royce
>Release:        NetBSD 6.1_STABLE
>Organization:
Victoria University Wellington NZ
>Environment:
NetBSD paramount.ecs.vuw.ac.nz 6.1_STABLE NetBSD 6.1_STABLE (GENERIC) #17: Sun 
Jan  5 23:56:01 NZDT 2014  
mark%turakirae.ecs.vuw.ac.nz@localhost:/local/SAVE/6_64.obj/src/work/6/src/sys/arch/amd64/compile/GENERIC
 amd64
>Description:
Running java7 Linux binary 

file /usr/pkg/java/sun-7/bin/java
/usr/pkg/java/sun-7/bin/java: ELF 64-bit LSB executable, x86-64, version 1 
(SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, 
BuildID[sha1]=0x68582ab83ddaf6429310a6f841f0adda165ce880, not stripped

Running java program that calls sun.nio.ch.EPoll.epollCreate results in error 
as below.

/usr/pkg/java/sun-7/bin/java AsynchronousChannelGroupTest
Exception in thread "main" java.io.IOException: Function not implemented
        at sun.nio.ch.EPoll.epollCreate(Native Method)
        at sun.nio.ch.EPollPort.<init>(EPollPort.java:89)
        at 
sun.nio.ch.LinuxAsynchronousChannelProvider.openAsynchronousChannelGroup(LinuxAsynchronousChannelProvider.java:64)
        at 
java.nio.channels.AsynchronousChannelGroup.withCachedThreadPool(AsynchronousChannelGroup.java:233)
        at 
AsynchronousChannelGroupTest.main(AsynchronousChannelGroupTest.java:13)


>How-To-Repeat:
Compile and run test Java program as below. 

public class AsynchronousChannelGroupTest {
    public static void main(String[] args) throws IOException, 
InterruptedException {
        Runnable r= new AsynchronousChannelGroupTest(). new SampleThread();
        ExecutorService service = Executors.newCachedThreadPool();
        service.execute(r);
        AsynchronousChannelGroup acg = 
AsynchronousChannelGroup.withCachedThreadPool(service, 2);

        System.out.println(acg.isShutdown());
        acg.awaitTermination(2,TimeUnit.SECONDS);
        acg.shutdownNow();
    }
    class SampleThread implements Runnable {
        @Override
        public void run() {
            for (int cnt =0; cnt<5 ; cnt++) {
                System.out.println("run:" + cnt);
            }
        }
    }
}
>Fix:



Home | Main Index | Thread Index | Old Index