Project

General

Profile

Actions

Bug #2548

closed

Logger: race condition between isEnabled and setLogLevel

Added by Davide Pesavento about 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Core
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

The root issue is this:

  • setLogLevel is called by LoggerFactory::onConfig and LoggerFactory::setDefaultLevel, and is protected by LoggerFactory::m_loggersGuard.
  • isEnabled is called by NFD_LOG, and is not protected by any mutex.

A data race can result e.g. during a call to rib::Nrd::initializeLogging in the NRD thread, while the NFD thread is doing anything that involves printing a log message via NFD_LOG_*.

(A related issue is that the logging subsystem is basically initialized twice...)


Related issues 1 (0 open1 closed)

Blocked by NFD - Task #4580: Reimplement NFD logging using ndn-cxx logging facilityClosedDavide Pesavento

Actions
Actions

Also available in: Atom PDF