-
Notifications
You must be signed in to change notification settings - Fork 297
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
-[Replication_Tests test04_ReplicateAttachments] fails with SSL #1170
Comments
It's failing exactly the same way in the Mac unit tests too, now. This is very strange because I run the Mac unit tests all the time (since they're so easy to run), definitely before any commit. Moreover, I can't reproduce it on my home iMac which is running stock 10.11.3 (My work MBP is on the latest 10.11.4 beta.) I'm very suspicious this is a regression in the OS, specifically CFNetwork. I've filed a bug report with Apple (rdar://25197186). |
Ah: it's triggered by using HTTPS. I just committed a fix to dev (730eb28) to make the Mac unit tests respect ATS on 10.11, so that switched them to using all SSL. If I back out that change, so they don't use SSL, the test passes again. |
Apple added a comment to the bug report:
I am indeed running a new build of Sync Gateway, built with Go 1.6 so it supports HTTP/2. In my earlier tests it seemed to be working, but it's definitely what caused this. |
Once couchbase/sync_gateway#1888 is fixed for 1.3, we could defer this issue to post 1.3. |
If this only happens with HTTP2, it's lower priority, since SG doesn't enable HTTP2 by default. |
Disabling HTTPS completely made the issue go away, but of course we can't deploy a non-SSL SG. I tried disabling |
@sethrosetter Can you help running the functional test with SSL enabled? We may need to modify iOS LiteServ to be able to enable SSL. PS: I don't see the issue when running unit tests. |
What ended up resolving this was switching from an Amazon load balancer to a Nginx load balancer. My best guess is related to SSL-termination and HTTP/2. |
@sethrosetter I added SSL support to LiteServ-iOS. Let me know if that works. |
From what @basememara said above, it sounds like this is still specific to HTTP/2 connections? I had thought that we worked around this by disabling HTTP/2 by default on SG, but I hadn't considered that intermediate gateways/proxies might serve HTTP/2. I think we'll have to find a reproducible case to submit to Apple, so they can work out what's going wrong. |
@sethrosetter Any chance to look at this? |
Closing 1.x issue! |
-[Replication_Tests test04_ReplicateAttachments]
is failing on both the dev and master branches when run on the iOS simulator (iOS 9.2). Apparently this has been going on for a while but wasn't noticed; I can reproduce it on commit b2eee39, which was the head of the master branch on March 1. (The previous master commit has a build problem on iOS, and the one before that, a72c942, from Feb 18, works.)The test failure looks like a deadlock in CFStream. The replicator thread is blocked writing to an output stream:
Meanwhile the CFNetwork thread is also blocked, apparently on the same mutex, which apparently belongs to the same stream:
I've never seen this happen on Mac OS. It seems to be a bit of a race condition on iOS, because if I turn on more logging it often goes away.
The text was updated successfully, but these errors were encountered: