Project

General

Profile

Actions

Bug #6492

closed

SignalHandler::entry spins the cpu and never sleeps

Added by Alan Somers over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Monitor
Target version:
-
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

SignalHandler::entry shouldn't poll for POLLOUT, because it never actually writes to the pipes in question. Polling for POLLOUT causes poll(2) to immediately return, so the function spins the CPU and never blocks. At least, that's my experience with ceph-mon on FreeBSD. I don't know why it works on Linux. In any case, the attached patch removes POLLOUT. It fixes the problem on FreeBSD and doesn't break anything (AFAICT) on Linux. Tested on FreeBSD 9.1 amd64 and Ubuntu Server 13.04 amd64.

Signed-off-by: Alan Somers <>


Files

patch-src-global-signal_handler.cc (653 Bytes) patch-src-global-signal_handler.cc Alan Somers, 10/08/2013 03:24 PM
Actions

Also available in: Atom PDF