The Samba-Bugzilla – Attachment 8105 Details for
Bug 9184
DNS server is blocked
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Additional patch for v4-0-test to fix 100% CPU usage on freebsd
tmp40.diff (text/plain), 1.65 KB, created by
Stefan Metzmacher
on 2012-10-23 13:36:51 UTC
(
hide
)
Description:
Additional patch for v4-0-test to fix 100% CPU usage on freebsd
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2012-10-23 13:36:51 UTC
Size:
1.65 KB
patch
obsolete
>From b0297f6d4dfc74a480acc6ec9d5d4ab55003a38f Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 2 Oct 2012 12:20:26 +0200 >Subject: [PATCH] lib/tsocket: fix loop in tdgram_bsd_recvfrom() (bug #9184) > >If the socket is not readable yet, we need to retry >if tsocket_bsd_pending() returns 0. > >See also >https://lists.samba.org/archive/samba-technical/2012-October/087164.html > >metze > >Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> >Autobuild-Date(master): Tue Oct 23 14:44:21 CEST 2012 on sn-devel-104 >(cherry picked from commit d2aa785290a283e06624f22a381a7ea02baae5ad) >--- > lib/tsocket/tsocket_bsd.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c >index d5721b4..135fd02 100644 >--- a/lib/tsocket/tsocket_bsd.c >+++ b/lib/tsocket/tsocket_bsd.c >@@ -792,7 +792,7 @@ static int tdgram_bsd_set_writeable_handler(struct tdgram_bsd *bsds, > > struct tdgram_bsd_recvfrom_state { > struct tdgram_context *dgram; >- >+ bool first_try; > uint8_t *buf; > size_t len; > struct tsocket_address *src; >@@ -826,6 +826,7 @@ static struct tevent_req *tdgram_bsd_recvfrom_send(TALLOC_CTX *mem_ctx, > } > > state->dgram = dgram; >+ state->first_try= true; > state->buf = NULL; > state->len = 0; > state->src = NULL; >@@ -876,6 +877,13 @@ static void tdgram_bsd_recvfrom_handler(void *private_data) > bool retry; > > ret = tsocket_bsd_pending(bsds->fd); >+ if (state->first_try && ret == 0) { >+ state->first_try = false; >+ /* retry later */ >+ return; >+ } >+ state->first_try = false; >+ > err = tsocket_bsd_error_from_errno(ret, errno, &retry); > if (retry) { > /* retry later */ >-- >1.7.9.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
abartlet
:
review+
Actions:
View
Attachments on
bug 9184
:
7914
|
7915
|
7918
| 8105