Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #6588] Notifications causing segfault from exim #1740

Closed
icinga-migration opened this issue Jun 26, 2014 · 7 comments
Closed
Labels
area/notifications Notification events bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/6588

Created by dseeley on 2014-06-26 13:43:13 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2014-06-27 06:20:03 +00:00)
Target Version: 2.0.1
Last Update: 2014-06-27 06:20:03 +00:00 (in Redmine)

Icinga Version: v2.0.0-19-g5518826

Ubuntu 14.04 3.13.0-30-generic, x86_64
icinga2, icinga2-classicui (v2.0.0-19-g5518826 from snapshots, or 2.0.0 from releases)
exim4-deamon-light 4.82-3ubuntu2 (also tried -heavy, same problem)

mail-host-notification.sh can be successfully run from the command line as a normal user (removing the environment vars), but there is a segfault from exim when it is called from icinga2.

With ssmtp, there is no such issue (not tried postfix).

According to /var/log/icinga2/debug.log, notifications are sent.

[2014-06-26 06:35:01 +0100] information/NotificationComponent: Sending reminder notification for object 'TEST2'
[2014-06-26 06:35:01 +0100] debug/Notification: FType=32, TypeFilter=511
[2014-06-26 06:35:01 +0100] information/Notification: Sending notification for user 'icingaadmin'
[2014-06-26 06:35:01 +0100] notice/CheckerComponent: Pending checkables: 0; Idle checkables: 25; Checks/s: 0.8
[2014-06-26 06:35:01 +0100] notice/Process: Running command '/etc/icinga2/scripts/mail-host-notification.sh': PID 15881
[2014-06-26 06:35:01 +0100] information/Notification: Completed sending notification for object 'TEST2'
[2014-06-26 06:35:02 +0100] notice/Process: PID 15881 terminated with exit code 0

However, notifications are not processed by exim, and in /var/log/syslog, there is a segfault from exim at the time the notification is sent, e.g.:

Jun 26 06:35:01 xxx-icinga kernel: [508955.594811] sendmail[15886]: segfault at 7fff53ab12d8 ip 00007fd8c1b7825a sp 00007fff53ab12c0 error 6 in exim4[7fd8c1b65000+e6000]

This is possibly a bug in exim, but there might be a subtlety in the way that it is called that can be worked around within icinga2?

Changesets

2014-06-27 06:18:32 +00:00 by gbeutner 62896cb

Increase default stack size

fixes #6588
@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-06-26 13:51:28 +00:00

Hm, that's interesting. Try running "ulimit -s 64" on your shell and see if you can reproduce the crash by running the script.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-06-26 13:51:36 +00:00

  • Status changed from New to Feedback
  • Target Version set to 2.0.1

@icinga-migration
Copy link
Author

Updated by dseeley on 2014-06-26 13:58:26 +00:00

Yes, indeed, this does reproduce the issue.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-06-26 14:05:18 +00:00

  • Assigned to set to gbeutner

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-06-26 14:07:01 +00:00

Ok, can you test this with 256, 512, 1024, 2048, etc. and figure out the smallest value that doesn't break exim?

@icinga-migration
Copy link
Author

Updated by dseeley on 2014-06-26 15:11:59 +00:00

At 523, it fails, at 524, it succeeds.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-06-27 06:20:04 +00:00

  • Status changed from Feedback to Resolved
  • Done % changed from 0 to 100

Applied in changeset 62896cb.

@icinga-migration icinga-migration added bug Something isn't working area/notifications Notification events labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.0.1 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/notifications Notification events bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant