Opened 6 years ago

Closed 6 years ago

#10956 closed Bug Report - General (fixed)

Using -v refcount With myth* Commands Causes Endless Log Entries

Reported by: Bill Meek <keemllib@…> Owned by: Daniel Thor Kristjansson <danielk@…>
Priority: minor Milestone: 0.26
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

To Duplicate (get ready to press ctrl-c first):

mythbackend -v refcount --nodblog --setverbose general
mythshutdown -c --nodblog -v general,refcount
etc.

Results in the following from libs/libmythbase/referencecounter.cpp until interrupted with ctrl-c:

...
2012-07-29 22:14:18.390297 I  (0x7f509c418c60)::IncrRef() -> 2
2012-07-29 22:14:18.390337 I  (0x7f509c418c60)::DecrRef() -> 1
2012-07-29 22:14:18.390344 I  (0x7f509c418c60)::DecrRef() -> 0
2012-07-29 22:14:18.390467 I  (0x21102c0)::IncrRef() -> 2
2012-07-29 22:14:18.390495 I  (0x21102c0)::DecrRef() -> 1
2012-07-29 22:14:18.390509 I  (0x21102c0)::DecrRef() -> 0
...

Attachments (1)

version.txt (765 bytes) - added by Bill Meek <keemllib@…> 6 years ago.
v0.26-alpha-55-gf9a46e0

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by Bill Meek <keemllib@…>

Attachment: version.txt added

v0.26-alpha-55-gf9a46e0

comment:1 Changed 6 years ago by beirdo

Resolution: Won't Fix
Status: newclosed

This is not a bug. That verbose mask setting is there specifically for debugging the reference counters. If you don't want the output, don't mask it on.

comment:2 Changed 6 years ago by danielk

Milestone: unknown0.26
Resolution: Won't Fix
Status: closednew

There is actually infinite recursion going on. We are logging the reference count changes for LoggingItem? which causes another logging item to be created, creating another reference count message, causing another logging item to be created ad-infinitum. I'll commit a fix shortly.

comment:3 Changed 6 years ago by Daniel Thor Kristjansson <danielk@…>

Owner: set to Daniel Thor Kristjansson <danielk@…>
Resolution: fixed
Status: newclosed

In 922b1d2be8175e7a83af7cb7de930ece7d6df4a4/mythtv:

Fixes #10956. Special case LoggingItem? in ReferenceCounter?.

We can't LOG the LoggingItem? reference counter as that will lead to infinite recursion.
We also can't LOG in PrintDebug?() under the leakLock lock anymore because that will lead to a deadlock.

Note: See TracTickets for help on using tickets.