Odd crash with MySQL Embedded 5.1.28
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, [EMAIL PROTECTED], [EMAIL PROTECTED]) 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; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Odd crash with MySQL Embedded 5.1.28
On Fri, Sep 26, 2008 at 9:37 AM, Ian Monroe [EMAIL PROTECTED] wrote: 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? [snip] mysql_library_init(num_elements, server_options, server_groups); m_db = mysql_init(NULL); // - crash happens HERE So we did figure out that mysql_library_init is returning 1, which explains why mysql_init is crashing. But how do we figure out what exactly the '1' means? Any clues? Ian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Odd crash with MySQL Embedded 5.1.28
On Fri, Sep 26, 2008 at 2:27 PM, Martin Gainty [EMAIL PROTECTED] wrote: 2 items- check that the my.cnf file cannot be found on your path Yea its right, plus we tried switching to --no-defaults instead of specifying an (empty) file. That didn't work either. or your server groups are (usually just server, client) are incorrect How could they be incorrect? I only vaguely get what they are for, something about the config groups in my.cnf file. Ian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Odd crash with MySQL Embedded 5.1.28
On Fri, Sep 26, 2008 at 1:55 PM, Ian Monroe [EMAIL PROTECTED] wrote: On Fri, Sep 26, 2008 at 9:37 AM, Ian Monroe [EMAIL PROTECTED] wrote: 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? [snip] mysql_library_init(num_elements, server_options, server_groups); m_db = mysql_init(NULL); // - crash happens HERE So we did figure out that mysql_library_init is returning 1, which explains why mysql_init is crashing. But how do we figure out what exactly the '1' means? Any clues? I created a bug for this why is it returning 1? issue: http://bugs.mysql.com/39693 Ian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: how to figure out what options are supported, was Re: Odd crash with MySQL Embedded 5.1.28
On Fri, Sep 26, 2008 at 4:15 PM, Dan Nelson [EMAIL PROTECTED] wrote: In the last episode (Sep 26), Ian Monroe said: On Fri, Sep 26, 2008 at 1:55 PM, Ian Monroe [EMAIL PROTECTED] wrote: On Fri, Sep 26, 2008 at 9:37 AM, Ian Monroe [EMAIL PROTECTED] wrote: 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? [snip] mysql_library_init(num_elements, server_options, server_groups); m_db = mysql_init(NULL); // - crash happens HERE So we did figure out that mysql_library_init is returning 1, which explains why mysql_init is crashing. But how do we figure out what exactly the '1' means? Any clues? We figured it out: we had --skip-innodb, which crashed anyone who didn't have Innodb support built. Is there any way we could have it add --skip-innodb if and only if Innodb support is present? I can't find a mysql_* function that describes server functionality. A compile time option would work as well I suppose, since we're currently statically linking. You want --loose-skip-innodb. http://dev.mysql.com/doc/refman/5.0/en/command-line-options.html If an option is prefixed by --loose, a program does not exit with an error if it does not recognize the option, but instead issues only a warning: $ mysql --loose-no-such-option mysql: WARNING: unknown option '--no-such-option' Hey thanks, I think thats exactly what we need. Ian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
threading in mysql-embedded
In limitations of MySQL embedded it notes that InnoDB isn't reentrant. Simply putting a mutex around all calls to mysql should be sufficient correct? So different threads are OK, just not different threads at the same time. Correct? It kind of depends on the definition of reentrant being used so I ask. What are the rules for MyISAM and threads? Any general thoughts on what backend to use for mysql embedded also appreciated. We noticed that InnoDB seems to enjoy exit()ing on error conditions (like disk full) which isn't very nice. Ian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]