On Jul 13, 2016, at 10:28 AM, Jakob Hirsch <jh@plonk.de> wrote:
Arran Cudbard-Bell wrote on 2016-07-13 15:17:
but FR uses setrlimit() with rlim_max=0, and you can only lower rlim_max, but not raise it (unless you have the CAP_SYS_RESOURCE capability). OK... So there's probably an issue there. Could we get the stack trace so it's clear what logic is being executed.
Sure:
This code is run before the configuration is read: { char const *panic_action = NULL; panic_action = getenv("PANIC_ACTION"); if (!panic_action) panic_action = main_config.panic_action; if (panic_action && (fr_fault_setup(panic_action, argv[0]) < 0)) { fr_perror("Failed configuring panic action: %s", main_config.name); fr_exit(EXIT_FAILURE); } } Note that main_config.panic_action will always be NULL here. Because it hasn't read the configuration files yet. The solution is to have an "initialization" function which is separate from the "do work" function. Alan DeKok.