Bug 440410 - run-parts should not log PID
run-parts should not log PID
Product: Fedora
Classification: Fedora
Component: crontabs (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Marcela Mašláňová
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-04-03 09:19 EDT by Jonathan Kamens
Modified: 2008-04-10 10:39 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-10 10:39:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2008-04-03 09:19:00 EDT
I know that the number that's getting logged is the PID of the logger process.  
But there is NO VALUE WHATSOEVER TO LOGGING THAT PID.  The logger process is 
transient and exists only for long enough to log the message.  There is no way 
of associating the PID of the logger process with the PID of the run-parts 
script that started it or the PID of the job to which it refers.  In short, 
it's just a useless waste of space, and it therefore shouldn't be logged.

If you want to log a useful PID, then add "[$$]" to the end of the log tag and 
remove the "-i" flag to logger, so that the PID of the run-parts job will be 

+++ This bug was initially created as a clone of Bug #439799 +++

With recent Rawhide, I see this in my logs:

Mar 31 10:01:01 jik2 run-parts(/etc/cron.hourly)[2704: starting inn-cron-

There are two problems here.

The first is that there's a missing close brace after the PID.  I think this is 
because the total length of the process name plus the PID is limited -- I can 
reproduce the issue by running "logger -i -t foofoofoofoofoofoofoofoofoo foo", 
and also within Sys::Syslog in Perl, so I suspect the limitation is in 
rsyslog.  Having said that, run-parts shouldn't be using a process name that's 
so long that it's tickling the limitation (either that, or I suppose you could 
get the rsyslog maintainers to fix the limitation).

Independent of that, I see no point whatsoever in having logger log its own PID 
into the log.  It's useless to log the PID of the transient logger process 
that's logging the message!

-- Additional comment from mmaslano@redhat.com on 2008-04-03 07:05 EST --
First: Bug verified. Reassing to rsyslog.
Second: that's pid of process.

-- Additional comment from rgerhards@hq.adiscon.com on 2008-04-03 08:03 EST --
I think this is related to this rsyslog bug:


The root problem seems to be that RFC 3164 and the the upcoming syslog RFC
series limit the tag length to 32 characters. Rsyslog abides to this limit.
There are a number of subtle issue when we process longer tags. It's under
consideration, but it must be implemented carefully (the rsyslog bugzilla, I
think, already has some info on subtleties - out of my head I remember databases
field sizes and potential overrun of non-aware receiver (buffers)).

But anyhow: could you post me a sample of what you would expect, that would
speed up to process of looking into it as I am right now in the middle of an
implementation and would not like to setup a dedicated lab.


-- Additional comment from jik@kamens.brookline.ma.us on 2008-04-03 09:15 EST --
I'm not sure what you're asking for as a "sample".  What I would expect is for 
the tag not to be truncated in the log file.  That seems pretty 
straightforward, and I don't see how a sample would help clarify it.

I've added a comment to bug number 52 in the rsyslog bugzilla about this.

Can you ask the maintainers of the Red Hat bugzilla to add the rsyslog bugzilla 
to the external bugzilla references drop-down?



Note You need to log in before you can comment on or make changes to this bug.