Opened 16 years ago
Closed 16 years ago
#4695 closed defect (fixed)
EIT causes backend crashes
Reported by: | anonymous | Owned by: | Janne Grunau |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | mythtv | Version: | unknown |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
When EIT is enable the backend crashes frequently. When disabled, the backend is perfectly stable. Attached are backtraces; during the test nothing else was active (ie. no recordings, no frontend livetv). Ref #4112
Attachments (4)
Change History (12)
comment:1 Changed 16 years ago by
sorry for confusion, myth5.log is for gdb3.txt. The log for gdb4.txt shows nothing un-usually. For gbd5.txt, there just a few sql errors "No error type from QSqlError? Strange..." when quering from GetOverlappingPrograms?
comment:2 Changed 16 years ago by
Milestone: | unknown → 0.21 |
---|
comment:3 Changed 16 years ago by
Quoting David <david@…> on the dev ml
The problem is quite subtle and connected to the way Qt caches regular expression engine instances. MythTV creates threads directly using pthread primitives, bypassing Qt's QThread class. This is a problem, because QThread sets up thread local data structures that it expects to be able to use in QRegExp methods. These are uninitialised when the thread is created outside of Qt.
The actual (mis)behaviour caused by this is rather random. QRegExp may decide to create and destroy an engine during each regexp call, in which case everything works OK (if more slowly that it could). At other times threads end up sharing regexp engines and the associated control structures. Sometimes, if two threads execute inside QRegExp simultaneously then heap corruption occurs and the backend crashes.
comment:4 Changed 16 years ago by
Owner: | changed from Isaac Richards to Janne Grunau |
---|---|
Status: | new → assigned |
comment:6 Changed 16 years ago by
(In [16191]) Convert EITScanner pthread from pthread to QThread
From: David <david at unsolicited point net> Fixes a segfault in the EITFixup QRegExps. QRegExp depends on QThreadStorage which can only be used in threads created by QThread.
I'm just converting the EITScanner thread due to the near release date. Other threads using QRegExp should be converted too or maybe not. I have not seen the same warning in the qt 4.3 docs. Refs #4695, Refs #4733
comment:7 Changed 16 years ago by
(In [16274]) Merges [16191] from trunk: Convert EITScanner pthread from pthread to QThread
From: David <david at unsolicited point net> Fixes a segfault in the EITFixup QRegExps. QRegExp depends on QThreadStorage which can only be used in threads created by QThread.
I'm just converting the EITScanner thread due to the near release date. Other threads using QRegExp should be converted too or maybe not. I have not seen the same warning in the qt 4.3 docs. Refs #4695, Refs #4733
gdb backtrace #1