Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Commits

Ticket #10085: Intermittent crash with logging to DB enabled

 

 

MythTV commits RSS feed   Index | Next | Previous | View Threaded


noreply at mythtv

Oct 10, 2011, 2:21 PM

Post #1 of 12 (137 views)
Permalink
Ticket #10085: Intermittent crash with logging to DB enabled

#10085: Intermittent crash with logging to DB enabled
------------------------------------+------------------------
Reporter: paulh | Owner:
Type: Bug Report - Crash | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Trunk Head
Severity: medium | Keywords:
Ticket locked: 0 |
------------------------------------+------------------------
The attached BT shows a crash in mytharchivehelper but I believe it
affects all the command line tools that start up and exit quickly.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10085>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Oct 10, 2011, 2:53 PM

Post #2 of 12 (134 views)
Permalink
Re: Ticket #10085: Intermittent crash with logging to DB enabled [In reply to]

#10085: Intermittent crash with logging to DB enabled
--------------------------------+----------------------------
Reporter: paulh | Owner:
Type: Bug Report - Crash | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Trunk Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+----------------------------

Comment (by danielk):

It looks like gContext is never deleted in most returns from
mytharchivehelper's main function.

The MythContext destructor doesn't just shut down the logging thread.
There are at least a half dozen other ways a program that constructs
MythContext and never deletes it can segfault just before exit.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10085#comment:1>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Oct 10, 2011, 3:04 PM

Post #3 of 12 (134 views)
Permalink
Re: Ticket #10085: Intermittent crash with logging to DB enabled [In reply to]

#10085: Intermittent crash with logging to DB enabled
--------------------------------+----------------------------
Reporter: paulh | Owner:
Type: Bug Report - Crash | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Trunk Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+----------------------------

Comment (by danielk):

Paul, I don't know how one runs mytharchivehelper, but the attached patch
is a pretty boilerplate fix for this type of object lifetime problem.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10085#comment:2>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Oct 12, 2011, 12:03 PM

Post #4 of 12 (124 views)
Permalink
Re: Ticket #10085: Intermittent crash with logging to DB enabled [In reply to]

#10085: Intermittent crash with logging to DB enabled
--------------------------------+----------------------------
Reporter: paulh | Owner:
Type: Bug Report - Crash | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Trunk Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+----------------------------

Comment (by Github):

Add CleanupGuard to mytharchivehelper

Refs #10085

Signed-off-by: Gavin Hurlbut <ghurlbut [at] mythtv>
Branch: master
Changeset: cfeca636694219d4dd7ef021be5e3f12d57c5693

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10085#comment:3>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Oct 12, 2011, 12:04 PM

Post #5 of 12 (123 views)
Permalink
Re: Ticket #10085: Intermittent crash with logging to DB enabled [In reply to]

#10085: Intermittent crash with logging to DB enabled
--------------------------------+----------------------------
Reporter: paulh | Owner: beirdo
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Trunk Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+----------------------------
Changes (by beirdo):

* owner: => beirdo
* status: new => assigned


--
Ticket URL: <http://code.mythtv.org/trac/ticket/10085#comment:4>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Oct 12, 2011, 12:59 PM

Post #6 of 12 (125 views)
Permalink
Re: Ticket #10085: Intermittent crash with logging to DB enabled [In reply to]

#10085: Intermittent crash with logging to DB enabled
--------------------------------+----------------------------
Reporter: paulh | Owner: beirdo
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Trunk Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+----------------------------

Comment (by paulh):

Adding the cleanup guard has made no difference still getting the same
crash. New bt added.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10085#comment:5>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Oct 12, 2011, 1:11 PM

Post #7 of 12 (123 views)
Permalink
Re: Ticket #10085: Intermittent crash with logging to DB enabled [In reply to]

#10085: Intermittent crash with logging to DB enabled
--------------------------------+----------------------------
Reporter: paulh | Owner: beirdo
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Trunk Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+----------------------------

Comment (by beirdo):

OK. Could you bring up gdb with that coredump again, and do:
{{{
thread 1
up
}}}

and continue to go up until you are at #5 which is the logqmsg at
logging.cpp:651 or so.

Then
{{{
print *info
print query
}}}

Also, what is your locale set to?

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10085#comment:6>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Oct 12, 2011, 2:35 PM

Post #8 of 12 (125 views)
Permalink
Re: Ticket #10085: Intermittent crash with logging to DB enabled [In reply to]

#10085: Intermittent crash with logging to DB enabled
--------------------------------+----------------------------
Reporter: paulh | Owner: beirdo
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Trunk Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+----------------------------

Comment (by paulh):

{{{
(gdb) thread 1
[Switching to thread 1 (Thread 28537)]#0 0x0000000000000000 in ?? ()
(gdb) up
#1 0x00007f5b24ee6327 in QTextCodec::fromUnicode(QString const&) const ()
from /usr/lib64/qt4/libQtCore.so.4
(gdb) up
#2 0x00007f5b19de58fc in ?? () from
/usr/lib64/qt4/plugins/sqldrivers/libqsqlmysql.so
(gdb) up
#3 0x00007f5b266d08f6 in QSqlQuery::exec() () from
/usr/lib64/qt4/libQtSql.so.4
(gdb) up
#4 0x00007f5b295a47f1 in MSqlQuery::exec (this=0x721c60) at
mythdbcon.cpp:651
651 bool result = QSqlQuery::exec();
(gdb) up
#5 0x00007f5b29648041 in DatabaseLogger::logqmsg (this=0x6a8240,
query=..., item=0x6b51e0) at logging.cpp:462
462 if (!query.exec())
(gdb) print *info
No symbol "info" in current context.
(gdb) print query
$1 = (MSqlQuery &) @0x721c60: {<QSqlQuery> = {d = 0x71d3c0}, m_db =
0x6c0d70, m_isConnected = true, m_returnConnection = true,
m_last_prepared_query = {d = 0x6b3620}}
(gdb) print item.message
$2 = "Added database logging to table logging", '\000' <repeats 1889
times>
(gdb)
}}}

{{{
$ locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
}}}

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10085#comment:7>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Oct 12, 2011, 2:44 PM

Post #9 of 12 (124 views)
Permalink
Re: Ticket #10085: Intermittent crash with logging to DB enabled [In reply to]

#10085: Intermittent crash with logging to DB enabled
--------------------------------+----------------------------
Reporter: paulh | Owner: beirdo
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Trunk Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+----------------------------

Comment (by beirdo):

Argh, I did mean item, not info. My bad. You got us what I was looking
for anyways. Thanks. Hmm. Could you attach the debug logs (which
hopefully you had running) for the crashed process? It seems to be a
unicode vs utf-8 issue, which I believe there has been some extra
diagnostic logging added fairly recently.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10085#comment:8>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Oct 12, 2011, 3:27 PM

Post #10 of 12 (124 views)
Permalink
Re: Ticket #10085: Intermittent crash with logging to DB enabled [In reply to]

#10085: Intermittent crash with logging to DB enabled
--------------------------------+----------------------------
Reporter: paulh | Owner: beirdo
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Trunk Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+----------------------------

Comment (by paulh):

Added a log. Just to remind you it doesn't crash every time only about 1
out of 6 attempts.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10085#comment:9>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Jan 2, 2012, 6:14 PM

Post #11 of 12 (90 views)
Permalink
Re: Ticket #10085: Intermittent crash with logging to DB enabled [In reply to]

#10085: Intermittent crash with logging to DB enabled
--------------------------------+----------------------------
Reporter: paulh | Owner: beirdo
Type: Bug Report - Crash | Status: infoneeded
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Trunk Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
--------------------------------+----------------------------
Changes (by beirdo):

* status: assigned => infoneeded


Comment:

I can't recreate this issue with current master. Is this fixed? If not,
do you have another commandline that exhibits the issue so I can retest?
In 20 runs of the command given (with --output replaced with --outfile),
not a single crash.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10085#comment:10>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Feb 5, 2012, 10:39 PM

Post #12 of 12 (61 views)
Permalink
Re: Ticket #10085: Intermittent crash with logging to DB enabled [In reply to]

#10085: Intermittent crash with logging to DB enabled
--------------------------------+-----------------------------
Reporter: paulh | Owner: beirdo
Type: Bug Report - Crash | Status: closed
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Master Head
Severity: medium | Resolution: Unverified
Keywords: | Ticket locked: 0
--------------------------------+-----------------------------
Changes (by beirdo):

* status: infoneeded => closed
* resolution: => Unverified


Comment:

5 weeks with no confirmation... Closing this.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10085#comment:11>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits

MythTV commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.