Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25633

MariaDB crashes when compiled with link time optimizations

    XMLWordPrintable

    Details

      Description

      Following the release of MariaDB 10.5.10 on Hirsute, we have discovered that appending -flto and -ffat-lto-objects as compile flags will cause MariaDB to crash with SIGABRT in pthread_exit when closing the replication slave thread.

      This is happens regardless if MariaDB is compiled with PERFSCHEMA or not.

      Steps to reproduce:

      Set up an Ubuntu 21.04 docker container or VM.

      run

      debian/autobake-deb.sh
      

      or

      dpkg-buildpackage --build=binary
      

      from the base server directory.

      Notice the extra -flto and -ffat-lto-objects flags being passed during compilation (and linking).

      Run any replication test such as rpl_sp

      #1  0x00007f5831212864 in __GI_abort () at abort.c:79
      #2  0x000055ffc77d5bc1 in _Unwind_SetGR.cold ()
      #3  0x000055ffc7fa575d in __gcc_personality_v0 ()
      #4  0x00007f5830fb1604 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
      #5  0x00007f5830fb1cf2 in _Unwind_ForcedUnwind () from /lib/x86_64-linux-gnu/libgcc_s.so.1
      #6  0x00007f5831c76d46 in __GI___pthread_unwind (buf=<optimized out>) at unwind.c:131
      #7  0x00007f5831c6e732 in __do_cancel () at pthreadP.h:307
      #8  __pthread_exit (value=value@entry=0x0) at pthread_exit.c:28
      #9  0x000055ffc784b1b3 in handle_slave_sql (arg=0x55ffcb161d00) at ./sql/slave.cc:5298
      #10 0x00007f5831c6d450 in start_thread (arg=0x7f58240dd640) at pthread_create.c:473
      #11 0x00007f5831303d53 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

        Attachments

          Activity

            People

            Assignee:
            cvicentiu Vicențiu Ciorbaru
            Reporter:
            cvicentiu Vicențiu Ciorbaru
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration