[SERVER-18228] Mongos segfault during shutdown Created: 27/Apr/15  Updated: 19/Sep/15  Resolved: 04/May/15

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.1.2
Fix Version/s: 3.1.3

Type: Bug Priority: Major - P3
Reporter: Adam Midvidy Assignee: Daniel Alabi
Resolution: Done Votes: 0
Labels: UT
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Run jstests/sharding/read_pref_cmd.js, but add a throw Error("Foo") to line 44 right after conn.setReadPref(mode, tagSets)

Sprint: Sharding 3 05/15/15
Participants:

 Description   

I don't have a good reproducer. It happened while running a failing jstest in a loop.

Stacktrace:

m30999| 2015-04-27T18:02:26.454-0400 D NETWORK  [Balancer] Socket recv() conn closed? 127.0.1.1:29000                                                                                                             
 m30999| 2015-04-27T18:02:26.454-0400 D NETWORK  [Balancer] SocketException: remote: 127.0.1.1:29000 error: 9001 socket exception [CLOSED] server [127.0.1.1:29000]                                                
 m30999| 2015-04-27T18:02:26.454-0400 I NETWORK  [Balancer] DBClientCursor::init call() failed                                                                                                                     
 m30999| mongos: src/third_party/boost-1.56.0/boost/smart_ptr/scoped_ptr.hpp:99: T* boost::scoped_ptr<T>::operator->() const [with T = mongo::DBClientCursor]: Assertion `px != 0' failed.                         
 m30999| 2015-04-27T18:02:26.462-0400 F -        [Balancer] Got signal: 6 (Aborted).                                                                                                                               
 m30999|                                                                                                                                                                                                           
 m30999|  0x107b74c 0x107aa0f 0x107ae33 0x7ffbf1c35d40 0x7ffbf1c35cc9 0x7ffbf1c390d8 0x7ffbf1c2eb86 0x7ffbf1c2ec32 0xbfc923 0xed67ab 0xf2864c 0xf27d99 0xeb4ea6 0x100971d 0x100cfb3 0x100cf1c 0x100ce98 0x100ce6e \
0x10ba1d5 0x7ffbf1fcc182 0x7ffbf1cf947d                                                                                                                                                                            
 m30999| ----- BEGIN BACKTRACE -----                                                                                                                                                                               
m30999|  mongos(mongo::printStackTrace(std::ostream&) 0x27) [0x107b74c]                                                                                                                                                  
 m30999|  mongos( 0xC7AA0F) [0x107aa0f]                                                                                                                                                                            
 m30999|  mongos( 0xC7AE33) [0x107ae33]                                                                                                                                                                            
 m30999|  libc.so.6( 0x36D40) [0x7ffbf1c35d40]                                                                                                                                                                     
 m30999|  libc.so.6(gsignal 0x39) [0x7ffbf1c35cc9]                                                                                                                                                                 
 m30999|  libc.so.6(abort 0x148) [0x7ffbf1c390d8]                                                                                                                                                                  
 m30999|  libc.so.6( 0x2FB86) [0x7ffbf1c2eb86]                                                                                                                                                                     
 m30999|  libc.so.6( 0x2FC32) [0x7ffbf1c2ec32]                                                                                                                                                                     
 m30999|  mongos(boost::scoped_ptr<mongo::DBClientCursor>::operator->() const 0x37) [0xbfc923]                                                                                                                             
 m30999|  mongos(mongo::CatalogManagerLegacy::getAllShards(std::vector<mongo::ShardType, std::allocator<mongo::ShardType> >*) 0x345) [0xed67ab]                                                                                                 
 m30999|  mongos(mongo::StaticShardInfo::reload() 0x48) [0xf2864c]                                                                                                                                              
 m30999|  mongos(mongo::Shard::reloadShardInfo() 0x13) [0xf27d99] 
 m30999|  mongos(mongo::Shard::reloadShardInfo() 0x13) [0xf27d99]                                                                                                                                               
 m30999|  mongos(mongo::Balancer::run() 0x1F8) [0xeb4ea6]                                                                                                                                                        
 m30999|  mongos(mongo::BackgroundJob::jobBody() 0x169) [0x100971d]                                                                                                                                             
 m30999|  mongos(void std::_Mem_fn<void (mongo::BackgroundJob::*)()>::operator()<, void>(mongo::BackgroundJob*) const 0x65) [0x100cfb3]                                                                                                                  
 m30999|  mongos(void std::_Bind<std::_Mem_fn<void (mongo::BackgroundJob::*)()> (mongo::BackgroundJob*)>::__call<void, , 0ul>(std::tuple<>&&, std::_Index_tuple<0ul>) 0x48) [0x100cf1c]                                                   
 m30999|  mongos(void std::_Bind<std::_Mem_fn<void (mongo::BackgroundJob::*)()> (mongo::BackgroundJob*)>::operator()<, void>() 0x28) [0x100ce98]                                                                                                     
 m30999|  mongos(boost::detail::thread_data<std::_Bind<std::_Mem_fn<void (mongo::BackgroundJob::*)()> (mongo::BackgroundJob*)> >::run() 0x1E) [0x100ce6e]                                                                                   
 m30999|  mongos( 0xCBA1D5) [0x10ba1d5]                                                                                                                                                                            
 m30999|  libpthread.so.0( 0x8182) [0x7ffbf1fcc182]                                                                                                                                                                
 m30999|  libc.so.6(clone 0x6D) [0x7ffbf1cf947d]



 Comments   
Comment by Githook User [ 04/May/15 ]

Author:

{u'username': u'alabid', u'name': u'Daniel Alabi', u'email': u'alabidan@gmail.com'}

Message: SERVER-18228 Use _safeCursor when iterating over config collection
Branch: master
https://github.com/mongodb/mongo/commit/803ada39de2a5b206eba1768b0a5e8c60b15e807

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