[SERVER-63843] Don't allow recursive doLog in synchronous signal handlers Created: 18/Feb/22  Updated: 29/Oct/23  Resolved: 16/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 5.2.1
Fix Version/s: 5.0.12, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Sergey Galtsev (Inactive) Assignee: Gabriel Marks
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-66368 Don't call LOGV2 in the boost logging... Closed
Issue split
split to SERVER-66562 Audit, document all functions accesse... Backlog
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.0
Sprint: Security 2022-05-02, Security 2022-05-16, Security 2022-05-30, Security 2022-06-13
Participants:
Case:

 Description   

Under some circumstances the logging could be invoked recursively. This could for example happen when a signal happens inside logger itself. This could cause infinite loop or a deadlock

This ticket is to implement a simple check in logger for recursive invocation. If that happens, the log message must be echoed to stderr and not logged normally.



 Comments   
Comment by Githook User [ 17/Aug/22 ]

Author:

{'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}

Message: SERVER-63843 Don't allow recursive doLog in sync signal handlers
Branch: v5.0
https://github.com/mongodb/mongo/commit/7d0c51c21c432c9a3445ee45e80d28d1689dd1ed

Comment by Githook User [ 16/Aug/22 ]

Author:

{'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}

Message: Revert "SERVER-63843 Don't allow recursive doLog in sync signal handlers"

This reverts commit 2838764142c2341a8246e6039472eb9a1cdb9b7d.
Branch: v6.0
https://github.com/mongodb/mongo/commit/6192908ab3bcf8350e9ec5c7ecc6654d5708c320

Comment by Githook User [ 16/Aug/22 ]

Author:

{'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}

Message: Revert "SERVER-63843 Don't allow recursive doLog in sync signal handlers"

This reverts commit 855936558e1f1ab11d2c716421af95bf3dee2672.
Branch: v5.0
https://github.com/mongodb/mongo/commit/4bf516b8d6aa3d67f4ddfd7f4636a90373e1fdd1

Comment by Githook User [ 16/Aug/22 ]

Author:

{'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}

Message: SERVER-63843 Don't allow recursive doLog in sync signal handlers
Branch: v5.0
https://github.com/mongodb/mongo/commit/59f3659bf3bc29d032e0296e80bbe07d8b767178

Comment by Githook User [ 27/May/22 ]

Author:

{'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}

Message: SERVER-63843 Don't allow recursive doLog in sync signal handlers
Branch: master
https://github.com/mongodb/mongo/commit/3e717f0b3ec91d4937363d71b2ee7cc0c20a6221

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