lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0908251812450.18518@makko.or.mcafeemobile.com>
Date:	Tue, 25 Aug 2009 18:14:55 -0700 (PDT)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Will Brown <dr.hfuhruhurr@...il.com>
cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: PROBLEM: Epoll frequently fails to notify connects at connect
 bursts

On Wed, 26 Aug 2009, Will Brown wrote:

> PLEASE CC: ME ON ANY REPLIES, thank you.
> 
> *** 1. Epoll frequently fails to notify connects at connect bursts
> 
> *** 2. Sometimes, when several connects come in quickly, epoll
> establishes tcp connections (according to 'netstat') but then fails to
> notify the application by returning from epoll_wait(). In those cases
> a subsequent connection or an EPOLLIN or EPOLLOUT event can cause a
> return from epoll_wait(), which then causes the previously ignored
> connection to be reported. But then the more recent event is not
> notified, the whole sequence lags and everything gets out of whack.
> The problems can easily be reproduced on my Ubuntu machine which runs
> a kernel version 2.6.28 using supplied test program. I also have a
> Ubuntu hosted in VMWare running a 2.6.27 version kernel, which appears
> to NOT have the same problem.

Multiple quasi-simultaneous events for the same fd are merged. This is why 
on POLLIN on accepting sockets you want to do something like:

	while ((afd = accept(sfd, ...)) != -1)
		add_client(afd);



- Davide


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ