Bug 689952
| Summary: | Incorrect bit check in replication connection code | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] 389 | Reporter: | Nathan Kinder <nkinder> | ||||
| Component: | Replication - General | Assignee: | Nathan Kinder <nkinder> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Viktor Ashirov <vashirov> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 1.2.8 | CC: | rmeggins | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-12-07 16:48:12 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 656390, 690319 | ||||||
| Attachments: |
|
||||||
Created attachment 486894 [details]
Patch for cov#10581
Pushed patch to master. Thanks to Noriko for her review! Counting objects: 13, done. Delta compression using up to 2 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 931 bytes, done. Total 7 (delta 5), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 09bc822..b41338f master -> master Do we want to get this into 1.2.8? (In reply to comment #3) > Do we want to get this into 1.2.8? I'm not really sure if it's a critical issue or not, as I don't know how common it would be for the PR_POLL_WRITE flag to not be set in this case. Do you think it should go into 1.2.8? I don't think it is critical. It can wait. How can QE verify this bug? Is there a bug that can be reproduced? If not, I say we just mark this as verified by code inspection. (In reply to comment #6) > How can QE verify this bug? Is there a bug that can be reproduced? If not, I > say we just mark this as verified by code inspection. Yes, we should just mark it verified by code inspection. This was found by a Coverity scan. |
In the replication connection code, we do a bit check that is incorrect. We currently have this in repl5_connection.c at line 540: } else if ((rc < 0) || ((polldesc.out_flags|PR_POLL_WRITE) == 0)) { /* error */ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name, ... The problem is that "((polldesc.out_flags|PR_POLL_WRITE) == 0))" will always be false since PR_POLL_WRITE is defined as 2. We should be using the following condition instead to check if out_flags does not have PR_POLL_WRITE set: (!(polldesc.out_flags&PR_POLL_WRITE))