Opened 18 years ago

Closed 17 years ago

#4768 closed defect (duplicate)

After 16233, channel change to new input segfaults backend

Reported by: Mark Buechler <Mark.Buechler@…> Owned by: Isaac Richards
Priority: minor Milestone: 0.22
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

This happens very reliably. Two sets of backtraces and backend logs attached. The backtraces don't make any sense to me.

Attachments (8)

bt.log (26.7 KB ) - added by Mark Buechler <Mark.Buechler@…> 18 years ago.
Backtrace 1
backend.log (26.7 KB ) - added by Mark Buechler <Mark.Buechler@…> 18 years ago.
Backend 1
bt2.txt (32.7 KB ) - added by Mark Buechler <Mark.Buechler@…> 18 years ago.
Backtrace 2
backend2.txt (18.2 KB ) - added by Mark Buechler <Mark.Buechler@…> 18 years ago.
Backend 2
backend3.txt (27.0 KB ) - added by Mark Buechler <Mark.Buechler@…> 18 years ago.
Backend 3
bt3.txt (32.0 KB ) - added by Mark Buechler <Mark.Buechler@…> 18 years ago.
Backtrace 3
backend4.txt (65.2 KB ) - added by Mark Buechler <Mark.Buechler@…> 18 years ago.
Backend 4
bt4.txt (26.1 KB ) - added by Mark Buechler <Mark.Buechler@…> 18 years ago.
Backtrace 4

Download all attachments as: .zip

Change History (20)

by Mark Buechler <Mark.Buechler@…>, 18 years ago

Attachment: bt.log added

Backtrace 1

by Mark Buechler <Mark.Buechler@…>, 18 years ago

Attachment: backend.log added

Backend 1

by Mark Buechler <Mark.Buechler@…>, 18 years ago

Attachment: bt2.txt added

Backtrace 2

by Mark Buechler <Mark.Buechler@…>, 18 years ago

Attachment: backend2.txt added

Backend 2

comment:1 by danielk, 18 years ago

(In [16236]) Refs #4768. Fix some QString usage in SignalMonitorValue.

by Mark Buechler <Mark.Buechler@…>, 18 years ago

Attachment: backend3.txt added

Backend 3

by Mark Buechler <Mark.Buechler@…>, 18 years ago

Attachment: bt3.txt added

Backtrace 3

by Mark Buechler <Mark.Buechler@…>, 18 years ago

Attachment: backend4.txt added

Backend 4

by Mark Buechler <Mark.Buechler@…>, 18 years ago

Attachment: bt4.txt added

Backtrace 4

comment:2 by Mark Buechler <Mark.Buechler@…>, 18 years ago

After more investigation, this issue appears to be a race condition. By adding an extra VERBOSE within mythevent, I'm unable to make it fail. I don't know that valgrind will catch this, but admittedly, I'm not well versed in valgrind.

comment:3 by Mark Buechler <Mark.Buechler@…>, 18 years ago

Daniel, can we change that QDeepCopy<QStringList> to:

QStringList list = lextradata; QStringList::Iterator it; for (it = list.begin(); it != list.end(); ++it)

extradata << QDeepCopy<QString>(*it);

To be honest, I have no evidence as to why this should work better than the other and it may very well simply be slowing it down just enough to avoid the race.

comment:4 by danielk, 18 years ago

(In [16247]) Refs #4768. Fixes a small memory leak discovered when looking at channel change to new input segfault.

comment:5 by danielk, 18 years ago

Mark, I think the problem may actually be somewhere in the overall handling of MythEvents with extradata. There are only 16 instances in the MythTV code where this type of MythEvent is used and the signal monitor dispatches by far the greatest number of these events.

The code you posted just slows down the copy a little, adding a usleep() in there would probably have the same effect.

comment:6 by danielk, 18 years ago

Resolution: duplicate
Status: newclosed

Hmm, it looks like this is a duplicate of #4168...

comment:7 by danielk, 18 years ago

Resolution: duplicate
Status: closednew

not really a duplicate of #4168...

comment:8 by danielk, 18 years ago

(In [16382]) Refs #4768. Reverts [16233], [16247]. These didn't fix the segfault Mark was seeing and caused segfaults for others..

comment:9 by danielk, 18 years ago

Milestone: unknown0.22

Moving to 0.22, my stop-gap fixes appear to have just made the problem worse, we need to address the QString is not thread-safe problem with a more comprehensive solution.

comment:10 by stuartm, 17 years ago

Status: newinfoneeded_new

Is this this an issue in current trunk?

comment:11 by Mark Buechler <Mark.Buechler@…>, 17 years ago

Well, it was an issue with QString/QStringList not being thread safe, I believe. Last I looked, there was a ticket in trunk to come up with a new MString class to work around the issue.

  • Mark.

comment:12 by stuartm, 17 years ago

Resolution: duplicate
Status: infoneeded_newclosed

Duplicate of #5311

Note: See TracTickets for help on using tickets.