[SERVER-2521] 1300 byte memory leak in PiggyBackData on socket exception Created: 10/Feb/11  Updated: 05/Apr/17  Resolved: 27/Jan/17

Status: Closed
Project: Core Server
Component/s: Internal Client, Networking
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Aaron Staple Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Done Votes: 0
Labels: cxxcopy
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

If there is a socket exception in flush() - for example if the connection is lost - the allocated buffer is not deleted

        ~PiggyBackData() {
            DESTRUCTOR_GUARD (
                flush();
                delete[]( _cur );
            );
        }



 Comments   
Comment by Mira Carey [ 27/Jan/17 ]

PiggyBackData no longer exists

Comment by Aaron Staple [ 25/Aug/12 ]

Here's some log from when it occurred during a replication test:

 m31001| Fri Aug 24 12:41:29 [replslave] repl: AssertionException dbclient error communicating with server: 127.0.0.1:31000
 m31001| Socket flush send() errno:32 Broken pipe 127.0.0.1:31000
 m31001| Fri Aug 24 12:41:29 [replslave]   caught exception (socket exception [SEND_ERROR] for 127.0.0.1:31000) in destructor (~PiggyBackData)
 m31001| Fri Aug 24 12:41:29 [replslave] repl: sleep 2 sec before next pass

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