Opened 10 years ago

Closed 9 years ago

#7438 closed defect (Unverified)

Backend crashing in DB query

Reported by: Nigel Owned by: beirdo
Priority: minor Milestone: 0.24
Component: MythTV - UPnP Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: no

Description

No real trace yet, but this doesn't seem to be lying:

(gdb) run -v most
Starting program: /usr/bin/mythbackend -v most
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1284311312 (LWP 1207)]
2009-10-27 12:14:24.189 mythbackend version: trunk [22600M] www.mythtv.org
...
2009-10-27 12:14:34.694 JobQueue: GetJobsInQueue: Ignore 'Flag Commercials' Job for chanid 1039 @ 20091026192800 in Finished state.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1345324144 (LWP 1217)]
0xb5dd905c in QSqlDatabase::isValid (this=0x81b054c)
    at kernel/qsqldatabase.cpp:1384
1384        return d->driver && d->driver != d->shared_null()->driver;
(gdb) where
#0  0xb5dd905c in QSqlDatabase::isValid (this=0x81b054c)
    at kernel/qsqldatabase.cpp:1384
#1  0xb618436a in MSqlDatabase::isOpen (this=0x81b0548) at mythdbcon.cpp:50
#2  0xb61844b3 in MSqlQuery (this=0xafcff214, qi=@0xafcff224)
    at mythdbcon.cpp:337
#3  0x0816e0c7 in UPnpMedia::BuildMediaMap (this=0xb0d029b0)
    at upnpmedia.cpp:223
#4  0x0816ffe3 in UPnpMedia::RunRebuildLoop (this=0xb0d029b0)
    at upnpmedia.cpp:57
#5  0x08170023 in UPnpMedia::doUPnpMediaThread (param=0xb0d029b0)
    at upnpmedia.cpp:66
#6  0xb4ced183 in start_thread () from /lib/libpthread.so.0
#7  0xb4b59a7e in clone () from /lib/libc.so.6

because running with noupnp prevents crash.
Could be hairy bug in shared DB code, but I'm investigating the DB first, because of:

2009-10-27 00:20:02.644 mythbackend version: trunk [22555M] www.mythtv.org
...
2009-10-27 00:33:06.122 UPnpMedia: BuildMediaMap VIDEO scan starting in :/myth/video:
2009-10-27 00:33:06.125 DB Error (UPnpMedia::buildFileList):
Query was:
INSERT INTO upnpmedia (intid, class, itemtype, parentid, itemproperties, filepath, filename, title, coverart) VALUES (?, ?, 'FOLDER', ?, '', ?, ?, ?, ?)
Bindings were:
:COVERART=, :FILENAME=KOIR, :FILEPATH=/myth/video/KOIR, :ITEMCLASS=VIDEO,
:ITEMID=100001, :PARENTID=100000, :TITLE=KOIR
Driver error was [2/1062]:
QMYSQL3: Unable to execute statement
Database error was:
Duplicate entry '100001' for key 1

2009-10-27 00:33:06.127 DB Error (UPnpMedia::buildFileList):
Query was:
INSERT INTO upnpmedia (intid, class, itemtype, parentid, itemproperties, filepath, filename, title, coverart) VALUES (?, ?, 'FOLDER', ?, '', ?, ?, ?, ?)
Bindings were:
:COVERART=, :FILENAME=AUDIO_TS, :FILEPATH=/myth/video/KOIR/AUDIO_TS,
:ITEMCLASS=VIDEO, :ITEMID=100002, :PARENTID=100001, :TITLE=AUDIO_TS
Driver error was [2/1062]:
QMYSQL3: Unable to execute statement
Database error was:
Duplicate entry '100002' for key 1

et c.

Change History (4)

comment:1 Changed 9 years ago by robertm

Status: newassigned

comment:2 Changed 9 years ago by beirdo

Owner: changed from dblain to beirdo

comment:3 Changed 9 years ago by beirdo

Status: assignedinfoneeded

Has there been any reoccurance of this with recent trunk versions? I'm not clear on how to try to recreate this crash to fix it.

comment:4 Changed 9 years ago by beirdo

Milestone: unknown0.24
Resolution: Unverified
Status: infoneededclosed

Emailed the original poster, who indicated we should be fine to close this, and that it's very difficult to reproduce. If we see this again, by all means open a new ticket and we can hunt it down at that time.

Note: See TracTickets for help on using tickets.