https://bz.apache.org/bugzilla/show_bug.cgi?id=70267

            Bug ID: 70267
           Summary: SIGTERM delivered during startup may crash the child
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mpm_event
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Seen in our CI: https://github.com/DataDog/dd-trace-php/pull/4304

#24 exit(0)
#25 clean_child_exit       event.c:782
#26 just_die               event.c:787
#27 <signal handler called>
#28 _int_malloc
interrupted
#29 calloc
#30 apr_allocator_create
#31 ap_thread_current_create   util.c:3230
#32 ap_thread_main_create      util.c:3293
#33 child_main             event.c:2644
#34 make_child             event.c:2880

The interrupted allocation leaves the allocator in a bad state. Calls to exit()
will run the atexit handlers, which may in turn use the allocator too.

exit() is not async-signal-safe. just_die should use _Exit(), or the child
should be forked with the signal blocked and the pending signal processed only
when safe.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to