text_err() does:
len = vfprintf(stderr, format, ap); pcmk__assert(len >= 0);
That shouldn't be an assertion, because it's reasonable for the caller of a command-line tool to have closed stderr (possibly because it died). Instead, we should just crm_err() the message if vfprintf() returns a negative result (which likely won't be seen either, but we might as well give some chance).
Reported seen in pcmk__output_and_clear_error() as a tool exits: