Bug 59988 - [patch] Add log message when apr_thread_mutex_create fails
Summary: [patch] Add log message when apr_thread_mutex_create fails
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: All (show other bugs)
Version: 2.5-HEAD
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-11 15:37 UTC by jiazhouyang
Modified: 2016-08-11 15:55 UTC (History)
0 users



Attachments
Add log message when apr_thread_mutex_create fails (3.46 KB, patch)
2016-08-11 15:37 UTC, jiazhouyang
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jiazhouyang 2016-08-11 15:37:22 UTC
Created attachment 34134 [details]
Add log message when apr_thread_mutex_create fails

Function apr_thread_mutex_create may fail. The majority of calls have checked the return value and printed log message like the following code snippet, while the others have not. Those unchecked ones probably need logs too (see attachment).

/* httpd-2.4.10/modules/database/mod_dbd.c:689:15 */
        rv2 = apr_thread_mutex_create(&group->mutex,
                                      APR_THREAD_MUTEX_DEFAULT, pool);
        if (rv2 != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_CRIT, rv2, s, APLOGNO(00635)
                          "Failed to create thread mutex");
             return rv2;
        }