Bug 7686 - smbd child event loop not fair to non-socket fds
Summary: smbd child event loop not fair to non-socket fds
Alias: None
Product: Samba 3.6
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All Linux
: P3 major
Target Milestone: ---
Assignee: Steven Danneman
QA Contact: Samba QA Contact
Depends on:
Reported: 2010-09-16 16:08 UTC by Steven Danneman
Modified: 2010-10-01 15:36 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Steven Danneman 2010-09-16 16:08:09 UTC
The current event loop in smbd_server_connection_loop_once() only calls the 
handler for a single available fd, before going back to select().

The fds are called in the order in which fd events exist in a global linked list.  Usually, since the incoming socket fd is added to this list first it 
sits at the beginning, and other fds, such as iNotify or oplock fd used for kernel upcalls, come later in the list.

Thus, on a system with very active clients sending continuous SMB packets, the
socket fd will always be serviced, and other fds that are available for reading
or writing will be starved.

This can cause client disconnects, when oplock break upcalls are not read from
the kernel, and thus a client waits on a pending open for greater than it's
timeout (Windows is approximately 1 minute).

The smbd child event loop needs to be re-written to at least provide round-robin
fairness to available fds.
Comment 1 Steven Danneman 2010-10-01 15:36:58 UTC
This has been fixed in master with commit 455fccf8.