{"action":"created","issue":{"url":"https://api.github.com/repos/pmodels/argobots/issues/12","repository_url":"https://api.github.com/repos/pmodels/argobots","labels_url":"https://api.github.com/repos/pmodels/argobots/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/pmodels/argobots/issues/12/comments","events_url":"https://api.github.com/repos/pmodels/argobots/issues/12/events","html_url":"https://github.com/pmodels/argobots/issues/12","id":201921371,"node_id":"MDU6SXNzdWUyMDE5MjEzNzE=","number":12,"title":"Methods to print stack traces of all ULTs in a core dump","user":{"login":"smseo","id":9056965,"node_id":"MDQ6VXNlcjkwNTY5NjU=","avatar_url":"https://avatars0.githubusercontent.com/u/9056965?v=4","gravatar_id":"","url":"https://api.github.com/users/smseo","html_url":"https://github.com/smseo","followers_url":"https://api.github.com/users/smseo/followers","following_url":"https://api.github.com/users/smseo/following{/other_user}","gists_url":"https://api.github.com/users/smseo/gists{/gist_id}","starred_url":"https://api.github.com/users/smseo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smseo/subscriptions","organizations_url":"https://api.github.com/users/smseo/orgs","repos_url":"https://api.github.com/users/smseo/repos","events_url":"https://api.github.com/users/smseo/events{/privacy}","received_events_url":"https://api.github.com/users/smseo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-01-19T17:15:41Z","updated_at":"2018-09-13T13:43:59Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Question from Liwei (Intel): Are you aware of any tools or methods that can print stack traces of all ULTs in a core dump? I have once encountered a deadlock among ULTs of the same ES. Although the very issue was easy enough to see with only traces of the active ULT, it would be more convincing if I could easily access the stack traces of the inactive ULTs too.\r\n"},"comment":{"url":"https://api.github.com/repos/pmodels/argobots/issues/comments/421011822","html_url":"https://github.com/pmodels/argobots/issues/12#issuecomment-421011822","issue_url":"https://api.github.com/repos/pmodels/argobots/issues/12","id":421011822,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTAxMTgyMg==","user":{"login":"shintaro-iwasaki","id":15073003,"node_id":"MDQ6VXNlcjE1MDczMDAz","avatar_url":"https://avatars3.githubusercontent.com/u/15073003?v=4","gravatar_id":"","url":"https://api.github.com/users/shintaro-iwasaki","html_url":"https://github.com/shintaro-iwasaki","followers_url":"https://api.github.com/users/shintaro-iwasaki/followers","following_url":"https://api.github.com/users/shintaro-iwasaki/following{/other_user}","gists_url":"https://api.github.com/users/shintaro-iwasaki/gists{/gist_id}","starred_url":"https://api.github.com/users/shintaro-iwasaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shintaro-iwasaki/subscriptions","organizations_url":"https://api.github.com/users/shintaro-iwasaki/orgs","repos_url":"https://api.github.com/users/shintaro-iwasaki/repos","events_url":"https://api.github.com/users/shintaro-iwasaki/events{/privacy}","received_events_url":"https://api.github.com/users/shintaro-iwasaki/received_events","type":"User","site_admin":false},"created_at":"2018-09-13T13:43:59Z","updated_at":"2018-09-13T13:43:59Z","author_association":"NONE","body":"@johannlombardi. Thank you! The implementation itself I plan (except stack unwinding if supported) should not be complicated. I hope I can make a prototype soon (hopefully within next week).\r\n\r\n___\r\n\r\n@bfaccini. We won't support stack unwinding for now. What I am thinking is simply printing a stack like this:\r\n```\r\nvoid ABT_info_print_thread_stack(FILE *fp, ABT_thread thread) {\r\n  ABTI_thread *p_thread = ABTI_thread_get_ptr(thread);\r\n  if (p_thread->attr.stacksize)\r\n    fwrite(p_thread->attr.p_stack, sizeof(char), p_thread->attr.stacksize, fp);\r\n}\r\n```\r\nWe know it is not human friendly, while it should be better than nothing for debugging.\r\nThe very next PR won't include stack unwinding. However, it should be very useful for debugging, and can be a separate commit.\r\n\r\n___\r\n\r\nAbout coherence, there is no way to pause other schedulers in Argobots for now, so Argobots just does the best effort. For example, if the program suffers from livelock, printed ones might not be a coherent snapshot. The output of these functions might be slightly different because a pool can be shared among execution streams and a scheduler can be also shared in case where a stackable scheduler is pushed into a shared pool. Higher-level functions (`all_thread_stacks` > `all_thread_stacks_in_xstream` > ... ) will eliminate the duplication and show more consistent results.\r\n\r\nIt might be possible to stop the other execution streams by sending a signal, but there might be a significant side effect. It won't be added in the next PR.\r\n\r\nI note that the current technique won't show currently running ULTs, suspended ULTs (e.g., `ABT_self_suspend` and `ABT_thread_join`), and ULTs that are about to run.\r\n"}}
{"actor":{"display_login":"shintaro-iwasaki"}}