<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.sbin/syslogd/syslogd.c, branch release/4.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2000-03-20T08:47:53+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2000-03-20T08:47:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7e6cd705f344de2f9f08475a0fa2ef9191f88dd0'/>
<id>7e6cd705f344de2f9f08475a0fa2ef9191f88dd0</id>
<content type='text'>
'RELENG_4_0_0_RELEASE'.

This commit was manufactured to restore the state of the 4.0-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_4_0_0_RELEASE'.

This commit was manufactured to restore the state of the 4.0-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a nit in my previous commit: make SIGHUP and SIGCHLD restartable</title>
<updated>2000-02-29T08:02:29+00:00</updated>
<author>
<name>Joerg Wunsch</name>
<email>joerg@FreeBSD.org</email>
</author>
<published>2000-02-29T08:02:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=debf48c59c88720e71ee1e20f8bd31d869b0037a'/>
<id>debf48c59c88720e71ee1e20f8bd31d869b0037a</id>
<content type='text'>
as they ought to be.  The description of SA_RESTART was a little
unobvious to me in the man page, so i missed it.  Thanks to Bruce for
spotting this.

Submitted by:	bde
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
as they ought to be.  The description of SA_RESTART was a little
unobvious to me in the man page, so i missed it.  Thanks to Bruce for
spotting this.

Submitted by:	bde
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a serious bug in syslogd regarding the handling of pipes.  The bug</title>
<updated>2000-02-28T17:49:43+00:00</updated>
<author>
<name>Joerg Wunsch</name>
<email>joerg@FreeBSD.org</email>
</author>
<published>2000-02-28T17:49:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6b5c2dd6a16a5be3e619662c3cbee9455209ddeb'/>
<id>6b5c2dd6a16a5be3e619662c3cbee9455209ddeb</id>
<content type='text'>
would cause syslogd to eventually kill innocent processes in the
system over time (note: not `could' but `would').  Many thanks to my
colleague Mirko for digging into the kernel structures and providing
me with the debugging framework to find out about the nature of this
bug (and to isolate that syslogd was the culprit) in a rather large
set of distributed machines at client sites where this happened
occasionally.

Whenever a child process was no longer responsive, or when syslogd
receives a SIGHUP so it closes all its logging file descriptors, for
any descriptor that refers to a pipe syslogd enters the data about the
old logging child process into a `dead queue', where it is being
removed from (and the status of the dead kitten being fetched) upon
receipt of a SIGCHLD.  However, there's a high probability that the
SIGCHLD already arrives before the child's data are actually entered
into the dead queue inside the SIGHUP handler, so the SIGCHLD handler
has nothing to fetch and remove and simply continues.  Whenever this
happens, the process'es data remain on the dead queue forever, and
since domark() tried to get rid of totally unresponsive children by
first sending a SIGTERM and later a SIGKILL, it was only a matter of
time until the system had recycled enough PIDs so an innocent process
got shot to death.

Fix the race by masking SIGHUP and SIGCHLD from both handlers mutually.

Add additional bandaids ``just in case'', i. e. don't enter a process
into the dead queue if we can't signal it (this should only happen in
case it is already dead by that time so we can fetch the status
immediately instead of deferring this to the SIGCHLD handler); for the
kill(2) inside domark(), check for an error status (/* Can't happen */
:) and remove it from the dead queue in this case (which if it would
have been there in the first place would have reduced the problem to a
statistically minimal likelihood so i certainly would never have
noticed the bug at all :).

Mirko also reviewed the fix in priciple (mutual blocking of both
signals inside the handlers), but not the actual code.

Reviewed by:	Mirko Kaffka &lt;mirko@interface-business.de&gt;
Approved by:	jkh
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
would cause syslogd to eventually kill innocent processes in the
system over time (note: not `could' but `would').  Many thanks to my
colleague Mirko for digging into the kernel structures and providing
me with the debugging framework to find out about the nature of this
bug (and to isolate that syslogd was the culprit) in a rather large
set of distributed machines at client sites where this happened
occasionally.

Whenever a child process was no longer responsive, or when syslogd
receives a SIGHUP so it closes all its logging file descriptors, for
any descriptor that refers to a pipe syslogd enters the data about the
old logging child process into a `dead queue', where it is being
removed from (and the status of the dead kitten being fetched) upon
receipt of a SIGCHLD.  However, there's a high probability that the
SIGCHLD already arrives before the child's data are actually entered
into the dead queue inside the SIGHUP handler, so the SIGCHLD handler
has nothing to fetch and remove and simply continues.  Whenever this
happens, the process'es data remain on the dead queue forever, and
since domark() tried to get rid of totally unresponsive children by
first sending a SIGTERM and later a SIGKILL, it was only a matter of
time until the system had recycled enough PIDs so an innocent process
got shot to death.

Fix the race by masking SIGHUP and SIGCHLD from both handlers mutually.

Add additional bandaids ``just in case'', i. e. don't enter a process
into the dead queue if we can't signal it (this should only happen in
case it is already dead by that time so we can fetch the status
immediately instead of deferring this to the SIGCHLD handler); for the
kill(2) inside domark(), check for an error status (/* Can't happen */
:) and remove it from the dead queue in this case (which if it would
have been there in the first place would have reduced the problem to a
statistically minimal likelihood so i certainly would never have
noticed the bug at all :).

Mirko also reviewed the fix in priciple (mutual blocking of both
signals inside the handlers), but not the actual code.

Reviewed by:	Mirko Kaffka &lt;mirko@interface-business.de&gt;
Approved by:	jkh
</pre>
</div>
</content>
</entry>
<entry>
<title>Add section number to .Xr. Use .Pa for filenames.</title>
<updated>2000-01-23T20:22:23+00:00</updated>
<author>
<name>Philippe Charnier</name>
<email>charnier@FreeBSD.org</email>
</author>
<published>2000-01-23T20:22:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=922a51eea09c234b85718186a2ed78dec6494b1c'/>
<id>922a51eea09c234b85718186a2ed78dec6494b1c</id>
<content type='text'>
fprintf -&gt; warnx.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fprintf -&gt; warnx.
</pre>
</div>
</content>
</entry>
<entry>
<title>Do this the Right Way (tm), i.e. use shutdown() instead of fooling around</title>
<updated>2000-01-14T15:37:18+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2000-01-14T15:37:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3a62556310e73c4d132c0f740b37e7683ce3df6e'/>
<id>3a62556310e73c4d132c0f740b37e7683ce3df6e</id>
<content type='text'>
with the size of the receive buffer.

Pointed out by:	ru
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
with the size of the receive buffer.

Pointed out by:	ru
</pre>
</div>
</content>
</entry>
<entry>
<title>Slight change of secure mode semantics: instead of reading (and counting)</title>
<updated>2000-01-14T15:09:06+00:00</updated>
<author>
<name>Dag-Erling Smørgrav</name>
<email>des@FreeBSD.org</email>
</author>
<published>2000-01-14T15:09:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e0d22b94e1bba45112c283c09f0993df34c39d2d'/>
<id>e0d22b94e1bba45112c283c09f0993df34c39d2d</id>
<content type='text'>
vogons, set the size of the receive buffer to 1 and rely on the kernel to
simply drop incoming packets. The logging code was buggy anyway.

Use socklen_t instead of int for the length argument to recvfrom.

Add a 'continue' at the end of a loop for ANSI conformance.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vogons, set the size of the receive buffer to 1 and rely on the kernel to
simply drop incoming packets. The logging code was buggy anyway.

Use socklen_t instead of int for the length argument to recvfrom.

Add a 'continue' at the end of a loop for ANSI conformance.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix page fault in -vv mode.</title>
<updated>2000-01-13T12:59:58+00:00</updated>
<author>
<name>Ruslan Ermilov</name>
<email>ru@FreeBSD.org</email>
</author>
<published>2000-01-13T12:59:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=533eb9138fd9378efa34c4719dd48dadb9df62d8'/>
<id>533eb9138fd9378efa34c4719dd48dadb9df62d8</id>
<content type='text'>
PR:		16098
Submitted by:	Alan.Judge@indigo.ie
Reviewed by:	ru
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR:		16098
Submitted by:	Alan.Judge@indigo.ie
Reviewed by:	ru
</pre>
</div>
</content>
</entry>
<entry>
<title>$Id$ -&gt; $FreeBSD$</title>
<updated>1999-08-28T01:35:59+00:00</updated>
<author>
<name>Peter Wemm</name>
<email>peter@FreeBSD.org</email>
</author>
<published>1999-08-28T01:35:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=97d92980a96a50750844f420cc225ddf918f0699'/>
<id>97d92980a96a50750844f420cc225ddf918f0699</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make hostname comparisons case insensitive</title>
<updated>1999-08-17T01:25:16+00:00</updated>
<author>
<name>Brian Somers</name>
<email>brian@FreeBSD.org</email>
</author>
<published>1999-08-17T01:25:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2d3411d359b41fd89ec03475fcba48ab456a43d4'/>
<id>2d3411d359b41fd89ec03475fcba48ab456a43d4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>readklog(): rename variable 'l' to 'len', to avoid possible confusion with 'i'</title>
<updated>1999-05-06T13:57:57+00:00</updated>
<author>
<name>Dmitrij Tejblum</name>
<email>dt@FreeBSD.org</email>
</author>
<published>1999-05-06T13:57:57+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=70c03db51c35de54f6f99d9a35d6fcabd69478d6'/>
<id>70c03db51c35de54f6f99d9a35d6fcabd69478d6</id>
<content type='text'>
and '1'.

Requested by:	mckay
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and '1'.

Requested by:	mckay
</pre>
</div>
</content>
</entry>
</feed>
