Project

General

Profile

Bug #41406

common: SafeTimer reinit doesn't fix up "stopping" bool, used in MonClient bootstrap

Added by haitao chen 27 days ago. Updated 9 days ago.

Status:
Verified
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
No
Severity:
5 - suggestion
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
MonClient
Pull request ID:

Description

1, New a object of SafeTimer().
2, call init.
3, call add_event_after.
4, call shutdown.
5, call init again.
6, call add_event_after again.
The event can't be added. Because the stopping is True.

I think it should set stopping to false in init function.

选区_036.png View (75.5 KB) haitao chen, 08/23/2019 08:29 AM

stop.png View (75.5 KB) haitao chen, 08/23/2019 08:29 AM

get_monmap_and_config.png View (51.2 KB) haitao chen, 08/27/2019 01:20 AM

History

#1 Updated by Patrick Donnelly 23 days ago

  • Subject changed from [common-SafeTimer]It shoule reinit stopping to false in init function. to common: reinit stopping to false in init function.
  • Status changed from New to Need More Info
  • Target version set to v15.0.0
  • Start date deleted (08/23/2019)

Does any code actually do that sequence of events. I would think a SafeTimer should not be re-inited after shutdown.

#2 Updated by haitao chen 23 days ago

Patrick Donnelly wrote:

Does any code actually do that sequence of events. I would think a SafeTimer should not be re-inited after shutdown.

In monclient.c::get_monmap_and_config()

It will call safetimer.shutdown in monclient::shutdown() and it will call safetimer.init in monclient::init() again.

#3 Updated by Greg Farnum 9 days ago

  • Project changed from Ceph to RADOS
  • Category deleted (common)
  • Status changed from Need More Info to Verified
  • Component(RADOS) MonClient added

That's a weird one; perhaps the MonClient should behave differently instead.

(Note that this is a problem only on initial startup; we don't call that function in ongoing usage.)

#4 Updated by Greg Farnum 9 days ago

  • Subject changed from common: reinit stopping to false in init function. to common: SafeTimer reinit doesn't fix up "stopping" bool, used in MonClient bootstrap

Also available in: Atom PDF