Opened 12 years ago
Closed 8 years ago
#10629 closed Bug Report - General (Fixed)
mythwelcome not painting, mythshutdown hang
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | minor | Milestone: | 0.26 |
Component: | MythTV - Mythwelcome & Mythshutdown | Version: | 0.25-fixes |
Severity: | medium | Keywords: | mythwelcome, hang |
Cc: | Ticket locked: | no |
Description
I'm seeing a similar problem to ticket:10032.
At least once a day mythwelcome stops responding and there is a mythshutdown process using 100% CPU.
Attachments (4)
Change History (13)
Changed 12 years ago by
Attachment: | mythshutdown-gdb.txt added |
---|
Changed 12 years ago by
Attachment: | mythwelcome-gdb.txt added |
---|
comment:1 Changed 12 years ago by
Changed 12 years ago by
Attachment: | mythshutdown-drd.txt added |
---|
comment:2 Changed 12 years ago by
==13947== Conflicting load by thread 2 at 0x04bb7644 size 4 ==13947== at 0x4A5565A: MythDB::getMythDB() (mythdb.cpp:27) ==13947== by 0x4A556F3: GetMythDB() (mythdb.cpp:48) ==13947== by 0x4B1C1B3: DBLoggerThread::run() (logging.cpp:550) ==13947== by 0x4A2BC91: MThreadInternal::run() (mthread.cpp:78) ==13947== by 0x6CC0D30: start_thread (pthread_create.c:304) ==13947== by 0x53D246D: clone (clone.S:130)
http://qt-project.org/forums/%20/viewthread/3784#23286
Patch:
diff --git a/mythtv/libs/libmythbase/mythdb.cpp b/mythtv/libs/libmythbase/mythdb.cpp index ea30783..2e62d96 100644 --- a/mythtv/libs/libmythbase/mythdb.cpp +++ b/mythtv/libs/libmythbase/mythdb.cpp @@ -8,6 +8,7 @@ using namespace std; #include <QFile> #include <QHash> #include <QDir> +#include <QAtomicPointer> #include "mythdb.h" #include "mythdbcon.h" @@ -16,7 +17,7 @@ using namespace std; #include "mythdirs.h" #include "mythcorecontext.h" -static MythDB *mythdb = NULL; +static QAtomicPointer<MythDB> mythdb; static QMutex dbLock; // For thread safety reasons this is not a QString
comment:3 Changed 12 years ago by
(gdb) disassemble Dump of assembler code for function _nv012tls: 0x07fe6be0 <+0>: sub $0xc,%esp 0x07fe6be3 <+3>: call 0x7fe69f0 <_nv009tls> 0x07fe6be8 <+8>: test %eax,%eax 0x07fe6bea <+10>: je 0x7fe6bfd <_nv012tls+29> 0x07fe6bec <+12>: lea 0x0(%esi,%eiz,1),%esi 0x07fe6bf0 <+16>: mov 0x4(%eax),%edx 0x07fe6bf3 <+19>: test %edx,%edx 0x07fe6bf5 <+21>: jne 0x7fe6c01 <_nv012tls+33> 0x07fe6bf7 <+23>: mov (%eax),%eax 0x07fe6bf9 <+25>: test %eax,%eax 0x07fe6bfb <+27>: jne 0x7fe6bf0 <_nv012tls+16> 0x07fe6bfd <+29>: add $0xc,%esp 0x07fe6c00 <+32>: ret => 0x07fe6c01 <+33>: jmp 0x7fe6c01 <_nv012tls+33> End of assembler dump.
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/821702
comment:4 Changed 12 years ago by
Further on the nvidia angle I found that setting
__GL_SINGLE_THREADED=1
makes the hanging go away. I got that from:
http://projects.blender.org/tracker/index.php?func=detail&aid=29385&group_id=9&atid=231
which references:
comment:5 Changed 12 years ago by
__GL_SINGLE_THREADED=1
does workaround the mythshutdown hang, but mythwelcome still doesn't paint.
mythwelcome seems to work OK until it logs this:
Apr 28 17:45:15 mythtv mythwelcome[4253]: N CoreContext mythmainwindow.cpp:2608 (IdleTimeout) Entering standby mode after 30 minutes of inactivity
After that, mythwelcome seems to be processing an endless stream of SHUTDOWN_COUNTDOWN events, each of which causes mythshutdown to be executed.
comment:6 Changed 12 years ago by
I can't work out why mythbackend sometimes sends lots of SHUTDOWN_COUNTDOWN messages at once, so here's a patch to make mythwelcome ignore the duplicate messages.
comment:7 Changed 12 years ago by
Component: | MythTV - General → MythTV - Mythwelcome & Mythshutdown |
---|
comment:8 Changed 12 years ago by
Fixed by ticket:10279
I'd still like the patch in comment:2 to be applied.
comment:9 Changed 8 years ago by
Milestone: | unknown → 0.26 |
---|---|
Resolution: | → Fixed |
Status: | new → closed |
Reported to be fixed by 88817964d66d
valgrind's drd tool finds 60 errors in mythshutdown.
This one has a stacktrace matching the hang: