NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_crash(n) 5.0.0a naviserver "NaviServer Built-in Commands"

Name

ns_crash - Platform-independent Command to Trigger a Segmentation Fault

Table Of Contents

Synopsis

Description

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.

COMMANDS

ns_crash

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.

EXAMPLES

 % 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.

See Also

ns_kill, ns_shutdown, nsd

Keywords

NaviServer, crash, debug, global built-in, segmentation-fault