[SERVER-56452] Self anchor in PooledLDAPConnection::setup's callback Created: 28/Apr/21  Updated: 29/Oct/23  Resolved: 21/May/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2.15, 4.4.7, 5.0.0-rc1, 4.0.26, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: Varun Ravichandran
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4, v4.2, v4.0
Sprint: Security 2021-05-17, Security 2021-05-31
Participants:
Case:

 Description   

PooledLDAPConnection::setup spawns an asynchronous task which is responsible for establishing a connection to a remote LDAP server, and waiting for it to successfully respond to a command. This task does not anchor the PooledLDAPConnection, which is held by its per-host connection pool. If the owning connection pool times out and is reaped, the PooledLDAPConnection may be desconstructed while being used by the callback.

 

The callback spawned by PooledLDAPConnection::setup should retain a std::shared_ptr to the PooledLDAPConnection which dispatched it.



 Comments   
Comment by Githook User [ 24/Jun/21 ]

Author:

{'name': 'Varun Ravichandran', 'email': 'varun.ravichandran@mongodb.com', 'username': 'varunravi98'}

Message: SERVER-56452: Anchor connection in PooledLDAPConnection::setup's callback

(cherry picked from commit c138b903b40f1c923c897849cd8981fb86db9aba)
(cherry picked from commit 1d60b53146e0ac24e855a8b2ea142dfc1cb9668e)
(cherry picked from commit 1fb77e2a1f83d47113b8dabca7f85fb4f0d0fba0)
(cherry picked from commit 3e8575a98fbc3b22eb0407a529e2c9d46efac61b)
Branch: v4.0
https://github.com/10gen/mongo-enterprise-modules/commit/4a6daa91691bd76f6759fd3df294071605341f33

Comment by Githook User [ 03/Jun/21 ]

Author:

{'name': 'Varun Ravichandran', 'email': 'varun.ravichandran@mongodb.com', 'username': 'varunravi98'}

Message: SERVER-56452: Anchor connection in PooledLDAPConnection::setup's callback

(cherry picked from commit c138b903b40f1c923c897849cd8981fb86db9aba)
(cherry picked from commit 1d60b53146e0ac24e855a8b2ea142dfc1cb9668e)
(cherry picked from commit 1fb77e2a1f83d47113b8dabca7f85fb4f0d0fba0)
Branch: v4.2
https://github.com/10gen/mongo-enterprise-modules/commit/3e8575a98fbc3b22eb0407a529e2c9d46efac61b

Comment by Githook User [ 02/Jun/21 ]

Author:

{'name': 'Varun Ravichandran', 'email': 'varun.ravichandran@mongodb.com', 'username': 'varunravi98'}

Message: SERVER-56452: Anchor connection in PooledLDAPConnection::setup's callback

(cherry picked from commit c138b903b40f1c923c897849cd8981fb86db9aba)
(cherry picked from commit 1d60b53146e0ac24e855a8b2ea142dfc1cb9668e)
Branch: v4.4
https://github.com/10gen/mongo-enterprise-modules/commit/1fb77e2a1f83d47113b8dabca7f85fb4f0d0fba0

Comment by Githook User [ 01/Jun/21 ]

Author:

{'name': 'Varun Ravichandran', 'email': 'varun.ravichandran@mongodb.com', 'username': 'varunravi98'}

Message: SERVER-56452: Anchor connection in PooledLDAPConnection::setup's callback

(cherry picked from commit c138b903b40f1c923c897849cd8981fb86db9aba)
Branch: v5.0
https://github.com/10gen/mongo-enterprise-modules/commit/1d60b53146e0ac24e855a8b2ea142dfc1cb9668e

Comment by Githook User [ 20/May/21 ]

Author:

{'name': 'Varun Ravichandran', 'email': 'varun.ravichandran@mongodb.com', 'username': 'varunravi98'}

Message: SERVER-56452: Anchor connection in PooledLDAPConnection::setup's callback
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/c138b903b40f1c923c897849cd8981fb86db9aba

Generated at Thu Feb 08 05:39:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.