{"action":"created","issue":{"url":"https://api.github.com/repos/status-im/status-react/issues/5012","repository_url":"https://api.github.com/repos/status-im/status-react","labels_url":"https://api.github.com/repos/status-im/status-react/issues/5012/labels{/name}","comments_url":"https://api.github.com/repos/status-im/status-react/issues/5012/comments","events_url":"https://api.github.com/repos/status-im/status-react/issues/5012/events","html_url":"https://github.com/status-im/status-react/issues/5012","id":337443040,"node_id":"MDU6SXNzdWUzMzc0NDMwNDA=","number":5012,"title":"Crashes and CPU overload while fetching long history (>500 messages)","user":{"login":"churik","id":4557972,"node_id":"MDQ6VXNlcjQ1NTc5NzI=","avatar_url":"https://avatars0.githubusercontent.com/u/4557972?v=4","gravatar_id":"","url":"https://api.github.com/users/churik","html_url":"https://github.com/churik","followers_url":"https://api.github.com/users/churik/followers","following_url":"https://api.github.com/users/churik/following{/other_user}","gists_url":"https://api.github.com/users/churik/gists{/gist_id}","starred_url":"https://api.github.com/users/churik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/churik/subscriptions","organizations_url":"https://api.github.com/users/churik/orgs","repos_url":"https://api.github.com/users/churik/repos","events_url":"https://api.github.com/users/churik/events{/privacy}","received_events_url":"https://api.github.com/users/churik/received_events","type":"User","site_admin":false},"labels":[{"id":782926578,"node_id":"MDU6TGFiZWw3ODI5MjY1Nzg=","url":"https://api.github.com/repos/status-im/status-react/labels/desktop","name":"desktop","color":"fcb099","default":false},{"id":517247009,"node_id":"MDU6TGFiZWw1MTcyNDcwMDk=","url":"https://api.github.com/repos/status-im/status-react/labels/high-priority","name":"high-priority","color":"000000","default":false},{"id":956251551,"node_id":"MDU6TGFiZWw5NTYyNTE1NTE=","url":"https://api.github.com/repos/status-im/status-react/labels/high-severity","name":"high-severity","color":"c91a34","default":false}],"state":"open","locked":false,"assignee":{"login":"MaxRis","id":1928902,"node_id":"MDQ6VXNlcjE5Mjg5MDI=","avatar_url":"https://avatars1.githubusercontent.com/u/1928902?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxRis","html_url":"https://github.com/MaxRis","followers_url":"https://api.github.com/users/MaxRis/followers","following_url":"https://api.github.com/users/MaxRis/following{/other_user}","gists_url":"https://api.github.com/users/MaxRis/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxRis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxRis/subscriptions","organizations_url":"https://api.github.com/users/MaxRis/orgs","repos_url":"https://api.github.com/users/MaxRis/repos","events_url":"https://api.github.com/users/MaxRis/events{/privacy}","received_events_url":"https://api.github.com/users/MaxRis/received_events","type":"User","site_admin":false},"assignees":[{"login":"MaxRis","id":1928902,"node_id":"MDQ6VXNlcjE5Mjg5MDI=","avatar_url":"https://avatars1.githubusercontent.com/u/1928902?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxRis","html_url":"https://github.com/MaxRis","followers_url":"https://api.github.com/users/MaxRis/followers","following_url":"https://api.github.com/users/MaxRis/following{/other_user}","gists_url":"https://api.github.com/users/MaxRis/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxRis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxRis/subscriptions","organizations_url":"https://api.github.com/users/MaxRis/orgs","repos_url":"https://api.github.com/users/MaxRis/repos","events_url":"https://api.github.com/users/MaxRis/events{/privacy}","received_events_url":"https://api.github.com/users/MaxRis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-07-02T09:41:25Z","updated_at":"2018-08-16T20:26:25Z","closed_at":null,"author_association":"NONE","body":"### User Story\r\n\r\nAs a user, I want to see all messages fetched correctly and I could use app (switch to profile, add new contacts etc.) simultaneously.\r\n\r\n### Description\r\n*Type*: Bug\r\n\r\n*Summary*: reproducible with last `status-go develop` branch (#5001). When you join public channels with 7-day history > 500 messages (i.e., #status) then:\r\n1) application hangs or crashes\r\n2) StatusIm CPU Usage ~99-102 % \r\n\r\nIMPORTANT NOTE: can be reproducible with chats with 50-100 messages when you switching between chats during fetching messages or when you add new chat and switch to it when messages are not fetched yet. Not 100 % but I faced with it already 10+ times.\r\n\r\n#### Expected behavior\r\napp is responsive\r\n\r\n#### Actual behavior\r\napplication hangs, then crashes\r\n![hhh](https://user-images.githubusercontent.com/4557972/42156760-9e90496c-7df4-11e8-8d85-0eba7d4905af.png)\r\n\r\n### Reproduction\r\n\r\n- Open Status\r\n- Join channel with history > 500 messages in 7 days (i.e.`#status`)\r\n- Try to scroll message history or switch to profile; pay attention to CPU usage.\r\n\r\n\r\n\r\n### Additional Information\r\n[comment]: # (Please do your best to fill this out.)\r\n* Status version: [PR-5001](https://jenkins.status.im/job/status-react/job/desktop/job/pull-requests/view/change-requests/job/PR-5001/)\r\n* Operating System: MacOS High Sierra\r\n\r\n#### Logs\r\n\r\n* NOTE:  after crash you should manually exit `ubuntu-server` process an restart app to continue.\r\n* Full StatusIm log: \r\n[StatusIm.log](https://github.com/status-im/status-react/files/2158713/StatusIm.log)\r\n\r\n```\r\nProcess:               StatusIm [13208]\r\nPath:                  /Users/*/Downloads/*/StatusIm.app/Contents/MacOS/StatusIm\r\nIdentifier:            StatusIm\r\nVersion:               0\r\nCode Type:             X86-64 (Native)\r\nParent Process:        ??? [1]\r\nResponsible:           StatusIm [13208]\r\nUser ID:               502\r\n\r\nDate/Time:             2018-07-03 12:47:20.048 +0300\r\nOS Version:            Mac OS X 10.13.5 (17F77)\r\nReport Version:        12\r\nAnonymous UUID:        93B7A170-78AE-1670-E0DF-EF45503C77C4\r\n\r\nSleep/Wake UUID:       5C4FB9E8-003B-4AC9-BA2D-C421DA3DB707\r\n\r\nTime Awake Since Boot: 110000 seconds\r\nTime Since Wake:       21000 seconds\r\n\r\nSystem Integrity Protection: enabled\r\n\r\nCrashed Thread:        0  CrBrowserMain  Dispatch queue: com.apple.main-thread\r\n\r\nException Type:        EXC_BAD_ACCESS (SIGSEGV)\r\nException Codes:       KERN_INVALID_ADDRESS at 0x00007fcf953ffff8\r\nException Note:        EXC_CORPSE_NOTIFY\r\n\r\nTermination Signal:    Segmentation fault: 11\r\nTermination Reason:    Namespace SIGNAL, Code 0xb\r\nTerminating Process:   exc handler [0]\r\n\r\nVM Regions Near 0x7fcf953ffff8:\r\n    MALLOC_SMALL           00007fcf93800000-00007fcf95000000 [ 24.0M] rw-/rwx SM=PRV  \r\n--> \r\n    MALLOC_TINY            00007fcf95400000-00007fcf95800000 [ 4096K] rw-/rwx SM=PRV  \r\n\r\nThread 0 Crashed:: CrBrowserMain  Dispatch queue: com.apple.main-thread\r\n0   libsystem_platform.dylib      \t0x00007fff6ac7e169 _platform_memmove$VARIANT$Haswell + 585\r\n1   StatusIm                      \t0x0000000108c228ce 0x108bbf000 + 407758\r\n2   StatusIm                      \t0x0000000108c225a9 YGNode::insertChild(YGNode*, unsigned int) + 41\r\n3   StatusIm                      \t0x0000000108c14c5d YGNodeInsertChild + 125\r\n....\r\n\r\n```\r\n [full log](https://github.com/status-im/status-react/files/2158707/AppleCrashLog.log)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/status-im/status-react/issues/comments/413673800","html_url":"https://github.com/status-im/status-react/issues/5012#issuecomment-413673800","issue_url":"https://api.github.com/repos/status-im/status-react/issues/5012","id":413673800,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzY3MzgwMA==","user":{"login":"MaxRis","id":1928902,"node_id":"MDQ6VXNlcjE5Mjg5MDI=","avatar_url":"https://avatars1.githubusercontent.com/u/1928902?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxRis","html_url":"https://github.com/MaxRis","followers_url":"https://api.github.com/users/MaxRis/followers","following_url":"https://api.github.com/users/MaxRis/following{/other_user}","gists_url":"https://api.github.com/users/MaxRis/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxRis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxRis/subscriptions","organizations_url":"https://api.github.com/users/MaxRis/orgs","repos_url":"https://api.github.com/users/MaxRis/repos","events_url":"https://api.github.com/users/MaxRis/events{/privacy}","received_events_url":"https://api.github.com/users/MaxRis/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T20:26:25Z","updated_at":"2018-08-16T20:26:25Z","author_association":"MEMBER","body":"Update:\r\n\r\nHigh CPU overloading issue on scrolling of long chat history is resolved by ScrollView optimization.\r\n\r\nMost of known crashes still have the source in uimanager::manageChildren method which triggers call of `YGNode::insertChild` where the assert and crash appears.\r\n\r\nCrash happens (in known cases), because on adding of new Child node into yoga layout the Child node already has another parent set. It's important to find out the core reason which breaks the logic.\r\n"}}
{"actor":{"display_login":"MaxRis"}}