List:General Discussion« Previous MessageNext Message »
From:Ian Monroe Date:September 26 2008 2:37pm
Subject:Odd crash with MySQL Embedded 5.1.28
View as plain text  
So we're using MySQL Embedded in Amarok, it works fine for most of us
that use 5.1, including myself. However the following backtrace is
from the second person to have this issue. Its repeatable, happens at
startup.

Is there something about how their MySQL is setup on their system that
could cause such a crash?

Thread 1 (Thread 0xb397d960 (LWP 23945)):
[KCrash Handler]
#6  0xb750550d in ?? () from /lib/tls/i686/cmov/libc.so.6
#7  0xb7506cad in malloc () from /lib/tls/i686/cmov/libc.so.6
#8  0xaf0525af in my_malloc (size=1228, my_flags=48) at my_malloc.c:34
#9  0xaf069d16 in create_key_cache (name=0xaf31f83a "default",
length=7) at set_var.cc:3898
#10 0xaf069f1d in get_or_create_key_cache (name=0xaf31f83a "default",
length=7) at set_var.cc:3932
#11 0xaf02bb16 in mysql_init_variables () at ../sql/mysqld.cc:7486
#12 0xaf02debc in init_common_variables (conf_file_name=0xaf3140c4
"my", argc=1, argv=0xaf312ba0, groups=0xbfdaae78) at
../sql/mysqld.cc:3139
#13 0xaf02ebb3 in init_embedded_server (argc=0, argv=0x0,
groups=0xbfdaae78) at lib_sql.cc:491
#14 0xaf01fb9c in mysql_server_init (argc=0, argv=0x0, groups=0x0) at
libmysql.c:173
#15 0xaf01c22f in mysql_init (mysql=0x0) at client.c:1509
#16 0xaf0119b8 in MySqlEmbeddedCollection (this=0x835cb20,
id=@0xbfdaafe0, prettyName=@0xbfdaafe4) at
/home/krf/kde-devel/src/amarok/src/collection/sqlcollection/MySqlEmbeddedCollection.cpp:128
#17 0xaefee54b in SqlCollectionFactory::init (this=0x8178240) at
/home/krf/kde-devel/src/amarok/src/collection/sqlcollection/SqlCollection.cpp:65
[snip]

The relevant code in question:

    char* defaultsLine = qstrdup( QString( "--defaults-file=%1" ).arg(
                    defaultsFile ).toAscii().data() );
    char* databaseLine = qstrdup( QString( "--datadir=%1" ).arg(
                    databaseDir ).toAscii().data() );

    if( !QFile::exists( defaultsFile ) )
    {
        QFile df( defaultsFile );
        df.open( QIODevice::WriteOnly );
    }

    if( !QFile::exists( databaseDir ) )
    {
        QDir dir( databaseDir );
        dir.mkpath( "." );
    }

    static const int num_elements = 5;
    char **server_options = new char* [ num_elements + 1 ];
    server_options[0] = "amarokmysqld";
    server_options[1] = defaultsLine;
    server_options[2] = databaseLine;
    server_options[3] = "--default-storage-engine=MYISAM";
    server_options[4] = "--skip-innodb";
    server_options[5] = 0;

    char **server_groups = new char* [ 3 ];
    server_groups[0] = "amarokserver";
    server_groups[1] = "amarokclient";
    server_groups[2] = 0;

    mysql_library_init(num_elements, server_options, server_groups);
    m_db = mysql_init(NULL); // <- crash happens HERE
    delete [] server_options;
    delete [] server_groups;
    delete [] defaultsLine;
    delete [] databaseLine;
Thread
Odd crash with MySQL Embedded 5.1.28Ian Monroe26 Sep
  • Re: Odd crash with MySQL Embedded 5.1.28Ian Monroe26 Sep
    • RE: Odd crash with MySQL Embedded 5.1.28Martin Gainty26 Sep
      • Re: Odd crash with MySQL Embedded 5.1.28Ian Monroe26 Sep
    • Re: Odd crash with MySQL Embedded 5.1.28Ian Monroe27 Sep