Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 15E1D18F12 for ; Wed, 5 Aug 2015 08:04:45 +0000 (UTC) Received: (qmail 42333 invoked by uid 500); 5 Aug 2015 08:04:44 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 42272 invoked by uid 500); 5 Aug 2015 08:04:44 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 42259 invoked by uid 99); 5 Aug 2015 08:04:44 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2015 08:04:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E0EFBC0045 for ; Wed, 5 Aug 2015 08:04:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.001 X-Spam-Level: * X-Spam-Status: No, score=1.001 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id kVR1MtVmRv9T for ; Wed, 5 Aug 2015 08:04:35 +0000 (UTC) Received: from smtp02.mail.pcextreme.nl (smtp02.mail.pcextreme.nl [109.72.87.139]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTP id A297C42B18 for ; Wed, 5 Aug 2015 08:04:35 +0000 (UTC) Received: from [IPv6:2001:980:7936:0:6869:bf53:90c9:1cab] (unknown [IPv6:2001:980:7936:0:6869:bf53:90c9:1cab]) by smtp02.mail.pcextreme.nl (Postfix) with ESMTPSA id 440BC40008 for ; Wed, 5 Aug 2015 10:04:29 +0200 (CEST) Message-ID: <55C1C38F.9090901@widodh.nl> Date: Wed, 05 Aug 2015 10:04:31 +0200 From: Wido den Hollander User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: dev@cloudstack.apache.org Subject: MariaDB crash with loading CloudStack database Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi, I've just spent a few hours debugging why this failed: $ mvn -P developer -pl developer -Ddeploydb After about 30 seconds MariaDB (5.5 and 10.0) would crash: [WARNING] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) at java.lang.Thread.run(Thread.java:745) Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the database at com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:369) at com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:465) at com.cloud.upgrade.DatabaseCreator.main(DatabaseCreator.java:217) ... 6 more Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to execute upgrade script: /home/wido/repos/cloudstack/developer/target/db/db/schema-421to430.sql at com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:281) at com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:338) ... 8 more Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 27 milliseconds ago. The last packet sent successfully to the server was 1 milliseconds ago. After debugging I found that these two queries cause MariaDB to crash: UPDATE `cloud`.`configuration` SET value = CONCAT("*.",(SELECT `temptable`.`value` FROM (SELECT * FROM `cloud`.`configuration` WHERE `name`="consoleproxy.url.domain") AS `temptable` WHERE `temptable`.`name`="consoleproxy.url.domain")) WHERE `name`="consoleproxy.url.domain"; UPDATE `cloud`.`configuration` SET `value` = CONCAT("*.",(SELECT `temptable`.`value` FROM (SELECT * FROM `cloud`.`configuration` WHERE `name`="secstorage.ssl.cert.domain") AS `temptable` WHERE `temptable`.`name`="secstorage.ssl.cert.domain")) WHERE `name`="secstorage.ssl.cert.domain"; After I disabled these queries my data loads fine. 150805 9:49:04 [ERROR] mysqld got signal 11 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. To report this bug, see http://kb.askmonty.org/en/reporting-bugs We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. Server version: 10.0.20-MariaDB-1~trusty-log I'm not sure yet what this is, but should anybody run into it, disable those queries. I was running MariaDB on Ubuntu 14.04 in this case. (on my desktop). Wido