[SERVER-30182] Unhandled exception in mongo::ClusterAggregate::runAggregate Created: 17/Jul/17  Updated: 06/Dec/22  Resolved: 03/Aug/17

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Sharding
Affects Version/s: 3.5.9
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Hannes Magnusson Assignee: Backlog - Query Team (Inactive)
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-30084 Invalid operation (Floating point exc... Closed
Related
related to CDRIVER-2217 Enable Windows Auth SSPI & WinSSL tes... Closed
Assigned Teams:
Query
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2017-08-21
Participants:

 Description   

2017-07-15T19:20:50.344+0000 I NETWORK  [conn6] received client metadata from 127.0.0.1:50730 conn: { driver: { name: "PyMongo", version: "3.4.0" }, os: { type: "Windows", name: "Windows 2008ServerR2", architecture: "AMD64", version: "6.1.7601-SP1" }, platform: "CPython 2.7.3.final.0" }
2017-07-15T19:20:50.413+0000 I CONTROL  [conn6] *** unhandled exception 0xC0000094 at 0x000000013F25E569, terminating
2017-07-15T19:20:50.413+0000 I CONTROL  [conn6] *** stack trace for unhandled exception:
2017-07-15T19:20:50.504+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\s\commands\cluster_aggregate.cpp(377)                              mongo::ClusterAggregate::runAggregate+0x1c29
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\s\commands\cluster_current_op.cpp(78)                              mongo::`anonymous namespace'::ClusterCurrentOpCommand::runAggregation+0x225
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\db\commands\current_op_common.cpp(103)                             mongo::CurrentOpCommandBase::run+0x9e8
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\db\commands.cpp(380)                                               mongo::BasicCommand::enhancedRun+0xd6
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\s\commands\strategy.cpp(225)                                       mongo::`anonymous namespace'::execCommandClient+0xb75
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\s\commands\strategy.cpp(266)                                       mongo::`anonymous namespace'::runAgainstRegistered+0x1b0
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\s\commands\strategy.cpp(288)                                       mongo::`anonymous namespace'::runCommand+0x1a6
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\s\commands\strategy.cpp(458)                                       mongo::Strategy::clientOpQueryCommand+0x816
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\s\service_entry_point_mongos.cpp(116)                              mongo::ServiceEntryPointMongos::handleRequest+0x7cf
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\transport\service_state_machine.cpp(286)                           mongo::ServiceStateMachine::processMessage+0x1ef
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\transport\service_state_machine.cpp(374)                           mongo::ServiceStateMachine::runNextInGuard+0x15d
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\transport\service_state_machine.cpp(226)                           mongo::ServiceStateMachine::sourceCallback+0x3f7
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\transport\service_state_machine.cpp(365)                           mongo::ServiceStateMachine::runNextInGuard+0x144
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\transport\service_state_machine.cpp(341)                           mongo::ServiceStateMachine::runNext+0x63
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\transport\service_entry_point_impl.cpp(96)                         <lambda_40d7539c95b32a10f7c3c73ad773ce09>::operator()+0xc9
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    ...\src\mongo\transport\service_entry_point_utils.cpp(55)                        mongo::`anonymous namespace'::runFunc+0x2d
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    c:\program files (x86)\microsoft visual studio 14.0\vc\include\thr\xthread(247)  std::_LaunchPad<std::unique_ptr<std::tuple<std::_Binder<std::_Unforced,void * __ptr64 (__cdecl&)(void * __ptr64),std::function<void __cdecl(void)> * __ptr64> >,std::default_delete<std::tuple<std::_Binder<std::_Unforced,void * __ptr64 (__cdecl&)(void * __ptr64),std::function<void __cdecl(void)> * __ptr64> > > > >::_Run+0x75
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] mongos.exe    c:\program files (x86)\microsoft visual studio 14.0\vc\include\thr\xthread(210)  std::_Pad::_Call_func+0x9
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] ucrtbase.DLL                                                                                   crt_at_quick_exit+0x7d
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] kernel32.dll                                                                                   BaseThreadInitThunk+0xd
2017-07-15T19:20:50.505+0000 I -        [conn6] 
2017-07-15T19:20:50.505+0000 I CONTROL  [conn6] writing minidump diagnostic file c:\mongodb\bin\mongos.2017-07-15T19-20-50.mdmp
2017-07-15T19:20:52.021+0000 I CONTROL  [conn6] *** immediate exit due to unhandled exception

Unfortunately our debug artifacts creation script does not pickup the mdmp file.

https://evergreen.mongodb.com/task/mongo_c_driver_windows_2010_test_latest_server_auth_sspi_winssl_28958699409eab410c894bdf48f64c718425eb01_17_07_14_19_40_25



 Comments   
Comment by Charlie Swanson [ 03/Aug/17 ]

Closing as duplicate - please let us know if this is not resolved.

Comment by Bernard Gorman [ 03/Aug/17 ]

charlie.swanson it does indeed. 0xC0000094 is a divide-by-zero exception, which per SERVER-30084 is caused when trying to select a random merging shard if $currentOp is run while there are zero shards in the cluster. cluster_aggregate.cpp(377) from the stack trace is here - the exception is thrown while attempting to do prng.nextInt32(0).

Comment by Charlie Swanson [ 03/Aug/17 ]

bernard.gorman does this look like the same issue as SERVER-30084?

Comment by Hannes Magnusson [ 19/Jul/17 ]

From what I can tell from the evergreen logs its just mongo-orchestration spinning up a sharded cluster with this config:
https://github.com/mongodb/mongo-c-driver/blob/master/orchestration_configs/sharded_clusters/auth-ssl.json

Comment by Charlie Swanson [ 19/Jul/17 ]

bjori do you have a script or something we can do to reproduce it?

Comment by Hannes Magnusson [ 19/Jul/17 ]

This is consistently reproducible: https://evergreen.mongodb.com/task/mongo_c_driver_windows_2010_32_test_latest_server_auth_sspi_winssl_4810f2ff6dbe3a6ad822501379662eb58c9c0bbc_17_07_19_19_10_55

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