New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jewel: rgw: work around curl_multi_wait bug with non-blocking reads #11627
Conversation
closing until #11630 merges to master - it should be backported at the same time |
@cbodley could you please rebase against jewel-next ? A number of backports have been merged since the last check and it would be good to get another make check with a more recent rebase. |
closes a potential race between pipe creation and RGWHTTPManager::reqs_thread_entry()'s access of thread_pipe Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit 9161e9f)
Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit c93959b)
when HAVE_CURL_MULTI_WAIT is 0, the pipe fd is never added to the readfds for select(), so FD_ISSET() is always false. this prevents us from ever trying to read from the fd, and the pipe's buffer eventually fills up and deadlocks callers of RGWHTTPManager::signal_thread() when they try to write to the pipe Fixes: http://tracker.ceph.com/issues/16368 Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit 75897f8)
Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit 2080984)
Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit f2f5cdf)
Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit 1101fcc)
Fixes: http://tracker.ceph.com/issues/15915 Fixes: http://tracker.ceph.com/issues/16695 Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit 0359be6)
Signed-off-by: John Coyle <dx9err@gmail.com> (cherry picked from commit 00f4554)
Reported-by: Ken Dreyer <kdreyer@redhat.com> Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit dcff120)
thanks @dachary, rebased and waiting on checks |
jenkins test this please (general jenkins failure) |
CXX rgw/librgw_la-rgw_metadata.lo rgw/rgw_http_client.cc:365:8: error: 'once_flag' in namespace 'std' does not name a type static std::once_flag detect_flag; ^ rgw/rgw_http_client.cc: In member function 'int RGWHTTPManager::set_threaded()': rgw/rgw_http_client.cc:805:3: error: 'call_once' is not a member of 'std' std::call_once(detect_flag, detect_curl_multi_wait_bug, cct, ^ rgw/rgw_http_client.cc:805:18: error: 'detect_flag' was not declared in this scope std::call_once(detect_flag, detect_curl_multi_wait_bug, cct, ^ make[3]: *** [rgw/librgw_la-rgw_http_client.lo] Error 1 |
@dachary eek, interesting.. it must be getting the |
@cbodley yeah ! |
this fix was added directly to the jewel branch rather than backporting from master, because the code on master compiles without this specific include - it's likely included by another header, but backporting would involve pulling in unrelated changes Signed-off-by: Casey Bodley <cbodley@redhat.com>
@dachary added this:
sound okay? |
…g with non-blocking reads Reviewed-by: Loic Dachary <ldachary@redhat.com>
@cbodley yes, thanks ! |
hey jenkins, do you best this time, test this please (jenkins general failure) |
well done jenkins, i knew you had it in you! :) |
It passed the rgw suite http://tracker.ceph.com/issues/17851#note-3 . Note that it will not be in 10.2.4, reason why it targets jewel-next. |
pulls in some earlier fixes to resolve merge conflicts
Backport tracker: http://tracker.ceph.com/issues/17343
http://tracker.ceph.com/issues/17846