• Dridi Boukelmoune's avatar
    cache: It's time for the big quit · 537b74f5
    Dridi Boukelmoune authored
    When mgt sends a command to the cache process, whether it is a period
    ping or an actual operation, it must complete within cli_timeout. When
    the cache fails to meet this requirement, mgt sends a SIGQUIT signal
    to the cache process. As a result the cache process MAY dump a core
    file for post-mortem analysis.
    
    When the core file is missing we are left to our own devices.
    
    To mitigate this, a new signal handler is added for SIGQUIT, but since
    we can't (or don't even try to) guarantee delivery on the CLI thread,
    we make a last-ditch effort to forward SIGQUIT signals to properly
    panic from the CLI thread. With a regular panic we may get both a panic
    report and a core dump.
    
    I didn't add test coverage for this, since we try to avoid intentional
    core dumps in test cases with the `no_coredump` feature flag that turns
    SIGQUIT into a SIGKILL signal.
    537b74f5
cache_main.c 10.4 KB