[mythtv] MySQL 4.1.7 segfaults in mythtv

Isaac Richards ijr at case.edu
Tue Feb 15 23:29:40 UTC 2005


On Monday 14 February 2005 08:13 pm, Jim Perry wrote:
> Hi!  I noticed that a few people were having problem with MythTV and newer
> versions of MySQL.  Well, I installed MythTV about a month ago and had
> pretty much the same problem (seemingly random crashes, traces showing it
> was in libmysqlclient).
>
> So, I debugged it.  It is (was?) an error in MySQL's client library that
> was showing up because QT makes an embedded call even when you're not
> compiled in embedded mode.  This should do nothing, but I guess that they
> didn't have time to test it extensively, and it only crashes if you call
> the embedded functions more than once (which is why the crash is annoyingly
> rare when you're trying to debug it).
>
> This is the fix I used (no guarantees!!) for mysql 4.1.7.  Maybe it's been
> fixed in newer versions or maybe QT has stopped calling the embedded
> calls...I don't know.  Hopefully it'll help somebody.  Worth a try if
> you're segfaulting in mysqlclient.

Interesting.  It looks like Qt 3.3 will call  mysql_server_init once (and only 
once), but will call mysql_server_end for each db server object that gets 
deleted.

We could conceivably work around this by creating a pool of connections and 
never deleting any in Myth.

Isaac


More information about the mythtv-dev mailing list