Hi, this sounds like an useful feature, especially if we also manage to include a sample/default crash handler. Among the choices you provide I like "on_fatal_exit"; I could also suggest "crash_handler", "crash_helper", "crash_report_collector" or somesuch.
Good thinking On Wed, Dec 9, 2015 at 5:51 PM, Alex Rousskov <[email protected]> wrote: > Hello, > > The attached patch modifies Squid to run /tmp/squid-on-fatal.sh on > fatal errors. A sample script is also attached. I needed this trick to > triage a complicated bug related to Squid shared memory usage. > > In general, running such a script helps record the environment state > _before_ Squid exits, which is important when the problem is related to > Squid resource usage that often becomes invisible after the Squid > process is gone: connections, FDs, shared memory segments, etc. > > The patch needs more work to make this behavior and the script name > squid.conf-configurable. We should also pass Squid PID and Squid process > "role" to the script as parameters so that the script does not have to > guess them. > > > Do you want this feature in Squid? > > If yes, which squid.conf directive name do you think works the best? > Here are some options to consider: > > on_crash ... > on_fatal_exit .. > on_bad_exit ... > on_unexpected_exit ... > on_exit <success|failure> ... > > The directive parameter could be > > program=... > handler=... > > which would allow us to easily add more exit-handling options later if > needed (e.g., free_all_memory, keep_shared_memory, etc.). > > > Please note that Squid already does something similar on startup. See > squid_start_script in main.cc. That hack should be made configurable > too, of course (on_start, on_launch, etc.). > > > Thank you, > > Alex. > > _______________________________________________ > squid-dev mailing list > [email protected] > http://lists.squid-cache.org/listinfo/squid-dev > -- Francesco _______________________________________________ squid-dev mailing list [email protected] http://lists.squid-cache.org/listinfo/squid-dev
