Age | Commit message (Collapse) | Author | Files | Lines |
|
Without this patch, when a socket only has a write event pending, we will never
detect an error condition. I've seen winbind doing
12:19:13.659964 gettimeofday({1306837153, 659984}, NULL) = 0 <0.000016>
12:19:13.660109 poll([{fd=35, events=POLLOUT}, {fd=32, events=POLLIN|POLLHUP}], 2, 9996) = 1 ([{fd=35, revents=POLLERR|POLLHUP}]) <0.000015>
12:19:13.660253 gettimeofday({1306837153, 660269}, NULL) = 0 <0.000013>
12:19:13.660298 poll([{fd=35, events=POLLOUT}, {fd=32, events=POLLIN|POLLHUP}], 2, 9996) = 1 ([{fd=35, revents=POLLERR|POLLHUP}]) <0.000015>
for a while when trying to connect to a DC when the socket had died already.
Volker
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue May 31 20:59:10 CEST 2011 on sn-devel-104
|
|
We need to use the "foo.h" form instead of the <foo.h> form for
headers that are not installed publicly. Otherwise when an external
version of tevent is used we won't find the header and the build will
fail.
Note that this creates a structure dependency between the
tevent structures in the external library and the headers in our
source tree. That is not ideal, but is currently OK as the waf build
will only use the external library if it is at least the same version
as the internal tree, which means it will actually be the same
version, as we release the external version from our tree.
We should come up with a better solution, but for now this allows
openchange to build again.
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Tue May 10 16:06:40 CEST 2011 on sn-devel-104
|
|
In the initial phase nmbd does not yet have timed events. This led to nmbd
not correctly registering its names in make test and certainly everywhere
else.
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Apr 11 14:35:45 CEST 2011 on sn-devel-104
|
|
|
|
|
|
This makes sure that fd events doesn't dry out,
because a fd with a lower number is busy.
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jan 31 16:59:44 CET 2011 on sn-devel-104
|
|
metze
|
|
main loop"
This reverts commit 455fccf86b6544cd17a2571c63a88f8aebff3f74.
I'll add a more generic fix for this problem.
metze
|
|
This reverts commit 61f7d7cdeccb1f733590e8bdb8229b32363a815e.
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Jan 24 10:10:43 CET 2011 on sn-devel-104
|
|
If select returns EBADF (which should NEVER happen), then we loop infinitely
because the select masks seem all active.
I've been given an strace where smbd floods syslog with inotify-related
error messages. The strace shows that select returns EBADF, and we're calling
the inotify event callback. It then complains there's no data on the inotify
fd.
Metze, please check!
We might need to fix this in 3.4 and 3.5 as well. And we need to find the
deeper reason where we close a file descriptor and don't tell the events
system about it.
Volker
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Jan 23 10:05:39 CET 2011 on sn-devel-104
|
|
pass this in as the &now parameter. Push this call inside of
event_add_to_select_args() to the correct point so it doesn't
get called unless needed.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Dec 23 01:08:11 CET 2010 on sn-devel-104
|
|
Previously, only one fd handler was being called per main message loop
in all smbd child processes.
In the case where multiple fds are available for reading the fd
corresponding to the event closest to the beginning of the event list
would be run. Obviously this is arbitrary and could cause unfairness.
Usually, the first event fd is the network socket, meaning heavy load
of client requests can starve out other fd events such as oplock
or notify upcalls from the kernel.
In this patch, I have changed the behavior of run_events() to unset
any fd that it has already called a handler function, as well
as decrement the number of fds that were returned from select().
This allows the caller of run_events() to iterate it, until all
available fds have been handled.
I then changed the main loop in smbd child processes to iterate
run_events(). This way, all available fds are handled on each wake
of select, while still checking for timed or signalled events between
each handler function call. I also added an explicit check for
EINTR from select(), which previously was masked by the fact that
run_events() would handle any signal event before the return code
was checked.
This required a signature change to run_events() but all other callers
should have no change in their behavior. I also fixed a bug in
run_events() where it could be called with a selrtn value of -1,
doing unecessary looping through the fd_event list when no fds were
available.
Also, remove the temporary echo handler hack, as all fds should be
treated fairly now.
|
|
Guenther
|
|
This correctly initialises the event backend, and checks for errors
(thanks to Metze for suggesting this)
|
|
|
|
tevent ensures that a timed event is only called once. The old events
code relied on the called handler removing the event itself. If the
handler removed the event after calling a function which invoked the
event loop then the timed event could loop forever.
This change makes the two timed event systems more compatible, by
allowing the handler to free the te if it wants to, but ensuring it is
off the linked list of events before the handler is called, and
ensuring it is freed even if the handler doesn't free it.
|
|
|
|
|
|
|
|
metze
|
|
metze
|
|
metze
|
|
Jeremy.
|
|
metze
|
|
In event handlers, we might destroy other events that are pending in the lists.
We can only run one event safely per select call.
Yes, I've seen these valgrind errors :-)
Jeremy, with ccdd921e61 you had checked in the change to run multiple events.
Do you remember why it was necessary and could not be solved in a different
way?
Volker
|
|
We might have pending signal events not only timed events.
metze
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|
|
metze
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
|
|
(This used to be commit 3d4e7b29c235e329aaea4fa2c2078df0ce3e59eb)
|
|
For some bugs I really wonder how they can go undetected for so long.
Fix a bug reported by Mathias Dietz. No samba bugzilla entry, but still 100%
needed for 3-2-stable.
Volker
(cherry picked from commit 82c994dabc47bb4755c883a1f3651bb5d65cf2c5)
(This used to be commit 91c73e093a03b10426b671cb3e1dffb8a2455d47)
|
|
Michael
(This used to be commit f872a1f4428ed64bcfd832d981eea6446f05339e)
|
|
Now we can have multiple events listen on a single fd. The order in which they
are called is naturally not defined, meaning that it is only deterministic if
exactly one event is readable or writeable.
(This used to be commit 61503f822b60f98dd1f7549707ec89b48e32caeb)
|
|
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f)
|
|
Guenther
(This used to be commit 38eca60913f513accb24b31dcb6d1d7e92b0ba66)
|
|
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
|
|
Jeremy.
(This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3)
|
|
Guenther
(This used to be commit 27fdf995d13611ebc9e57895f886c184e9027c4d)
|
|
Guenther
(This used to be commit 4e1e697ac48513719bd3a2152f17871bc00df796)
|
|
(This used to be commit a8082a3c7c3d1e68c27fc3bf42f3d44402cc6f9f)
|
|
(This used to be commit e3d985c581ffc597aea932858d27c421643d2868)
|
|
Jeremy.
(This used to be commit dce98dae2d18126d8380f92595f315b96d48a7df)
|