[SERVER-63852] getThreadName() should not crash Created: 18/Feb/22  Updated: 29/Oct/23  Resolved: 13/May/22

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

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

Issue Links:
Backports
Depends
Issue split
split to SERVER-66385 Remove ThreadName's dependence on Thr... Closed
Related
is related to SERVER-64639 Stitch SDK hits invariant initializin... Closed
is related to SERVER-66456 remove ThreadContext Closed
is related to SERVER-66385 Remove ThreadName's dependence on Thr... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0, v5.0
Sprint: Service Arch 2022-05-16, Service Arch 2022-05-30
Participants:
Case:
Story Points: 2

 Description   

If getThreadName() is invoked before ThreadContextsInitialized is complete, a SIGSEGV will happen. The name is typically needed for debugging and logging purposes and should not cause a crash. This ticket is to implement a mitigation to SIGSEGV



 Comments   
Comment by Billy Donahue [ 22/Aug/22 ]

Message: SERVER-63852 ThreadName rewrite
(cherry picked from commit 568226e)
(Needed to bring more errno_util updates in)
(cherry picked from commit 21fdd8ffd0b28adf3f096dab515d791bde20dab1)

Branch: v5.0
https://github.com/10gen/mongo/commit/7013e5f7c9ec106c0b8b5ee376c2064148bf7dcf

Comment by Billy Donahue [ 22/Aug/22 ]

Message: SERVER-63852 ThreadName rewrite
(cherry picked from commit 568226e)
(Needed to bring more errno_util updates in)

Branch: v6.0
https://github.com/10gen/mongo/commit/466977c16e29321a14c43a9af7a315ff0d13251a

Comment by Githook User [ 13/May/22 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-63852 ThreadName rewrite
Branch: master
https://github.com/mongodb/mongo/commit/95edbf51b92e6944043590fe781c901d2a815f9f

Comment by Blake Oler [ 28/Mar/22 ]

sergey.galtsev It looks like you already have a potential solution here – would you mind putting it up for code review and tagging Service Arch as reviewers?

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