Bug 13561 - mariadb should be built with gcc flag -fno-delete-null-pointer-checks when gcc-4.9.x is used
Summary: mariadb should be built with gcc flag -fno-delete-null-pointer-checks when g...
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Oden Eriksson
QA Contact:
URL: https://mariadb.atlassian.net/browse/...
: 13699 (view as bug list)
Depends on:
Reported: 2014-06-21 11:51 CEST by Frédéric Guardia
Modified: 2014-07-20 12:33 CEST (History)
7 users (show)

See Also:
Source RPM: mariadb-10.0.12-1.mga5.src.rpm
Status comment:

mariadb.spec diff file (456 bytes, patch)
2014-07-08 19:03 CEST, Frédéric Guardia
Details | Diff

Description Frédéric Guardia 2014-06-21 11:51:27 CEST
Description of problem:
since the update to version 10.0.12 mariadb server crash. Problem seen with akonadi in kde. Currently akonadi is broken: we can see this crash in the log file  ~/.local/share/akonadi/db_data/mysql.err

Version-Release number of selected component (if applicable):

How reproducible:
Update mariadb to 10.0.12-1mga5 

Steps to Reproduce:
1. akonadictl restart
2. see log file ~/.local/share/akonadi/db_data/mysql.err content

this crash is fixed by building mariadb package with the following additionnal flags when gcc-4.9.x is used (tested and working): -DCMAKE_C_FLAGS="-fno-delete-null-pointer-checks" -DCMAKE_CXX_FLAGS="-fno-delete-null-pointer-checks"

this solution is found here https://mariadb.atlassian.net/browse/MDEV-6360


Steps to Reproduce:
David Walser 2014-06-22 17:52:47 CEST

CC: (none) => alien
Assignee: bugsquad => oe

Florian Hubold 2014-06-22 22:56:23 CEST

CC: (none) => doktor5000

Thomas Bigot 2014-06-24 09:17:12 CEST

CC: (none) => thomas.bigot

Comment 1 Daniel Lucio 2014-07-02 15:10:50 CEST
Not working here, i did rebuild mariadb and added the -DCMAKE_C_FLAGS="-fno-delete-null-pointer-checks" -DCMAKE_CXX_FLAGS="-fno-delete-null-pointer-checks" in the cmake.

I see gcc being called now with no-delete-null-pointer-check flag, but akonadi still doesnt starts.

CC: (none) => luis.daniel.lucio

Comment 2 Florian Hubold 2014-07-02 18:30:03 CEST
(In reply to Daniel Lucio from comment #1)
> Not working here, i did rebuild mariadb and added the
> -DCMAKE_C_FLAGS="-fno-delete-null-pointer-checks"
> -DCMAKE_CXX_FLAGS="-fno-delete-null-pointer-checks" in the cmake.

Where did you add those flags exactly?

@Frederic: If you already rebuilt the package and it works for you, could you please provide a diff to the SPEC file please?
Comment 3 AL13N 2014-07-02 20:36:38 CEST
FYI: i've contacted upstream, there's a MDEV on it, and they are not just gonna add this blindly, but they are gonna investigate why exactly

this 'll take some time, i imagine...
Comment 4 AL13N 2014-07-04 17:07:19 CEST
full backtrace from blino... looks exactly like the one in the MDEV:

Olivier Blin 2014-07-04 17:33:51 CEST

CC: (none) => mageia

Comment 5 Frédéric Guardia 2014-07-08 19:03:00 CEST
This is my diff file regarding mariadb.spec

--- mariadb.spec~       2014-06-16 18:36:35.000000000 +0200
+++ mariadb.spec        2014-06-21 10:36:35.000000000 +0200
@@ -503,7 +503,9 @@
 export LC_ALL=C
 %cmake \
-    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+    -DCMAKE_C_FLAGS="-fno-delete-null-pointer-checks" \
+    -DCMAKE_CXX_FLAGS="-fno-delete-null-pointer-checks" \
+    -DCMAKE_BUILD_TYPE=Release \
     -DCMAKE_INSTALL_PREFIX=%{_prefix} \
     -DMYSQL_DATADIR=/var/lib/mysql \
Comment 6 Frédéric Guardia 2014-07-08 19:03:53 CEST
Created attachment 5271 [details]
mariadb.spec diff file
Comment 7 AL13N 2014-07-09 22:30:23 CEST
why do you want to get rid of debug info?

i've committed the FLAGS, and started a build... can you check if this works?
Comment 8 Thomas Bigot 2014-07-10 10:29:56 CEST
I confirm akonadi is back, thanks!
Comment 9 Frédéric Guardia 2014-07-10 19:43:48 CEST
I confirm too.
Comment 10 Frédéric Guardia 2014-07-10 19:51:55 CEST

(In reply to AL13N from comment #7)
> why do you want to get rid of debug info?

Because this working solution was posted on mariadb dashboard (https://mariadb.atlassian.net/browse/MDEV-6360) and I didn't investigate more from my side. I will try to rebuild mriadb from my side but this time with -DCMAKE_BUILD_TYPE=RelWithDebInfo to see if it's really necessary to change it. I will report this result ASAP.
Comment 11 Frédéric Guardia 2014-07-11 17:34:32 CEST
mariadb works also with -DCMAKE_BUILD_TYPE=RelWithDebInfo (tested) so it's like you want.
Comment 12 Luc Menut 2014-07-20 12:31:09 CEST
*** Bug 13699 has been marked as a duplicate of this bug. ***

CC: (none) => maurice

Comment 13 Luc Menut 2014-07-20 12:33:24 CEST
Fixed with mariadb-10.0.12-2.mga5.

CC: (none) => lmenut
Resolution: (none) => FIXED

Note You need to log in before you can comment on or make changes to this bug.