Opened 5 years ago

Closed 5 years ago

#12178 closed Bug Report - Crash (Fixed)

WebFrontend crashes with segfault in libQtScript.so.4.8.5

Reported by: Rob Smith Owned by: stuartm
Priority: critical Milestone: 0.28
Component: MythTV - Services API - Backend Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

When attempting to schedule recordings, or delete recordings mythbackend segfaults in libQtScript.so.4.8.5

Attachments (1)

mythtv_backtrace.txt (78.8 KB) - added by Rob Smith 5 years ago.
mythtv_backtrace.txt

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by Rob Smith

Attachment: mythtv_backtrace.txt added

mythtv_backtrace.txt

comment:1 Changed 5 years ago by stuartm

Component: MythTV - Web FrontendMythTV - Services API - Backend
Milestone: unknown0.28
Priority: minorcritical

This is a known issue on linux (not Windows though) which appears unable to handle the exceptions generated in the Services API. We need to move from using 'throw()' to a custom exceptions/error handling mechanism.

That said, we shouldn't be hitting the error handler unless bad data is being submitted to the Services API, so there is a second bug here. Best guess is that the start times are wrong for some reason, i.e. not correctly in UTC.

comment:2 Changed 5 years ago by Rob Smith

It appears that the times are correctly in UTC.

http://clamps.local:6544/tv/ajax_backends/dvr_util.qsp?_action=simpleRecord&chanID=1161&startTime=2014-06-16T22:00:00.000Z&type=Record%20All
http://clamps.local:6544/tv/ajax_backends/dvr_util.qsp?_action=simpleRecord&chanID=1221&startTime=2014-06-16T22:30:00.000Z&type=Record%20All

Validation via the DB

MariaDB [mythconverg]> SELECT chanid, starttime FROM program WHERE (chanid = 1161 AND starttime = '2014-06-16T22:00:00.000') OR (chanid = 1221 AND starttime = '2014-06-16T22:30:00.000');
+--------+---------------------+
| chanid | starttime           |
+--------+---------------------+
|   1161 | 2014-06-16 22:00:00 |
|   1221 | 2014-06-16 22:30:00 |
+--------+---------------------+
2 rows in set (0.00 sec)

MariaDB [mythconverg]> 

It appears that only when multiple requests are in flight that the backend crashes.

comment:3 Changed 5 years ago by Stuart Morgan <smorgan@…>

In f17fd58b168eca0b3f8fd7b94e68bf2274e25063/mythtv:

Serialise access to QScriptEngine. It's not thread safe. Refs #12178

comment:4 Changed 5 years ago by Rob Smith

Resolution: Fixed
Status: newclosed
Note: See TracTickets for help on using tickets.