ns_crash - Platform-independent Command to Trigger a Segmentation Fault
The ns_crash command is intended for debugging purposes. It deliberately causes a segmentation violation (SEGV) in a platform-independent manner, ensuring that the server process is interrupted and a core dump is generated. This allows developers and system administrators to analyze the state of the server at the time of the crash using a C-level debugger, examining call stacks and variables as they were at the moment the command was issued.
Forces a segmentation fault, creating a core dump if the server is configured to allow it. The resulting core file can be analyzed using tools like gdb to investigate the cause and server state.
% ns_crash
When invoked, the above command will immediately cause the server to crash, generating a core dump (if allowed by the system and configuration). This can then be used to diagnose issues in server code or extensions running within NaviServer.