{"id":17700716,"url":"https://github.com/cdown/dstate","last_synced_at":"2025-03-31T02:28:33.373Z","repository":{"id":142271573,"uuid":"151348054","full_name":"cdown/dstate","owner":"cdown","description":"Quickly collect user and kernel stacks for hung tasks for debugging","archived":false,"fork":false,"pushed_at":"2023-05-19T13:55:53.000Z","size":14,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-06T07:30:53.577Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdown.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-03T01:52:05.000Z","updated_at":"2018-10-21T07:43:10.000Z","dependencies_parsed_at":"2024-10-24T21:24:19.607Z","dependency_job_id":"b8e57eaf-486d-43c7-9857-26c9b5ef86dc","html_url":"https://github.com/cdown/dstate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdown%2Fdstate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdown%2Fdstate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdown%2Fdstate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdown%2Fdstate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdown","download_url":"https://codeload.github.com/cdown/dstate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246405973,"owners_count":20771859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-24T17:42:54.022Z","updated_at":"2025-03-31T02:28:33.355Z","avatar_url":"https://github.com/cdown.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"`dstate` quickly allows you to get user and kernel stacks for hung threads.\n\"Quickly\" here is important, as getting stacks is by its very nature racy.\n\nThis is useful in order to debug the cause of becoming uninterruptible, and\nfinding code paths that are particularly susceptible to such states. An example\nof where it can come in useful is documented in [this\narticle](https://chrisdown.name/2018/04/17/kernel-adventures-the-curious-case-of-squashfs-stalls.html).\n\n# Requirements\n\nOther than Rust, there are no requirements. An optional dependency is\n[quickstack](https://github.com/yoshinorim/quickstack) if one wants userspace\nstacks, but dstate will work without it, only outputting kernel threads.\n\n# Example output\n\n    $ dstate\n    # 1459 (comm: utxvtd) (cmd: /usr/bin/urxvtd):\n\n    Kernel stack:\n\n    [\u003c0\u003e] __flush_work+0x10e/0x1c0\n    [\u003c0\u003e] n_tty_read+0x2cd/0x8a0\n    [\u003c0\u003e] tty_read+0x95/0x120\n    [\u003c0\u003e] __vfs_read+0x36/0x180\n    [\u003c0\u003e] vfs_read+0x8a/0x130\n    [\u003c0\u003e] ksys_read+0x4f/0xb0\n    [\u003c0\u003e] do_syscall_64+0x5b/0x170\n    [\u003c0\u003e] entry_SYSCALL_64_after_hwframe+0x44/0xa9\n    [\u003c0\u003e] 0xffffffffffffffff\n\n    Userspace stack:\n\n    Thread 1 (LWP 1459):\n    #01  0x000055fbe1b9dbd6 in rxvt_term::pty_fill () from /usr/bin/urxvtd\n    #02  0x000055fbe1b9fc58 in rxvt_term::pty_cb () from /usr/bin/urxvtd\n    #03  0x000055fbe1bb86ac in ev_invoke_pending () from /usr/bin/urxvtd\n    #04  0x000055fbe1bb8f51 in ev_run () from /usr/bin/urxvtd\n    #05  0x000055fbe1b986c6 in main () from /usr/bin/urxvtd\n\n    ---\n\n    # 296 (comm: btrfs-transacti) (cmd: ):\n\n    Kernel stack:\n\n    [\u003c0\u003e] io_schedule+0x12/0x40\n    [\u003c0\u003e] write_all_supers+0x418/0xa70 [btrfs]\n    [\u003c0\u003e] btrfs_commit_transaction+0x52c/0x8a0 [btrfs]\n    [\u003c0\u003e] transaction_kthread+0x13f/0x170 [btrfs]\n    [\u003c0\u003e] kthread+0x112/0x130\n    [\u003c0\u003e] ret_from_fork+0x35/0x40\n    [\u003c0\u003e] 0xffffffffffffffff\n\n    ---\n\n    # 21277 (comm: vim) (cmd: vim)\n\n    Kernel stack:\n\n    [\u003c0\u003e] io_schedule+0x12/0x40\n    [\u003c0\u003e] write_all_supers+0x418/0xa70 [btrfs]\n    [\u003c0\u003e] btrfs_sync_log+0x5e8/0x970 [btrfs]\n    [\u003c0\u003e] btrfs_sync_file+0x22a/0x430 [btrfs]\n    [\u003c0\u003e] do_fsync+0x38/0x70\n    [\u003c0\u003e] __x64_sys_fsync+0x10/0x20\n    [\u003c0\u003e] do_syscall_64+0x5b/0x170\n    [\u003c0\u003e] entry_SYSCALL_64_after_hwframe+0x44/0xa9\n    [\u003c0\u003e] 0xffffffffffffffff\n\n    Userspace stack:\n\n    Thread 1 (LWP 21277):\n    #01  0x00005645eed9486c in __libc_csu_fini () from /usr/bin/vim\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdown%2Fdstate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdown%2Fdstate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdown%2Fdstate/lists"}