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 697867 - smartd prints "internal error in MailWarning(): cfg.mailwarn->emailfreq=0" when no mailaddress is specified
Summary: smartd prints "internal error in MailWarning(): cfg.mailwarn->emailfreq=0" wh...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: smartmontools
Version: 6.0
Hardware: All
OS: Linux
urgent
high
Target Milestone: rc
: 6.2
Assignee: Michal Hlavinka
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: GSS_6_2_PROPOSED
TreeView+ depends on / blocked
 
Reported: 2011-04-19 13:53 UTC by Christian Horn
Modified: 2018-11-14 12:59 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Prior to this update, when a system event relevant to smartd happened, the following spurious error message was output if no mail address was configured: "smartd: internal error in MailWarning(): cfg.mailwarn->emailfreq=0" This unintended behavior has been fixed in this update so that the spurious error message is no longer displayed.
Clone Of:
Environment:
Last Closed: 2011-08-24 10:56:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
the patch at currently used (6.80 KB, patch)
2011-05-06 10:15 UTC, Christian Horn
no flags Details | Diff
the patch as suggested/fixed version (6.49 KB, patch)
2011-05-06 10:16 UTC, Christian Horn
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1201 0 normal SHIPPED_LIVE smartmontools bug fix update 2011-08-24 10:56:41 UTC

Description Christian Horn 2011-04-19 13:53:32 UTC
Description of problem:
smartd not only outputs the relevant event notification but also message:
"smartd: internal error in MailWarning(): cfg.mailwarn->emailfreq=0"

Version-Release number of selected component (if applicable):
5.39.1-2.el6

How reproducible:
always

Steps to Reproduce:
1. # config example applies to ata/sata harddisc
   # the relevant part is that no -m mail is specified
   echo '/dev/sda -a -d sat' >/etc/smartd.conf
2. echo 'smartd_opts="-q never"' >/etc/sysconfig/smartmontools
3. service smartd restart
4. have a smartd relevant event happening, i.e. disc failure
  
Actual results:
output of event notification in syslog
smartd: internal error in MailWarning(): cfg.mailwarn->emailfreq=0

Expected results:
output of event notification in syslog

Additional info:
- the problem is not in unpatched smartmontools-5.39.1
- patch smartmontools-5.38-lowcap.patch removes a check which checks in
function MailWarning if mails are configured.
Removing lines 99-108 should solve the problem.

Comment 1 Michal Hlavinka 2011-04-19 14:55:22 UTC
> Removing lines 99-108 should solve the problem.

yes, this section of the patch should be removed

Comment 2 Christian Horn 2011-05-06 10:15:27 UTC
Created attachment 497319 [details]
the patch at currently used

Comment 3 Christian Horn 2011-05-06 10:16:14 UTC
Created attachment 497320 [details]
the patch as suggested/fixed version

Comment 4 Christian Horn 2011-05-06 10:17:03 UTC
Can we get the required ACKs once RHEL6.1 is GA?

Comment 14 Petr Kovar 2011-08-04 14:09:20 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Prior to this update, when a system event relevant to smartd happened, the following spurious error message was output if no mail address was configured: 

"smartd: internal error in MailWarning(): cfg.mailwarn->emailfreq=0" 

This unintended behavior has been fixed in this update so that the spurious error message is no longer displayed.

Comment 15 errata-xmlrpc 2011-08-24 10:56:46 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1201.html


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