{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/16510","repository_url":"https://api.github.com/repos/dotnet/coreclr","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/16510/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/16510/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/16510/events","html_url":"https://github.com/dotnet/coreclr/issues/16510","id":299524388,"number":16510,"title":"dotnet core 2.1.4 bug with large dictionaries of <string, double?>.  \"Aborted, core dumped\"","user":{"login":"Petermarcu","id":8228359,"avatar_url":"https://avatars3.githubusercontent.com/u/8228359?v=4","gravatar_id":"","url":"https://api.github.com/users/Petermarcu","html_url":"https://github.com/Petermarcu","followers_url":"https://api.github.com/users/Petermarcu/followers","following_url":"https://api.github.com/users/Petermarcu/following{/other_user}","gists_url":"https://api.github.com/users/Petermarcu/gists{/gist_id}","starred_url":"https://api.github.com/users/Petermarcu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Petermarcu/subscriptions","organizations_url":"https://api.github.com/users/Petermarcu/orgs","repos_url":"https://api.github.com/users/Petermarcu/repos","events_url":"https://api.github.com/users/Petermarcu/events{/privacy}","received_events_url":"https://api.github.com/users/Petermarcu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-22T22:01:15Z","updated_at":"2018-02-23T13:02:02Z","closed_at":null,"author_association":"MEMBER","body":"@errantmind commented on [Thu Feb 22 2018](https://github.com/dotnet/core/issues/1277)\n\n### Description\r\nOn Ubuntu 16.04 LTS, in a 'command line' app, creating a large dictionary of type <string, double?> crashes the application but creating the same dictionary a type of <string, double> does not.  This bug only affects Linux and does not appear when running the same code on Windows.\r\n\r\nIn our app we have an unrolled loop (not relevant to this bug to my knowledge) where we add 16504 entries of <\"some unique key\",null> to the dictionary.  This causes the program to crash with an error of \"Aborted, core dumped\". When we change the dictionary to additions to do <\"some unique key\", double.MinValue> it works just fine.  Here is a sample of the failing code and successful code : \r\n\r\n### Failure Case\r\nvar dict =  new Dictionary<string, double?>(); \r\ndict.Add(\"JAN_SUN_1|00:00:00\", null);\r\ndict.Add(\"JAN_SUN_1|00:30:00\", null);\r\ndict.Add(\"JAN_SUN_1|01:00:00\", null);\r\ndict.Add(\"JAN_SUN_1|01:30:00\", null);\r\ndict.Add(\"JAN_SUN_1|02:00:00\", null);\r\ndict.Add(\"JAN_SUN_1|02:30:00\", null);\r\ndict.Add(\"JAN_SUN_1|03:00:00\", null);\r\ndict.Add(\"JAN_SUN_1|03:30:00\", null);\r\ndict.Add(\"JAN_SUN_1|04:00:00\", null);\r\ndict.Add(\"JAN_SUN_1|04:30:00\", null);\r\ndict.Add(\"JAN_SUN_1|05:00:00\", null);\r\n... 16504 times\r\nreturn dict;\r\n\r\n### Success Case\r\nvar dict =  new Dictionary<string, double>(); \r\nvar minValue = double.MinValue;\r\ndict.Add(\"JAN_SUN_1|00:00:00\", minValue);\r\ndict.Add(\"JAN_SUN_1|00:30:00\", minValue);\r\ndict.Add(\"JAN_SUN_1|01:00:00\", minValue);\r\ndict.Add(\"JAN_SUN_1|01:30:00\", minValue);\r\ndict.Add(\"JAN_SUN_1|02:00:00\", minValue);\r\ndict.Add(\"JAN_SUN_1|02:30:00\", minValue);\r\ndict.Add(\"JAN_SUN_1|03:00:00\", minValue);\r\ndict.Add(\"JAN_SUN_1|03:30:00\", minValue);\r\ndict.Add(\"JAN_SUN_1|04:00:00\", minValue);\r\ndict.Add(\"JAN_SUN_1|04:30:00\", minValue);\r\ndict.Add(\"JAN_SUN_1|05:00:00\", minValue);\r\n... 16504 times\r\nreturn dict;\n\n"},"comment":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/comments/368003178","html_url":"https://github.com/dotnet/coreclr/issues/16510#issuecomment-368003178","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/16510","id":368003178,"user":{"login":"svick","id":287848,"avatar_url":"https://avatars3.githubusercontent.com/u/287848?v=4","gravatar_id":"","url":"https://api.github.com/users/svick","html_url":"https://github.com/svick","followers_url":"https://api.github.com/users/svick/followers","following_url":"https://api.github.com/users/svick/following{/other_user}","gists_url":"https://api.github.com/users/svick/gists{/gist_id}","starred_url":"https://api.github.com/users/svick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svick/subscriptions","organizations_url":"https://api.github.com/users/svick/orgs","repos_url":"https://api.github.com/users/svick/repos","events_url":"https://api.github.com/users/svick/events{/privacy}","received_events_url":"https://api.github.com/users/svick/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T13:02:02Z","updated_at":"2018-02-23T13:02:02Z","author_association":"CONTRIBUTOR","body":"I can't reproduce this on .Net Core 2.0.5 (using .Net Core SDK 2.1.4) on Ubuntu 16.04. What I tried:\r\n\r\n```c#\r\nusing System;\r\nusing System.Collections.Generic;\r\n\r\nclass Program\r\n{\r\n    static void Main()\r\n    {\r\n        var dict = new Dictionary<string, double?>();\r\n        for (int i = 0; i < 20000; i++)\r\n            dict.Add(i.ToString(), null);\r\n    }\r\n}\r\n```\r\n\r\nAnd also:\r\n\r\n```c#\r\nusing System;\r\nusing System.Collections.Generic;\r\n\r\nclass Program\r\n{\r\n    static void Main()\r\n    {\r\n        var dict = new Dictionary<string, double?>();\r\n        dict.Add(\"0\", null);\r\n        dict.Add(\"1\", null);\r\n        dict.Add(\"2\", null);\r\n        dict.Add(\"3\", null);\r\n        dict.Add(\"4\", null);\r\n        dict.Add(\"5\", null);\r\n        dict.Add(\"6\", null);\r\n        dict.Add(\"7\", null);\r\n        dict.Add(\"8\", null);\r\n        dict.Add(\"9\", null);\r\n        dict.Add(\"10\", null);\r\n        …\r\n        dict.Add(\"19999\", null);\r\n    }\r\n}\r\n```\r\n\r\nCan you provide a full example that reproduces the issue (including Program.cs, .csproj and how you run the project)?"}}
{"actor":{"display_login":"svick"}}