From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin 'Qrczak' Kowalczyk Subject: Bug: epoll_wait timeout is shorter than requested Date: Mon, 17 Jan 2005 12:15:06 +0100 Message-ID: <87651wl32d.fsf@qrnik.zagroda> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from paf87.warszawa.sdi.tpnet.pl ([217.96.225.87]:10509 "EHLO qrnik.knm.org.pl") by vger.kernel.org with ESMTP id S262768AbVAQLPH (ORCPT ); Mon, 17 Jan 2005 06:15:07 -0500 Received: from qrczak by qrnik.knm.org.pl with local (Exim 3.36 #1) id 1CqUqg-0003Gp-00 for linux-fsdevel@vger.kernel.org; Mon, 17 Jan 2005 12:15:06 +0100 To: linux-fsdevel@vger.kernel.org Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org A program to exhibit the bug: ---------------- #include #include #include int main(void) { int epoll_fd; struct timeval time1, time2; struct epoll_event event; epoll_fd = epoll_create(16); gettimeofday(&time1, NULL); epoll_wait(epoll_fd, &event, 1, 1000); //poll(NULL, 0, 1000); gettimeofday(&time2, NULL); printf("start: %d.%06d\n", time1.tv_sec, time1.tv_usec); printf("stop: %d.%06d\n", time2.tv_sec, time2.tv_usec); return 0; } ---------------- It should wait one second (at least). Example output on Linux-2.6.10: start: 1105958820.439410 stop: 1105958821.438636 With poll used instead of epoll the timeout is OK: start: 1105958827.975209 stop: 1105958828.975944 Is this list a good place to report this? -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/