{"id":50888614,"url":"https://github.com/python1320/gmsv_segfault","last_synced_at":"2026-06-16T20:00:58.823Z","repository":{"id":363667111,"uuid":"1264366712","full_name":"Python1320/gmsv_segfault","owner":"Python1320","description":"Zero runtime cost segfault debugging module for Garry's Mod [old]","archived":false,"fork":false,"pushed_at":"2026-06-09T21:50:24.000Z","size":34,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-15T19:38:34.967Z","etag":null,"topics":["binary-module","debugging","debugging-tool","garrysmod"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Python1320.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-09T20:22:47.000Z","updated_at":"2026-06-11T16:16:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Python1320/gmsv_segfault","commit_stats":null,"previous_names":["python1320/gmsv_segfault"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Python1320/gmsv_segfault","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Python1320%2Fgmsv_segfault","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Python1320%2Fgmsv_segfault/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Python1320%2Fgmsv_segfault/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Python1320%2Fgmsv_segfault/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Python1320","download_url":"https://codeload.github.com/Python1320/gmsv_segfault/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Python1320%2Fgmsv_segfault/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34421326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["binary-module","debugging","debugging-tool","garrysmod"],"created_at":"2026-06-15T19:30:26.423Z","updated_at":"2026-06-16T20:00:58.818Z","avatar_url":"https://github.com/Python1320.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gmsv_segfault\n\n\u003e [!WARNING]  \n\u003e HERE BE DRAGONS\n\n*VERY EXPERIMENTAL (and old) Garry's Mod server binary module for crash signal handling and debugging.*\n*Used on [Metastruct](https://metastruct.github.io) and partner servers for past ~10 years for the (very frequent) crash reason debugging.*\n\n\u003cimg width=\"788\" height=\"463\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8378e9d5-a182-4f95-8c38-838d4cad7cbc\" /\u003e\n\nCatches fatal signals (SIGSEGV, SIGABRT, SIGBUS, SIGILL, SIGQUIT, SIGHUP, SIGUSR1, SIGUSR2) and dumps:\n- Signal info and fault address\n- CPU register state\n- C++ backtrace via libunwind (with demangled symbols)\n- Lua stack trace and stack contents\n- Thread crash detection\n\n**Example crash dump**: [example_crash.log](example_crash.log)\n\n\n**Also includes:**\n -  physics crash mitigation (*requires additional cursed stuff*)\n\n**Custom signals to send to SRCDS**\n - **SIGUSR1**: Lua watchdog to break infinite loops\n - **SIGUSR2**: to dump manually.\n\nCrash log is written to `$PWD/logs/\u003ctimestamp\u003e.log` with a symlink at `logs/latest.log`.\n\n\n**Build**\n1. [Install premake](https://premake.github.io/download/) \n2. Install dependencies\n    ```sh\n    apt-get install libunwind-dev binutils-dev liblzma-dev build-essential\n    ```\n2. Copy this repo inside the gbins alongside all the other binary modules (*or really just rewrite build, please*)\n\n**Install**\n 1. Put `gmsv_segfault_linux.dll` into `garrysmod/lua/bin/` (there is a precompiled version in Releases).\n 2. install autorun lua to server.\n\n### Notes\n\n - Debug builds (`#define CRASH_DEBUG`) register:\n\n    | Lua function | C function | Description |\n    |---|---|---|\n    | `docrash` | `lua_dosegfault` | Triggers a SIGSEGV |\n    | `docrash_stack` | `lua_dostack` | Triggers a stack overflow |\n    | `docrash_nullptr` | `lua_docrash_nullptr` | Calls through a null pointer |\n    | `docrash_thread` | `lua_docrash_thread` | Crashes in a separate thread |\n\n\n - Originally extracted from [gitlab.com/metastruct/internal/gbins](https://gitlab.com/metastruct/internal/gbins) (internal)\n - Depends on [`gmsv_physframe_linux.dll`](https://github.com/Python1320/gmsv_physframe) for stopping physics in a way that (sometimes) prevents further crashing to allow the occasional countdown while players can save their dupes.\n\n\n## Thanks\n\nGarry, [Metastruct](https://metastruct.github.io), FreezeBug, BlueShank, MetaMan, SpiralP, CapsAdmin, etc, etc etc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython1320%2Fgmsv_segfault","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpython1320%2Fgmsv_segfault","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython1320%2Fgmsv_segfault/lists"}