Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 290140 Details for
Bug 384341
race on message destruction in rsyslog
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
This patch should take care of freeing messages.
rsyslog-1.19.11-race.patch (text/plain), 2.17 KB, created by
Tomas Heinrich
on 2007-12-20 10:28:07 UTC
(
hide
)
Description:
This patch should take care of freeing messages.
Filename:
MIME Type:
Creator:
Tomas Heinrich
Created:
2007-12-20 10:28:07 UTC
Size:
2.17 KB
patch
obsolete
>diff -up rsyslog-1.19.11/syslogd.c.race rsyslog-1.19.11/syslogd.c >--- rsyslog-1.19.11/syslogd.c.race 2007-12-20 10:47:22.000000000 +0100 >+++ rsyslog-1.19.11/syslogd.c 2007-12-20 10:52:03.000000000 +0100 >@@ -2223,13 +2223,6 @@ void printline(char *hname, char *msg, i > > logmsg(pri, pMsg, SYNC_FILE); > >- /* rgerhards 2004-11-11: >- * we are done with the message object. If it still is >- * stored somewhere, we can call discard anyhow. This >- * is handled via the reference count - see description >- * of msg_t for details. >- */ >- MsgDestruct(pMsg); > return; > } > >@@ -2284,7 +2277,6 @@ static void logmsgInternal(int pri, char > * message to the queue engine. > */ > logmsg(pri, pMsg, flags); >- MsgDestruct(pMsg); > } > #else > iminternalAddMsg(pri, pMsg, flags); >@@ -2817,10 +2809,11 @@ static void enqueueMsg(msg_t *pMsg) > if(pthread_cond_timedwait (fifo->notFull, > fifo->mut, &t) != 0) { > dbgprintf("enqueueMsg: cond timeout, dropping message!\n"); >+ MsgDestruct(pMsg); > goto unlock; > } > } >- queueAdd(fifo, MsgAddRef(pMsg)); >+ queueAdd(fifo, pMsg); > unlock: > /* now activate the worker thread */ > pthread_mutex_unlock(fifo->mut); >@@ -3023,6 +3016,7 @@ static int parseRFCSyslogMsg(msg_t *pMsg > /* MSG */ > MsgSetMSG(pMsg, p2parse); > >+ free(pBuf); > return 0; /* all ok */ > } > /* parse a legay-formatted syslog message. This function returns >@@ -3242,13 +3236,17 @@ void logmsg(int pri, msg_t *pMsg, int fl > if(msg[0] == '1' && msg[1] == ' ') { > dbgprintf("Message has syslog-protocol format.\n"); > setProtocolVersion(pMsg, 1); >- if(parseRFCSyslogMsg(pMsg, flags) == 1) >+ if(parseRFCSyslogMsg(pMsg, flags) == 1) { >+ MsgDestruct(pMsg); > return; >+ } > } else { /* we have legacy syslog */ > dbgprintf("Message has legacy syslog format.\n"); > setProtocolVersion(pMsg, 0); >- if(parseLegacySyslogMsg(pMsg, flags) == 1) >+ if(parseLegacySyslogMsg(pMsg, flags) == 1) { >+ MsgDestruct(pMsg); > return; >+ } > } > > /* ---------------------- END PARSING ---------------- */ >@@ -5496,7 +5494,6 @@ static void processImInternal(void) > > while(iminternalRemoveMsg(&iPri, &pMsg, &iFlags) == RS_RET_OK) { > logmsg(iPri, pMsg, iFlags); >- MsgDestruct(pMsg); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 384341
: 290140