[mythtv] [mythtv-users] segfault in libmysqlclient.so.21
Peter Bennett
pb.mythtv at gmail.com
Thu May 14 19:58:53 UTC 2020
On 5/13/20 7:34 PM, Paul Harrison wrote:
>
> On 14/05/2020 00:26, Peter Bennett wrote:
>
>>
>> On 5/13/20 5:56 PM, Nigel Pearson wrote:
>>>
>>>> On 14 May 2020, at 4:42 am, Peter Bennett <pb.mythtv at gmail.com
>>>> <mailto:pb.mythtv at gmail.com>> wrote:
>>>
>>> ...
>>>> There may be a better place to put the call to MythDB::destroyMythDB().
>>>
>>>
>>>
>>> Haven’t looked al latest source code (in a LONG time :-), but
>>>
>>> MythCoreContextPrivate::~MythCoreContextPrivate()
>>>
>>> used to have:
>>>
>>> GetMythDB()->GetDBManager()->CloseDatabases();
>>>
>>> if (m_database) {
>>> DestroyMythDB();
>>> m_database = NULL;
>>> }
>>>
>>>
>>>
>>> I suspect there is now a race condition where the context is not
>>> being destructed in time?
>>>
>>>
>>> --
>>> Nigel Pearson, 02 9792 6998, 0408 66 44 35
>>> nigel.pearson.au at gmail.com <mailto:nigel.pearson.au at gmail.com>
>>>
>>
>> That code is still there. I don't know how I missed it.
>>
>> It looks good, so I am not sure what is going on. Need to trace it ...
>>
>> Peter
>>
>>
>
> I don't believe this bug is specific to MythTV but more a regression
> in libmysqlclient you can easily reproduce it using this simple Qt
> test app.
>
>
> #include <QApplication>
> #include <QSqlDatabase>
> #include <QString>
> #include <QDebug>
>
> void cause_segfault()
> {
> {
> QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
> db.setDatabaseName("mythconverg");
> db.setUserName("mythtv");
> db.setHostName("192.168.1.32");
> db.setPassword("xxxxxxxx");
> db.open();
> db.close();
> }
> auto name = QSqlDatabase::database().connectionName();
> qDebug() << "About to remove database";
> QSqlDatabase::removeDatabase(name);
> qDebug() << "Removed database";
> }
>
> int main(int argc, char *argv[])
> {
> QApplication a(argc, argv);
> cause_segfault();
> return -1;
> }
>
> Paul H.
>
>
>
I tested installing the prior version of libmysqlclient21. That resolves
the issue, as is mentioned in the ticket.
https://vitux.com/how-to-downgrade-packages-on-ubuntu/
Also libmysqlclientdev needs to be downgraded, if building from source.
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20200514/fc78cd5e/attachment.htm>
More information about the mythtv-dev
mailing list