anthonydresser / testissues

0 stars 0 forks source link

Expanding a database that is in state COPYING kills connection #3100

Open anthonydresser opened 4 years ago

anthonydresser commented 4 years ago

Issue Type: Bug

Steps to reproduce:

At this point the error below occurs and the server connection is reset to disconnected:

Microsoft.SqlServer.Management.Common.ConnectionFailureException: Failed to connect to server prod-jedlix-replicationsqlserver.database.windows.net. ---> Microsoft.Data.SqlClient.SqlException: Login failed for user '<token-identified principal>'.
at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at Microsoft.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool, SqlAuthenticationProviderManager sqlAuthProviderManager)
at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at Microsoft.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at Microsoft.Data.SqlClient.SqlConnection.Open()
at Microsoft.SqlServer.Management.Common.ConnectionManager.InternalConnect()
at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Management.Common.ConnectionManager.Connect()
at Microsoft.SqlServer.Management.Common.ConnectionManager.PoolConnect()
at Microsoft.SqlServer.Management.Common.ConnectionManager.get_IsContainedAuthentication()
at Microsoft.SqlServer.Management.Sdk.Sfc.ConnectionHelpers.UpdateConnectionInfoIfContainedAuthentication(Object& connectionInfo, Urn urn)
at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(Object connectionInfo, Request request)
at Microsoft.SqlServer.Management.Smo.ExecutionManager.GetEnumeratorDataReader(Request req)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetInitDataReader(String[] fields, OrderBy[] orderby)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ImplInitialize(String[] fields, OrderBy[] orderby)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.Initialize(Boolean allProperties)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.OnPropertyMissing(String propname, Boolean useDefaultValue)
at Microsoft.SqlServer.Management.Smo.PropertyCollection.RetrieveProperty(Int32 index, Boolean useDefaultOnMissingValue)
at Microsoft.SqlServer.Management.Smo.Database.get_IsSqlDw()
at Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel.DatabaseTreeNode.EnsureContextInitialized() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\ObjectExplorer\SmoModel\DatabaseTreeNode.cs:line 41
at Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel.SmoTreeNode.GetContext() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\ObjectExplorer\SmoModel\SmoTreeNode.cs:line 98
at Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes.TreeNode.GetContextAs[T]() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\ObjectExplorer\Nodes\TreeNode.cs:line 310
at Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel.DatabaseTreeNode.PopulateChildren(Boolean refresh, String name, CancellationToken cancellationToken) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\ObjectExplorer\SmoModel\DatabaseTreeNode.cs:line 55
at Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes.TreeNode.Expand(String name, CancellationToken cancellationToken) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\ObjectExplorer\Nodes\TreeNode.cs:line 248
at Microsoft.SqlTools.ServiceLayer.ObjectExplorer.ObjectExplorerService.<>c__DisplayClass36_0.<QueueExpandNodeRequest>b__0(IBindingContext bindingContext, CancellationToken cancelToken) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\ObjectExplorer\ObjectExplorerService.cs:line 440
at Microsoft.SqlTools.ServiceLayer.LanguageServices.BindingQueue`1.<>c__DisplayClass34_2.<ProcessQueue>b__1() in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\LanguageServices\BindingQueue.cs:line 352

This issue might be similar to -6300 but has a different error message.

Azure Data Studio version: azuredatastudio-insiders 1.19.0-insider (65a4a56fd7311d059124bfb2d6a0b451d584e610, 2020-05-22T05:33:14.497Z) OS version: Windows_NT x64 10.0.18363

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-8950HK CPU - 2.90GHz (12 x 2904)| |GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.74GB (11.92GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|
Extensions: none
adstestbot[bot] commented 4 years ago

Thanks for submitting this issue. Please also check if it is already covered by an existing one, like: