[SERVER-48187] Prevent path through TopologyEventsPublisher::_scheduleNextDelivery() from causing stack overflow Created: 13/May/20  Updated: 06/Dec/22  Resolved: 01/Jun/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Haley Connelly Assignee: Backlog - Service Architecture
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Service Arch
Operating System: ALL
Participants:
Linked BF Score: 6

 Description   

We suspect that the path from TopologyEventsPublisher::_scheduleNextDelivery() to ReplicaSetChangeListener::onConfirmedSet() can cause a stack overflow.

There are two frames that normally imply asynchronous work scheduling: TopologyEventsPublisher::_scheduleNextDelivery() and ReplicaSetChangeListener::onConfirmedSet(). It appears that work is scheduled and consumed inline on the networking thread, which can expand the stack past normal expectations.



 Comments   
Comment by Haley Connelly [ 13/May/20 ]

cc ben.caimano

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