httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: [PATCH] site: more debugging tips
Date Tue, 06 Sep 2005 11:12:12 GMT
On 9/5/05, Joe Orton <> wrote:
> After getting bored with writing these into bugzilla for the umpteenth
> time, does this look OK?

+1, with or without the changes suggested by Noirin

We discussed different patches previously on dev@httpd to make some of
this stuff more obvious by reporting configuration issues to the error
log at startup.  Is that worth revisiting?
As I recall, the critical question was whether or not the user had to
know about the CoreDumpDirectory directive in order to have
information written to error log.

Extra useful logic would be to find out on Solaris via coreadm if
setuid processes are prevented from writing cores.

    struct rlimit rl;
    int rc;
    int already_complained = 0;

    rc = getrlimit(RLIMIT_CORE, &rl);
    if (rc == 0) {
        if (rl.rlim_cur == 0) {
            /* Regardless of whether or not the server was started as root,
             * a soft limit of zero for core file size prevents core dumps
             * from being written for any web server processes.
             * Theoretically we could try to raise the soft limit to the
             * hard limit (if it is higher), but perhaps this is the
             * administrator's way to say they want no core dumps.
            ap_log_error(APLOG_MARK, APLOG_NOTICE,
                         "Core file limit is 0; core dumps will be not be "
                         "written for server crashes");
            already_complained = 1;

    if (!already_complained &&
        geteuid() == 0 &&
        !ap_coredumpdir_configured) {
        /* The server has started as root, so child processes run as another
         * user.  They SHOULD NOT have permission to write to the web server
         * install directory, so if CoreDumpDirectory hasn't been specified,
         * then in general no core dump can be written.
         * Exception: On Solaris, the coreadm command can be used to specify
         * an alternate directory for core dumps to be written.
         * Potentially the same feature is/will be available on other platforms.
                     "CoreDumpDirectory not set; core dumps may not be
written for "
                     "child process crashes");

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message