[SERVER-28835] Fix a memory leak in WiredTiger on error when creating thread group Created: 18/Apr/17  Updated: 30/Oct/23  Resolved: 18/Apr/17

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Keith Bostic (Inactive)
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Storage 2017-05-08
Participants:

 Description   

Coverity analysis defect 101330: Resource leak

Leak of memory or pointers to system resources

Defect 101330 (STATIC_C)
Checker RESOURCE_LEAK (subcategory none)
File: /src/third_party/wiredtiger/src/support/thread_group.c
Function __thread_group_resize
/src/third_party/wiredtiger/src/support/thread_group.c, line: 211
Variable "thread" going out of scope leaks the storage it points to.

    		WT_PANIC_RET(session, ret, "Error while resizing thread group");



 Comments   
Comment by Githook User [ 06/Jun/17 ]

Author:

{u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexander.gorrod@mongodb.com'}

Message: Import wiredtiger: 7aaeaaa054d1ac27a95c79984f7ca69ba739caae from branch mongodb-3.6

ref: 78109ca3fe..7aaeaaa054
for: 3.5.9

SERVER-28820 Recovery failed: WT_NOTFOUND: item not found
SERVER-28835 Fix a memory leak in WiredTiger on error when creating thread group
WT-2972 Add interface allowing partial updates to existing values
WT-3041 Failure of test_perf01 on PPC
WT-3063 Reserve records for read-modify-write
WT-3076 Add a general-purpose epoch manager
WT-3123 Thread group holding lock across thread join
WT-3142 Add a workload generator application
WT-3158 Fix structure layout on Windows.
WT-3160 Improve eviction of internal pages from idle trees
WT-3197 aarch64 CRC32C support fails to compile on non-linux ARM platforms
WT-3219 Make the clang-analyzer job fail when lint is introduced
WT-3222 Review and enhance log statistics
WT-3245 Avoid hangs on shutdown when a utility thread encounters an error
WT-3247 Test should exit instead of abort to avoid a core dump
WT-3248 Performance degradation in workload with large overflow items
WT-3253 txn07 test problem
WT-3258 Improve visibility into thread wait time due to pages exceeding memory_page_max
WT-3261 add a checkpoint epoch to avoid draining the eviction queue
WT-3262 Schema operations shouldn't wait for cache
WT-3263 Allow archive on restart/recovery if clean shutdown
WT-3264 Permanent change to disable logging should eventually remove all logs
WT-3265 Verify hits assertion in eviction when transiting handle to exclusive mode
WT-3266 Thread group deadlock
WT-3267 Upgrade copyright notices from 2016 to 2017.
WT-3268 Failure to close cursor can get wiredtiger stuck in a cursor-close loop
WT-3269 Miscellaneous cleanup changes
WT-3271 Eviction tuning stuck in a loop
WT-3275 stress test sanitizer failure
WT-3278 log the row-store cursor key instead of page key
WT-3281 stress test sanitizer failure
WT-3282 Stuck in conn cache pool destroy join
WT-3284 tree-walk restart bug
WT-3287 review WiredTiger internal panic checks
WT-3288 fix error codes for event_handler to be consistent in file operations
WT-3292 review/cleanup full-barrier calls in WiredTiger
WT-3293 Make internal symbols externally visible
WT-3296 LAS table fixes/improvements
WT-3297 support the gcc/clang -fvisibility=hidden flag
WT-3300 Coverity 1374542: Dereference after null check
WT-3302 Failure to create cache pool manager thread results in crash when destroying cache pool
WT-3303 Deadlock during first access to lookaside table
WT-3307 FI testing: segfault in python test test_bug013 when fault introduced reading turtle file
WT-3312 encryption btree configuration test
WT-3313 Replace calls to the deprecated LZ4_compress function
WT-3314 clarify error handling
WT-3327 Checkpoints can hang if time runs backward
WT-3331 Test format aborted due to time rollback
WT-3333 Make it possible to store 0 bytes into a 'u' format via Python
WT-3334 static test suite's BaseDataSet class has 'u' value format bugs
WT-3339 The CURSOR_UPDATE_API_CALL macro will dump core on a NULL btree handle
WT-3342 Create a new WiredTiger 2.9.2 release
WT-3343 WiredTiger database close can attempt unlock of a lock that's not held.
WT-3345 Improve rwlock scaling
WT-3348 Lint, Windows warnings.
WT-3351 Recovery assertion failure: old_lognum < lognum
WT-3354 Coverity issues 1375904-1375907
WT-3356 rwlock assertion failure on PPC
Branch: master
https://github.com/mongodb/mongo/commit/60341ff5b540ed35c8378910d92fe6c128f398e6

Comment by Githook User [ 18/Apr/17 ]

Author:

{u'username': u'keithbostic', u'name': u'Keith Bostic', u'email': u'keith.bostic@mongodb.com'}

Message: SERVER-28835 Fix a memory leak in WiredTiger on error when creating thread group. (#3394)

Coverity analysis defect 101330: Resource leak

Discard any allocated thread structure on error.
Branch: develop
https://github.com/wiredtiger/wiredtiger/commit/145b457de786695c2b3709356951e44e3d2833b4

Generated at Thu Feb 08 04:19:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.