{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/7599","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/7599/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/7599/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/7599/events","html_url":"https://github.com/dotnet/corefx/issues/7599","id":147027894,"number":7599,"title":"Linux: ArgumentOutOfRangeException on multi-row insert on SQL Azure","user":{"login":"AndriySvyryd","id":6539701,"avatar_url":"https://avatars.githubusercontent.com/u/6539701?v=3","gravatar_id":"","url":"https://api.github.com/users/AndriySvyryd","html_url":"https://github.com/AndriySvyryd","followers_url":"https://api.github.com/users/AndriySvyryd/followers","following_url":"https://api.github.com/users/AndriySvyryd/following{/other_user}","gists_url":"https://api.github.com/users/AndriySvyryd/gists{/gist_id}","starred_url":"https://api.github.com/users/AndriySvyryd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndriySvyryd/subscriptions","organizations_url":"https://api.github.com/users/AndriySvyryd/orgs","repos_url":"https://api.github.com/users/AndriySvyryd/repos","events_url":"https://api.github.com/users/AndriySvyryd/events{/privacy}","received_events_url":"https://api.github.com/users/AndriySvyryd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/corefx/labels/aspnet","name":"aspnet","color":"0052cc"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/blocking-partner","name":"blocking-partner","color":"e11d21"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/Linux","name":"Linux","color":"fef2c0"},{"url":"https://api.github.com/repos/dotnet/corefx/labels/System.Net","name":"System.Net","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"bartonjs","id":10642668,"avatar_url":"https://avatars.githubusercontent.com/u/10642668?v=3","gravatar_id":"","url":"https://api.github.com/users/bartonjs","html_url":"https://github.com/bartonjs","followers_url":"https://api.github.com/users/bartonjs/followers","following_url":"https://api.github.com/users/bartonjs/following{/other_user}","gists_url":"https://api.github.com/users/bartonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bartonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartonjs/subscriptions","organizations_url":"https://api.github.com/users/bartonjs/orgs","repos_url":"https://api.github.com/users/bartonjs/repos","events_url":"https://api.github.com/users/bartonjs/events{/privacy}","received_events_url":"https://api.github.com/users/bartonjs/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/6","html_url":"https://github.com/dotnet/corefx/milestones/1.0.0-rc2","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/6/labels","id":1365455,"number":6,"title":"1.0.0-rc2","description":"","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":588,"state":"open","created_at":"2015-10-20T04:29:15Z","updated_at":"2016-04-12T18:13:49Z","due_on":"2016-04-22T07:00:00Z","closed_at":null},"comments":7,"created_at":"2016-04-08T20:12:39Z","updated_at":"2016-04-12T19:10:45Z","closed_at":null,"body":"I get:\r\n```\r\n ---- System.Data.SqlClient.SqlException : A transport-level error has occurred when sending the request to the server. (provider: TCP Provider, error: 35 - An internal exception was caught)\r\n -------- System.IO.IOException : The write operation failed, see inner exception.\r\n ------------ System.ArgumentOutOfRangeException : Specified argument was out of the range of valid values.\r\n Parameter name: size\r\n    at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, TdsParserStateObject stateObj, Boolean isCommandProc, Boolean sync, TaskCompletionSource`1 completion, Int32 startRpc, Int32 startParam)\r\n    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)\r\n    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)\r\n    at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, String executeMethod, IReadOnlyDictionary`2 parameterValues, Boolean openConnection, Boolean closeConnection)\r\n    at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues, Boolean manageConnection)\r\n    at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(IRelationalConnection connection)\r\n ----- Inner Stack Trace -----\r\n    at System.Net.Security.SslStreamInternal.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)\r\n    at System.Net.Security.SslStream.Write(Byte[] buffer, Int32 offset, Int32 count)\r\n    at System.Data.SqlClient.SNI.SNITCPHandle.Send(SNIPacket packet)\r\n ----- Inner Stack Trace -----\r\n    at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)\r\n    at System.Data.SqlClient.SNI.SslOverTdsStream.Write(Byte[] buffer, Int32 offset, Int32 count)\r\n    at System.Net.Security.SslStreamInternal.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)\r\n```\r\nWhen running\r\n```SQL\r\nSET NOCOUNT ON;\r\nDECLARE @toInsert2 TABLE ([Color] nvarchar(15), [DiscontinuedDate] datetime, [ListPrice] money, [Name] nvarchar(450), [ProductCategoryID] int, [ProductModelID] int, [ProductNumber] nvarchar(25), [SellEndDate] datetime, [SellStartDate] datetime, [Size] nvarchar(5), [StandardCost] money, [ThumbNailPhoto] varbinary(max), [ThumbnailPhotoFileName] nvarchar(50), [Weight] decimal, [_Position] [int]);\r\nINSERT INTO @toInsert2\r\nVALUES (@p0, @p1, @p2, @p3, @p4, @p5, @p6, @p7, @p8, @p9, @p10, @p11, @p12, @p13, 0),\r\n(@p14, @p15, @p16, @p17, @p18, @p19, @p20, @p21, @p22, @p23, @p24, @p25, @p26, @p27, 1);\r\n\r\nDECLARE @inserted2 TABLE ([ProductID] int, [Color] nvarchar(15), [DiscontinuedDate] datetime, [ListPrice] money, [ModifiedDate] datetime, [Name] nvarchar(450), [ProductCategoryID] int, [ProductModelID] int, [ProductNumber] nvarchar(25), [SellEndDate] datetime, [SellStartDate] datetime, [Size] nvarchar(5), [StandardCost] money, [ThumbNailPhoto] varbinary(max), [ThumbnailPhotoFileName] nvarchar(50), [Weight] decimal, [rowguid] uniqueidentifier, [_Position] [int]);\r\nMERGE [SalesLT].[Product] USING @toInsert2 AS i ON 1=0\r\nWHEN NOT MATCHED THEN\r\nINSERT ([Color], [DiscontinuedDate], [ListPrice], [Name], [ProductCategoryID], [ProductModelID], [ProductNumber], [SellEndDate], [SellStartDate], [Size], [StandardCost], [ThumbNailPhoto], [ThumbnailPhotoFileName], [Weight])\r\nVALUES (i.[Color], i.[DiscontinuedDate], i.[ListPrice], i.[Name], i.[ProductCategoryID], i.[ProductModelID], i.[ProductNumber], i.[SellEndDate], i.[SellStartDate], i.[Size], i.[StandardCost], i.[ThumbNailPhoto], i.[ThumbnailPhotoFileName], i.[Weight])\r\nOUTPUT INSERTED.[ProductID], INSERTED.[Color], INSERTED.[DiscontinuedDate], INSERTED.[ListPrice], INSERTED.[ModifiedDate], INSERTED.[Name], INSERTED.[ProductCategoryID], INSERTED.[ProductModelID], INSERTED.[ProductNumber], INSERTED.[SellEndDate], INSERTED.[SellStartDate], INSERTED.[Size], INSERTED.[StandardCost], INSERTED.[ThumbNailPhoto], INSERTED.[ThumbnailPhotoFileName], INSERTED.[Weight], INSERTED.[rowguid], i._Position\r\nINTO @inserted2;\r\n\r\nSELECT [ProductID], [ModifiedDate], [rowguid] FROM @inserted2\r\nORDER BY _Position;\r\n```\r\nwith\r\n```SQL\r\n`@p0 nvarchar(max) ,@p1 datetime2(7),@p2 decimal(1,0),@p3 nvarchar(4000),@p4 int,@p5 int,@p6 nvarchar(4000),@p7 datetime2(7),@p8 datetime2(7),@p9 nvarchar(max) ,@p10 decimal(1,0),@p11 varbinary(max) ,@p12 nvarchar(max) ,@p13 decimal(4,0),@p14 nvarchar(max) ,@p15 datetime2(7),@p16 decimal(1,0),@p17 nvarchar(4000),@p18 int,@p19 int,@p20 nvarchar(4000),@p21 datetime2(7),@p22 datetime2(7),@p23 nvarchar(max) ,@p24 decimal(1,0),@p25 varbinary(max) ,@p26 nvarchar(max) ,@p27 decimal(4,0)',\r\n@p0=NULL,@p1=NULL,@p2=0,@p3=N'1705deb0-2dff-40d1-a40e-f3ff1c42e36d',@p4=NULL,@p5=NULL,@p6=N'1705deb0-2dff-40d1-a40e-f',@p7=NULL,@p8='2016-04-08 13:03:35.3168817',@p9=NULL,@p10=0,@p11=NULL,@p12=NULL,@p13=1000,@p14=NULL,@p15=NULL,@p16=0,@p17=N'5c6dc402-ab8c-4f7f-a40d-945c0491c8b8',@p18=NULL,@p19=NULL,@p20=N'5c6dc402-ab8c-4f7f-a40d-9',@p21=NULL,@p22='2016-04-08 13:03:35.8103840',@p23=NULL,@p24=0,@p25=NULL,@p26=NULL,@p27=1000\r\n```\r\n\r\nOn Linux CoreCLR against [adventureworks.zip](https://github.com/dotnet/corefx/files/210782/adventureworks.zip)\r\n\r\nSee aspnet/EntityFramework#4228\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/209058086","html_url":"https://github.com/dotnet/corefx/issues/7599#issuecomment-209058086","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/7599","id":209058086,"user":{"login":"bartonjs","id":10642668,"avatar_url":"https://avatars.githubusercontent.com/u/10642668?v=3","gravatar_id":"","url":"https://api.github.com/users/bartonjs","html_url":"https://github.com/bartonjs","followers_url":"https://api.github.com/users/bartonjs/followers","following_url":"https://api.github.com/users/bartonjs/following{/other_user}","gists_url":"https://api.github.com/users/bartonjs/gists{/gist_id}","starred_url":"https://api.github.com/users/bartonjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartonjs/subscriptions","organizations_url":"https://api.github.com/users/bartonjs/orgs","repos_url":"https://api.github.com/users/bartonjs/repos","events_url":"https://api.github.com/users/bartonjs/events{/privacy}","received_events_url":"https://api.github.com/users/bartonjs/received_events","type":"User","site_admin":false},"created_at":"2016-04-12T19:10:45Z","updated_at":"2016-04-12T19:10:45Z","body":"It looks like a debug build of System.Net.Security sees this as an assert:\r\n\r\nhttps://github.com/dotnet/corefx/blob/2ff9b2a1e367a9694af6bdaf9856ea12f9ae13cd/src/Common/src/Interop/Unix/libssl/Interop.OpenSsl.cs#L196\r\n\r\nStill looking."}}