NetBSD Problem Report #48584

From www@NetBSD.org  Mon Feb 10 02:39:47 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 149DAA645E
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 10 Feb 2014 02:39:47 +0000 (UTC)
Message-Id: <20140210023944.D9197A64B5@mollari.NetBSD.org>
Date: Mon, 10 Feb 2014 02:39:44 +0000 (UTC)
From: royce@ecs.vuw.ac.nz
Reply-To: royce@ecs.vuw.ac.nz
To: gnats-bugs@NetBSD.org
Subject: Linux emulation doesn't seem to support epoll
X-Send-Pr-Version: www-1.0

>Number:         48584
>Category:       kern
>Synopsis:       Linux emulation doesn't seem to support epoll
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    chs
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 10 02:40:00 +0000 2014
>Last-Modified:  Mon Feb 10 20:30:01 +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:/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:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->chs
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Mon, 10 Feb 2014 03:03:42 +0000
Responsible-Changed-Why:
COMPAT_LINUX issue


From: Justin Cormack <justin@specialbusservice.com>
To: gnats-bugs@netbsd.org
Cc: chs@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, 
	obache@netbsd.org, pkg-manager@netbsd.org, royce@ecs.vuw.ac.nz
Subject: Re: kern/48584 (Linux emulation doesn't seem to support epoll)
Date: Mon, 10 Feb 2014 16:24:00 +0000

 --047d7b2e07e365f40204f20fc460
 Content-Type: text/plain; charset=UTF-8

 On 10 Feb 2014 03:03, <obache@netbsd.org> wrote:
 >
 > Synopsis: Linux emulation doesn't seem to support epoll
 >
 > Responsible-Changed-From-To: pkg-manager->chs
 > Responsible-Changed-By: obache@NetBSD.org
 > Responsible-Changed-When: Mon, 10 Feb 2014 03:03:42 +0000
 > Responsible-Changed-Why:
 > COMPAT_LINUX issue
 >

 It doesn't rather than it doesn't seem to. It would be a big project to fix
 and you would probably need to implement all the other parts (eventfd,
 signalfd, timerfd) that correspond to the rest of the kqueue mechanisms,
 plus it supports edge and level triggered events.

 Out of interest what are you trying to run that uses epoll? I guess it is
 getting more common now.

 Justin

 --047d7b2e07e365f40204f20fc460
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable

 <p dir=3D"ltr"><br>
 On 10 Feb 2014 03:03, &lt;<a href=3D"mailto:obache@netbsd.org">obache@netbs=
 d.org</a>&gt; wrote:<br>
 &gt;<br>
 &gt; Synopsis: Linux emulation doesn&#39;t seem to support epoll<br>
 &gt;<br>
 &gt; Responsible-Changed-From-To: pkg-manager-&gt;chs<br>
 &gt; Responsible-Changed-By: obache@NetBSD.org<br>
 &gt; Responsible-Changed-When: Mon, 10 Feb 2014 03:03:42 +0000<br>
 &gt; Responsible-Changed-Why:<br>
 &gt; COMPAT_LINUX issue<br>
 &gt;</p>
 <p dir=3D"ltr">It doesn&#39;t rather than it doesn&#39;t seem to. It would =
 be a big project to fix and you would probably need to implement all the ot=
 her parts (eventfd, signalfd, timerfd) that correspond to the rest of the k=
 queue mechanisms, plus it supports edge and level triggered events.</p>

 <p dir=3D"ltr">Out of interest what are you trying to run that uses epoll? =
 I guess it is getting more common now.</p>
 <p dir=3D"ltr">Justin</p>

 --047d7b2e07e365f40204f20fc460--

From: Mark Davies <mark@ecs.vuw.ac.nz>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: kern/48584 (Linux emulation doesn't seem to support epoll)
Date: Tue, 11 Feb 2014 09:26:22 +1300

 On Tue, 11 Feb 2014, Justin wrote:
 >  Out of interest what are you trying to run that uses epoll? I
 > guess it is getting more common now.

 This was apache-tomcat7 running under sun-jdk7.  The immediate issue 
 was solved by running it under openjdk7, but I asked Royce to report 
 it in case the missing linux call was easily fixed - sounds like it 
 isn't.

 cheers
 mark

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.