{"action":"opened","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/2233","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/2233/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/2233/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/2233/events","html_url":"https://github.com/dotnet/coreclr/issues/2233","id":120436726,"number":2233,"title":"ArgumentOutOfRangeException When Tracing on Linux","user":{"login":"brianrob","id":6210322,"avatar_url":"https://avatars.githubusercontent.com/u/6210322?v=3","gravatar_id":"","url":"https://api.github.com/users/brianrob","html_url":"https://github.com/brianrob","followers_url":"https://api.github.com/users/brianrob/followers","following_url":"https://api.github.com/users/brianrob/following{/other_user}","gists_url":"https://api.github.com/users/brianrob/gists{/gist_id}","starred_url":"https://api.github.com/users/brianrob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianrob/subscriptions","organizations_url":"https://api.github.com/users/brianrob/orgs","repos_url":"https://api.github.com/users/brianrob/repos","events_url":"https://api.github.com/users/brianrob/events{/privacy}","received_events_url":"https://api.github.com/users/brianrob/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ramarag","id":10203266,"avatar_url":"https://avatars.githubusercontent.com/u/10203266?v=3","gravatar_id":"","url":"https://api.github.com/users/ramarag","html_url":"https://github.com/ramarag","followers_url":"https://api.github.com/users/ramarag/followers","following_url":"https://api.github.com/users/ramarag/following{/other_user}","gists_url":"https://api.github.com/users/ramarag/gists{/gist_id}","starred_url":"https://api.github.com/users/ramarag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramarag/subscriptions","organizations_url":"https://api.github.com/users/ramarag/orgs","repos_url":"https://api.github.com/users/ramarag/repos","events_url":"https://api.github.com/users/ramarag/events{/privacy}","received_events_url":"https://api.github.com/users/ramarag/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-12-04T16:29:01Z","updated_at":"2015-12-04T16:29:01Z","closed_at":null,"body":"When tracing on Linux, an ArgumentOutOfRangeException is thrown by the XplatEventLogger serialization code:\r\n\r\nSystem.Threading.Tasks.TaskSchedulerException: An exception was thrown by a TaskScheduler. ---> System.Diagnostics.Tracing.EventSourceException: An error occurred when writing to a listener. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index\r\n   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)\r\n   at System.SZArrayHelper.get_Item[T](Int32 index)\r\n   at System.Diagnostics.Tracing.XplatEventLogger.Serialize(ReadOnlyCollection`1 payloadName, ReadOnlyCollection`1 payload, String sep)\r\n   at System.Diagnostics.Tracing.XplatEventLogger.LogOnEventWritten(EventWrittenEventArgs eventData)\r\n   at System.Diagnostics.Tracing.EventSource.DispatchToAllListeners(Int32 eventId, Guid* childActivityID, EventWrittenEventArgs eventCallbackArgs)\r\n   --- End of inner exception stack trace ---\r\n   at System.Diagnostics.Tracing.EventSource.DispatchToAllListeners(Int32 eventId, Guid* childActivityID, EventWrittenEventArgs eventCallbackArgs)\r\n   at System.Diagnostics.Tracing.EventSource.WriteToAllListeners(Int32 eventId, Guid* childActivityID, Int32 eventDataCount, EventData* data)\r\n   at System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityIdCore(Int32 eventId, Guid* relatedActivityId, Int32 eventDataCount, EventData* data)\r\n   at System.Threading.Tasks.TplEtwProvider.TaskScheduled(Int32 OriginatingTaskSchedulerID, Int32 OriginatingTaskID, Int32 TaskID, Int32 CreatingTaskID, Int32 TaskCreationOptions, Int32 appDomain)\r\n   at System.Threading.Tasks.Task.ScheduleAndStart(Boolean needsProtection)\r\n   --- End of inner exception stack trace ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at Microsoft.Dnx.ApplicationHost.Program.Main(String[] args)\r\n"}}