RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1078878 - rsyslog crashes by floating-point exception
Summary: rsyslog crashes by floating-point exception
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rsyslog
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Heinrich
QA Contact: Marek Marusic
URL:
Whiteboard:
: 1108066 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-20 13:30 UTC by Tomas Heinrich
Modified: 2015-11-19 14:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 996862
Environment:
Last Closed: 2015-11-19 14:29:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2173 0 normal SHIPPED_LIVE rsyslog bug fix update 2015-11-19 11:34:00 UTC

Description Tomas Heinrich 2014-03-20 13:30:51 UTC
Also affects rsyslog-7.4.7-5.el7.


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

Description of problem:

When second operand becomes zero in configuration has division/modulus, rsyslog crashes by 'Floating point exception'


Version-Release number of selected component (if applicable):
v5.8.10


How reproducible:
have a configuration like

if 100 % $msgid == 0 then /var/log/event.log

and (re)start rsyslog


Additional info:
below is the bracktrace


[root@localhost etc]# gdb rsyslogd
(gdb) r -nd
Starting program: /sbin/rsyslogd -nd
[Thread debugging using libthread_db enabled]

<...>

8780.491765709:7ffff7f8d700: MsgSetTAG in: len 9, pszBuf: rsyslogd:
8780.491768746:7ffff7f8d700: MsgSetTAG exit: pMsg->iLenTAG 9, pMsg->TAG.szBuf: rsyslogd:
8780.491777641:7ffff6735700: we deleted 0 objects and enqueued 0 objects
8780.491782073:7ffff6735700: delete batch from store, new sizes: log 1, phys 1
8780.491790598:7ffff6735700: processBatch: batch of 1 elements must be processed
8780.491793557:7ffff6735700: Processing next rule
8780.491816338:7ffff6735700: rainerscript: executing step, opcode 1002...
8780.491819931:7ffff6735700: rainerscript: opcode PUSHMSGVAR
8780.491827350:7ffff6735700: rainerscript: executing step, opcode 1003...
8780.491830086:7ffff6735700: rainerscript: opcode PUSHCONSTANT
8780.491832906:7ffff6735700: rainerscript: executing step, opcode 6...
8780.491835520:7ffff6735700: rainerscript: opcode DIV

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7ffff6735700 (LWP 2024)]
0x00007ffff7fd5a4b in opDIV (pThis=0x7ffff00008c0, pProg=<value optimized out>) at vm.c:245
245	NUMOP(DIV,    /)
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.107.el6.x86_64 libgcc-4.4.7-3.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0  0x00007ffff7fd5a4b in opDIV (pThis=0x7ffff00008c0, pProg=<value optimized out>) at vm.c:245
#1  execProg (pThis=0x7ffff00008c0, pProg=<value optimized out>) at vm.c:704
#2  0x00007ffff7fdcbac in shouldProcessThisMessage (pThis=0x7ffff82190f0, pBatch=0x7ffff822f658) at rule.c:184
#3  processBatch (pThis=0x7ffff82190f0, pBatch=0x7ffff822f658) at rule.c:275
#4  0x00007ffff7fdb9ae in processBatchDoRules (pData=0x7ffff82190f0, pParam=0x7ffff822f658) at ruleset.c:150
#5  0x00007ffff7fc67ff in llExecFunc (pThis=0x7ffff82166b0, pFunc=0x7ffff7fdb980 <processBatchDoRules>, pParam=0x7ffff822f658) at linkedlist.c:389
#6  0x00007ffff7fdbed6 in processBatch (pBatch=0x7ffff822f658) at ruleset.c:232
#7  0x00007ffff7fb39b1 in msgConsumer (notNeeded=<value optimized out>, pBatch=0x7ffff822f658, pbShutdownImmediate=0x7ffff821b988) at syslogd.c:703
#8  0x00007ffff7fdb5ad in ConsumerReg (pThis=0x7ffff821b970, pWti=0x7ffff822f630) at queue.c:1705
#9  0x00007ffff7fd4046 in wtiWorker (pThis=0x7ffff822f630) at wti.c:313
#10 0x00007ffff7fd3b3a in wtpWorker (arg=0x7ffff822f630) at wtp.c:387
#11 0x00007ffff7958851 in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffff708490d in clone () from /lib64/libc.so.6


--- Additional comment from Tomas Heinrich on 2013-11-15 11:03:50 CET ---

I've tested the patch and it looks good.

Sorry for the long delay in reviewing it.

Comment 1 Tomas Heinrich 2014-06-12 15:19:21 UTC
*** Bug 1108066 has been marked as a duplicate of this bug. ***

Comment 6 errata-xmlrpc 2015-11-19 14:29:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2173.html


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