[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-dev
Subject:    Re: Logging Behaviour under server
From:       <jesusgm () vmware ! com>
Date:       2023-03-23 16:21:55
Message-ID: SA1PR05MB7966913557141F78EC87EB9FDF879 () SA1PR05MB7966 ! namprd05 ! prod ! outlook ! com
[Download RAW message or body]

Hi ChenXing,

I’m not an Apache committer but I’m subscribed to the list.
This seems interesting. Is your tool published somewhere? Also, did you try running \
that into the /modules directory?

Best,
Jesús

De: ChenXing Yang <cx.yang@mail.utoronto.ca>
Fecha: miércoles, 22 de marzo de 2023, 16:57
Para: dev@httpd.apache.org <dev@httpd.apache.org>
Asunto: Logging Behaviour under server
!! External Email

Hi Apache Developers,

I’m an undergrad research student from the University of Toronto. Recently, I’ve been \
building a static analysis tool to diagnose logging points in a given code base. It \
is designed to assist C/C++ system software developers in detecting missing or \
redundant log statements. I tested my tool on Apache Httpd repository, specifically \
for all files in server folder, and I found some missing log statements in the \
detected code. I’m writing this email to ask for some feedback about my discovery. \
Many thanks in advance for your kind help and insight.

I found it is common that a function might return an integer as the error code. The \
return code will be received and checked by the caller. Depending on how serious the \
error is, developers might add log statements if an error happens. My tool detected \
similar patterns in Apache Httpd source code. For example, for function \
apr_sockaddr_info_get used in alloc_listener from server/listen.c:

if ((status = apr_sockaddr_info_get(&sa, addr, APR_UNSPEC, port, 0,process->pool)) != \
APR_SUCCESS) {

    ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool, APLOGNO(00077)

                  "alloc_listener: failed to set up sockaddr for %s",

                  addr);

    return "Listen setup failed";

}

ps: starting from line 347 using the trunk version. For your convenience: \
https://github.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/l \
isten.c#L347<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub. \
com%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Flist \
en.c%23L347&data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9%7Cb \
39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZsb3d8e \
yJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DgI0LjI%2FHPbFKEBCPwC7kX83sUWWmptE5sL1ZTViUQE%3D&reserved=0>


In this example, the return code of apr_sockaddr_info_get is checked, and a log \
statement is added if the status is not successful.

A similar pattern can be found in the following instances as well:

https://github.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/v \
host.c#L198<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c \
om%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Fvhost \
.c%23L198&data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9%7Cb39 \
138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZsb3d8eyJ \
WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DGlzggVtfe7Druq%2FAo6cD90%2Fqohxrsyo91XChnjgB%2Fk%3D&reserved=0>


https://github.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/u \
til.c#L2466<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c \
om%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Futil. \
c%23L2466&data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9%7Cb39 \
138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZsb3d8eyJ \
WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=7sWKWVu%2BFBVRcvJcLuk%2FLyFuCslpuWb1r4qhAUoe5%2BE%3D&reserved=0>


https://github.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/c \
onfig.c#L2249<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub \
.com%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Fcon \
fig.c%23L2249&data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9%7 \
Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZsb3d \
8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Veeb8TacsBV%2B%2FiOQCVa%2Fffb2GFwo%2FK8VZALHhYO2Sew%3D&reserved=0>


https://github.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/l \
isten.c#L884<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub. \
com%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Flist \
en.c%23L884&data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9%7Cb \
39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZsb3d8e \
yJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=mDRYFri9%2BIkzBFGkweFQBgKkyntIvXXSB3XW3q0ZckA%3D&reserved=0>


HOWEVER, things are different in the following instances. In all below cases, my tool \
has detected that the source code only checks if an event is successful without \
logging the failure event, causing developer hard to diagnose the point of failure \
even though they try to return some error code/string to the caller. I wonder if \
there are any particular reasons why logging patterns are different for these \
functions or they are indeed improper logging behaviours.

https://github.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/u \
til_expr_eval.c#L1990<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F% \
2Fgithub.com%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserv \
er%2Futil_expr_eval.c%23L1990&data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f \
9f08db2aee17c9%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnkno \
wn%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C \
3000%7C%7C%7C&sdata=jtQ31At4rnqSr6V6pLDrv1e2jzq%2FZr%2BTaRJwGZ3AeAo%3D&reserved=0>

https://github.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/v \
host.c#L191<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c \
om%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Fvhost \
.c%23L191&data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9%7Cb39 \
138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZsb3d8eyJ \
WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=9hhUADuThmC%2Fp8LaFAjVSNY1SBoVaComtF4SPN7Vi4g%3D&reserved=0>


https://github.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/c \
ore.c#L962<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co \
m%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Fcore.c \
%23L962&data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9%7Cb3913 \
8ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329921479%7CUnknown%7CTWFpbGZsb3d8eyJWI \
joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=sTz2ZRcZhTZKNxhUSoJTj4jIXuZrwTOh8y9%2FHdxW0Ow%3D&reserved=0>


Interestingly enough, the comment for the first link says “/* maybe log an error if \
this goes wrong? */”, however, I think I still need someone more familiar with the \
code base to share more insight as I have found other 60+ warnings using my developed \
tool. I have attached all warnings along with this email. Please note that my tool is \
analyzing the source code in release version httpd-2.4.56 instead of trunk, please \
checkout the correct version if you find discrepancies for the line number.

Once again, thank you so much for your kind help and time. I also found there are \
many commits whose sole purpose is to add above pattern, such as \
https://github.com/apache/httpd/commit/8646e07534b4f115496b154f94ac90aa4f8c5b0c<https: \
//nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fhttp \
d%2Fcommit%2F8646e07534b4f115496b154f94ac90aa4f8c5b0c&data=05%7C01%7Cjesusgm%40vmware. \
com%7C06b05f11311c4b655f9f08db2aee17c9%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C63 \
8150974329921479%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6I \
k1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6vdFnl1mqxxRtjUgQIYT6eRaJgbNdEhVlGZ3LcqX8xo%3D&reserved=0>. \
Please reach out to me if you find this tool interesting and can be useful in \
improving the diagnostic capability of Apache Httpd.

Sincerely,

ChenXing Yang



!! External Email: This email originated from outside of the organization. Do not \
click links or open attachments unless you recognize the sender.


[Attachment #3 (text/html)]

<html xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:Helvetica;
	panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Metropolis;
	panose-1:0 0 5 0 0 0 0 0 0 0;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
code
	{mso-style-priority:99;
	font-family:"Courier New";}
pre
	{mso-style-priority:99;
	mso-style-link:"HTML con formato previo Car";
	margin:0cm;
	font-size:10.0pt;
	font-family:"Courier New";}
span.HTMLconformatoprevioCar
	{mso-style-name:"HTML con formato previo Car";
	mso-style-priority:99;
	mso-style-link:"HTML con formato previo";
	font-family:"Consolas",serif;}
span.EstiloCorreo23
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
	{page:WordSection1;}
--></style>
</head>
<body lang="ES" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Hi \
ChenXing,<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US" \
style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">I’m not an \
Apache committer but I’m subscribed to the list.<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">This seems \
interesting. Is your tool published somewhere? Also, did you try running that into \
the /modules directory?<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US" \
style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US" \
style="mso-fareast-language:EN-US">Best,<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US" \
style="mso-fareast-language:EN-US">Jesús<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US" \
style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p> <div \
style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"> <p \
class="MsoNormal" style="margin-bottom:12.0pt"><b><span \
style="font-size:12.0pt;color:black">De: </span></b><span \
style="font-size:12.0pt;color:black">ChenXing Yang \
&lt;cx.yang@mail.utoronto.ca&gt;<br> <b>Fecha: </b>miércoles, 22 de marzo de 2023, \
16:57<br> <b>Para: </b>dev@httpd.apache.org &lt;dev@httpd.apache.org&gt;<br>
<b>Asunto: </b>Logging Behaviour under server<o:p></o:p></span></p>
</div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" \
width="100%" style="width:100.0%"> <tbody>
<tr>
<td style="background:#FDC591;padding:3.75pt 1.5pt 3.75pt 1.5pt"></td>
<td width="100%" style="width:100.0%;background:#FFF8F0;padding:3.75pt 3.0pt 3.75pt \
9.0pt"> <div>
<p class="MsoNormal" \
style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-e \
lement-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
 <b><span style="font-size:10.5pt;font-family:Metropolis;color:#444444">!! External \
Email</span></b><span style="font-size:10.5pt;font-family:Metropolis;color:black"> \
</span><span style="font-size:10.5pt;font-family:Metropolis"><o:p></o:p></span></p> \
</div> </td>
</tr>
</tbody>
</table>
<div>
<div>
<p>Hi Apache Developers,<o:p></o:p></p>
<p>I’m an undergrad research student from the University of Toronto. Recently, I’ve \
been building a static analysis tool to diagnose logging points in a given code base. \
It is designed to assist C/C++ system software developers in detecting missing or \
redundant  log statements. I tested my tool on Apache Httpd repository, specifically \
for all files in server folder, and I found some missing log statements in the \
detected code. I’m writing this email to ask for some feedback about my discovery. \
Many thanks in advance  for your kind help and insight.<o:p></o:p></p>
<p>I found it is common that a function might return an integer as the error code. \
The return code will be received and checked by the caller. Depending on how serious \
the error is, developers might add log statements if an error happens. My tool \
detected similar  patterns in Apache Httpd source code. For example, for function \
apr_sockaddr_info_get used in alloc_listener from server/listen.c:<o:p></o:p></p> \
<pre><code><span style="font-family:Helvetica">if ((status = \
apr_sockaddr_info_get(&amp;sa, addr, APR_UNSPEC, port, 0,process-&gt;pool)) != \
APR_SUCCESS) {<o:p></o:p></span></code></pre> <pre><code><span \
style="font-family:Helvetica">&nbsp;&nbsp;&nbsp; ap_log_perror(APLOG_MARK, \
APLOG_CRIT, status, process-&gt;pool, APLOGNO(00077)<o:p></o:p></span></code></pre> \
<pre><code><span style="font-family:Helvetica">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&quot;alloc_listener: failed to set up sockaddr for \
%s&quot;,<o:p></o:p></span></code></pre> <pre><code><span \
style="font-family:Helvetica">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
addr);<o:p></o:p></span></code></pre> <pre><code><span \
style="font-family:Helvetica">&nbsp;&nbsp;&nbsp; return &quot;Listen setup \
failed&quot;;<o:p></o:p></span></code></pre> <pre><code><span \
style="font-family:Helvetica">}<o:p></o:p></span></code></pre> <p>ps: starting from \
line 347 using the trunk version. For your convenience:&nbsp;<a \
href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fa \
pache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Flisten.c%23 \
L347&amp;data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9%7Cb391 \
38ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZsb3d8eyJW \
IjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sda \
ta=DgI0LjI%2FHPbFKEBCPwC7kX83sUWWmptE5sL1ZTViUQE%3D&amp;reserved=0">https://github.com \
/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/listen.c#L347</a><o:p></o:p></p>
 <p>In this example, the return code of apr_sockaddr_info_get is checked, and a log \
statement is added if the status is not successful.<o:p></o:p></p> <p>A similar \
pattern can be found in the following instances as well:<o:p></o:p></p> <p><a \
href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fa \
pache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Fvhost.c%23L \
198&amp;data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9%7Cb3913 \
8ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZsb3d8eyJWI \
joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdat \
a=DGlzggVtfe7Druq%2FAo6cD90%2Fqohxrsyo91XChnjgB%2Fk%3D&amp;reserved=0">https://github. \
com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/vhost.c#L198</a><o:p></o:p></p>
 <p><a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub. \
com%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Futil \
.c%23L2466&amp;data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9% \
7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZsb3 \
d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&a \
mp;sdata=7sWKWVu%2BFBVRcvJcLuk%2FLyFuCslpuWb1r4qhAUoe5%2BE%3D&amp;reserved=0">https:// \
github.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/util.c#L2466</a><o:p></o:p></p>
 <p><a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub. \
com%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Fconf \
ig.c%23L2249&amp;data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c \
9%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZs \
b3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C \
&amp;sdata=Veeb8TacsBV%2B%2FiOQCVa%2Fffb2GFwo%2FK8VZALHhYO2Sew%3D&amp;reserved=0">http \
s://github.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/config.c#L2249</a><o:p></o:p></p>
 <p><a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub. \
com%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Flist \
en.c%23L884&amp;data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9 \
%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZsb \
3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C& \
amp;sdata=mDRYFri9%2BIkzBFGkweFQBgKkyntIvXXSB3XW3q0ZckA%3D&amp;reserved=0">https://git \
hub.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/listen.c#L884</a><o:p></o:p></p>
 <p>HOWEVER, things are different in the following instances. In all below cases, my \
tool has detected that the source code only checks if an event is successful without \
logging the failure event, causing developer hard to diagnose the point of failure \
even  though they try to return some error code/string to the caller. I wonder if \
there are any particular reasons why logging patterns are different for these \
functions or they are indeed improper logging behaviours.<o:p></o:p></p> <p><a \
href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fa \
pache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Futil_expr_e \
val.c%23L1990&amp;data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17 \
c9%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZ \
sb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7 \
C&amp;sdata=jtQ31At4rnqSr6V6pLDrv1e2jzq%2FZr%2BTaRJwGZ3AeAo%3D&amp;reserved=0">https:/ \
/github.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/util_expr_eval.c#L1990</a><o:p></o:p></p>
 <p><a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub. \
com%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Fvhos \
t.c%23L191&amp;data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9% \
7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329765687%7CUnknown%7CTWFpbGZsb3 \
d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&a \
mp;sdata=9hhUADuThmC%2Fp8LaFAjVSNY1SBoVaComtF4SPN7Vi4g%3D&amp;reserved=0">https://gith \
ub.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/vhost.c#L191</a><o:p></o:p></p>
 <p><a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub. \
com%2Fapache%2Fhttpd%2Fblob%2Fba1e5db6961c910c6dce855822563dbfe83ba159%2Fserver%2Fcore \
.c%23L962&amp;data=05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9%7 \
Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C638150974329921479%7CUnknown%7CTWFpbGZsb3d \
8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&am \
p;sdata=sTz2ZRcZhTZKNxhUSoJTj4jIXuZrwTOh8y9%2FHdxW0Ow%3D&amp;reserved=0">https://githu \
b.com/apache/httpd/blob/ba1e5db6961c910c6dce855822563dbfe83ba159/server/core.c#L962</a><o:p></o:p></p>
 <p>Interestingly enough, the comment for the first link says “/* maybe log an error \
if this goes wrong? */”, however, I think I still need someone more familiar with the \
code base to share more insight as I have found other 60+ warnings using my developed \
tool.  I have attached all warnings along with this email. Please note that my tool \
is analyzing the source code in release version httpd-2.4.56 instead of trunk, please \
checkout the correct version if you find discrepancies for the line \
number.<o:p></o:p></p> <p>Once again, thank you so much for your kind help and time. \
I also found there are many commits whose sole purpose is to add above pattern, such \
as&nbsp;<a href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit \
hub.com%2Fapache%2Fhttpd%2Fcommit%2F8646e07534b4f115496b154f94ac90aa4f8c5b0c&amp;data= \
05%7C01%7Cjesusgm%40vmware.com%7C06b05f11311c4b655f9f08db2aee17c9%7Cb39138ca3cee4b4aa4 \
d6cd83d9dd62f0%7C0%7C0%7C638150974329921479%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD \
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=6vdFnl1mqxx \
RtjUgQIYT6eRaJgbNdEhVlGZ3LcqX8xo%3D&amp;reserved=0">https://github.com/apache/httpd/commit/8646e07534b4f115496b154f94ac90aa4f8c5b0c</a>.
  Please reach out to me if you find this tool interesting and can be useful in \
improving the diagnostic capability of Apache Httpd.<o:p></o:p></p> \
<p>Sincerely,<o:p></o:p></p> <p>ChenXing Yang<o:p></o:p></p>
<p><o:p>&nbsp;</o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" \
width="100%" style="width:100.0%"> <tbody>
<tr>
<td style="background:#FDC591;padding:3.75pt 1.5pt 3.75pt 1.5pt"></td>
<td width="100%" style="width:100.0%;background:#FFF8F0;padding:3.75pt 3.0pt 3.75pt \
9.0pt"> <div>
<p class="MsoNormal" \
style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-e \
lement-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
 <b><span style="font-size:10.5pt;font-family:Metropolis;color:#444444">!! External \
Email:</span></b><span style="font-size:10.5pt;font-family:Metropolis;color:black"> \
This email originated from outside of the organization. Do not click links or open \
attachments  unless you recognize the sender. </span><span \
style="font-size:10.5pt;font-family:Metropolis"><o:p></o:p></span></p> </div>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic