[SERVER-29781] Method call on NULL TransportLayer pointer Created: 21/Jun/17  Updated: 30/Oct/23  Resolved: 23/Jun/17

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: 3.5.9
Fix Version/s: 3.5.10

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: Jonathan Reams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2017-07-10
Participants:

 Description   

Starting a mongod listening on a port which is already in use cases the following error, when running with ASAN and UBSAN:

sajack@spencerjacksonDesktop /home/sajack/mongo git SERVER-29688 () % ./mongod                                                              
2017-06-21T15:33:20.313-0400 I CONTROL  [initandlisten] MongoDB starting : pid=14024 port=27017 dbpath=/data/db 64-bit host=spencerjacksonDesktop.local                        
2017-06-21T15:33:20.314-0400 I CONTROL  [initandlisten] DEBUG build (which is slower)                                                       
2017-06-21T15:33:20.314-0400 I CONTROL  [initandlisten] db version v0.0.0                                                                   
2017-06-21T15:33:20.314-0400 I CONTROL  [initandlisten] git version: unknown                                                                
2017-06-21T15:33:20.314-0400 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.0f  25 May 2017                                        
2017-06-21T15:33:20.314-0400 I CONTROL  [initandlisten] allocator: system                                                                   
2017-06-21T15:33:20.314-0400 I CONTROL  [initandlisten] modules: ninja enterprise                                                           
2017-06-21T15:33:20.314-0400 I CONTROL  [initandlisten] build environment:                                                                  
2017-06-21T15:33:20.314-0400 I CONTROL  [initandlisten]     distarch: x86_64                                                                
2017-06-21T15:33:20.314-0400 I CONTROL  [initandlisten]     target_arch: x86_64                                                             
2017-06-21T15:33:20.314-0400 I CONTROL  [initandlisten] options: {}   
2017-06-21T15:33:20.314-0400 I STORAGE  [initandlisten] exception in initAndListen: 98 Unable to lock the lock file: /data/db/mongod.lock (Resource temporarily unavailable). Another mongod instance is already running on the /data/db directory, terminating                         
2017-06-21T15:33:20.314-0400 I NETWORK  [initandlisten] shutdown: going to close listening sockets...                                       
2017-06-21T15:33:20.314-0400 I NETWORK  [initandlisten] shutdown: going to flush diaglog...                                                 
2017-06-21T15:33:20.315-0400 I NETWORK  [initandlisten] shutdown: going to close all sockets because ASAN is active...                      
src/mongo/db/db.cpp:994:57: runtime error: member call on null pointer of type 'mongo::transport::TransportLayer'                           
SUMMARY: AddressSanitizer: undefined-behavior src/mongo/db/db.cpp:994:57 in



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

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-29781 Only shutdown TransportLayer if it was successfully created
Branch: master
https://github.com/mongodb/mongo/commit/a6754bc75a3082ac4a39fdbccc18ae4719e5039c

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