Opened 13 years ago
Closed 9 years ago
#11795 closed Bug Report - Crash (Won't Fix)
Random crash in MythSystemLegacy
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | major | Milestone: | 0.27.7 |
| Component: | MythTV - General | Version: | Master Head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
I'm getting a crash in mythbackend about once or twice a day, usually after the backend runs my external channel change script. The backtrace is:
#0 0xb39a0ede in QSemaphore::release(int) ()
from /usr/lib/i386-linux-gnu/libQtCore.so.4
#1 0xb5d78534 in MythSystemLegacy::Unlock (this=0x0) at mythsystemlegacy.h:160
#2 0xb5d786aa in MythSystemLegacyPrivate::Unlock (this=0x9cdd17b8)
at mythsystemprivate.h:72
#3 0xb5d74e5a in MythSystemLegacySignalManager::run (this=0xac122930)
at mythsystemunix.cpp:559
#4 0xb5c784fc in MThreadInternal::run (this=0xac13bd30) at mthread.cpp:79
#5 0xb39a4f00 in ?? () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#6 0xb4bb3c39 in start_thread ()
from /lib/i386-linux-gnu/i686/cmov/libpthread.so.0
#7 0xb377a78e in clone () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
As you can see on line #1, "this" is null. Here's the section of code in question (actually it's from line #2 above):
void Unlock(void) { m_parent->Unlock(); }
Here "m_parent" is null. If we go up one call frame, we have:
if (ms->m_parent)
{
if (ms->GetStatus() == GENERIC_EXIT_OK)
emit ms->finished();
else
emit ms->error(ms->GetStatus());
ms->disconnect();
ms->Unlock();
}
So sometime between the check for m_parent being null, and calling "ms->Unlock", m_parent does become null. Since m_parent is a QPointer, if code on another thread somewhere deletes what m_parent is pointing to, then m_parent will become a null pointer, rather than pointing into deleted memory.
Since this is running in a separate thread, I'm thinking another thread is deleting the parent MythSystemLegacy object before the signal manager thread is done with it.
I haven't had time to further track this down, but I wanted to file this in case the resident expert (whoever that may be) of MythSystem might know exactly where the problem is.
Thanks! -- Kevin
Change History (9)
comment:1 by , 13 years ago
| Milestone: | unknown → 0.27 |
|---|---|
| Priority: | minor → blocker |
comment:2 by , 13 years ago
| Owner: | set to |
|---|---|
| Status: | new → accepted |
comment:3 by , 13 years ago
comment:5 by , 13 years ago
| Milestone: | 0.27 → 0.27.1 |
|---|---|
| Owner: | changed from to |
| Priority: | blocker → major |
| Status: | accepted → assigned |
comment:6 by , 11 years ago
| Milestone: | 0.27.2 → 0.27.6 |
|---|
comment:7 by , 11 years ago
| Owner: | removed |
|---|---|
| Status: | assigned → new |
comment:8 by , 11 years ago
| Milestone: | 0.27.6 → 0.27.7 |
|---|
Reschedule all tickets planned for, but not solved in time for, 0.27.6 to 0.27.7.
comment:9 by , 9 years ago
| Resolution: | → Won't Fix |
|---|---|
| Status: | new → closed |
Closing any remaining open tickets for 0.27
If the issue still persists, feel free to reopen and align to a current release (v29 or master)

In 9059c42eab34bcdaa160afa988ed99c4ae30dbaa/mythtv: