[SERVER-12034] sigxcpu not logged Created: 10/Dec/13  Updated: 11/Jul/16  Resolved: 14/Jan/14

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: None
Fix Version/s: 2.4.10, 2.5.5

Type: Bug Priority: Major - P3
Reporter: Kevin Pulo Assignee: Charlie Page
Resolution: Done Votes: 0
Labels: neweng, signals
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   
Issue Status as of March 28, 2014

ISSUE SUMMARY
MongoDB catches a number of signals and then gracefully shuts down with a log message that mentions the caught signal. The SIGXCPU signal (i.e. running out of CPU time limited by ulimits) is currently not caught and therefore looks identical to a hard kill -9 (SIGKILL) in the log file.

USER IMPACT
It is not clear why the server shut down when it receives a SIGXCPU signal. Diagnosing such an issue is therefore harder than it could be.

SOLUTION
Add the SIGXCPU signal to the list of caught signals and quit gracefully with a log message.

WORKAROUNDS
None

AFFECTED VERSIONS
All recent production releases up to version 2.4.9 are affected.

PATCHES
The fix is included in the 2.4.10 production release and the 2.5.5 development version, which will evolve into the 2.6.0 production release.

Original Description

From a logfile, it's impossible to tell the difference between a hard kill -9, and running out of cpu time (ie. ulimits), which generates a sigxcpu. Adding this signal to the list of caught signals would help with diagnosing this problem.



 Comments   
Comment by Githook User [ 09/Mar/14 ]

Author:

{u'username': u'lissom', u'name': u'Charlie Page', u'email': u'charlie.page@mongodb.com'}

Message: SERVER-12034 Fix bug with SIGXCPU causing a core dump in mongoD/mongoS.

Graceful shutdown was chosen so we can log the signal; There is no risk
of data corruption.

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
Branch: v2.4
https://github.com/mongodb/mongo/commit/a7d9059a07c1be3043dae0dcfbabfa0e5a908f9e

Comment by Githook User [ 13/Jan/14 ]

Author:

{u'name': u'Charlie Page', u'email': u'charlie.page@mongodb.com'}

Message: SERVER-12034 Fix bug with SIGXCPU causing a core dump in mongoD/mongoS.

Graceful shutdown was chosen so we can log the signal; There is no risk
of data corruption.

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/adb2c9c330f67e24adbb5f1a306f8484befe93a9

Comment by Githook User [ 04/Jan/14 ]

Author:

{u'username': u'kangas', u'name': u'Matt Kangas', u'email': u'matt.kangas@mongodb.com'}

Message: Revert "SERVER-12034 Fix bug with SIGXCPU causing a core dump in mongoD/mongoS."

This reverts commit 1168a2605f7351a121f89e64eb7592e91cc869a5.
Breaks Windows compiles
Branch: master
https://github.com/mongodb/mongo/commit/25135aa82d3f54db2dce6ca64781efcdde2e55d0

Comment by Githook User [ 03/Jan/14 ]

Author:

{u'name': u'Charlie Page', u'email': u'charlie.page@mongodb.com'}

Message: SERVER-12034 Fix bug with SIGXCPU causing a core dump in mongoD/mongoS.

Graceful shutdown was chosen so we can log the signal; There is no risk
of data corruption.

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/1168a2605f7351a121f89e64eb7592e91cc869a5

Generated at Thu Feb 08 03:27:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.