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

LP:766870 - Assertion `next_insert_id == 0' failed with handlersocket

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      The test suite bundled with handlersocket causes maria-5.3 to assert as follows:

      mysqld: handler.cc:4795: int handler::ha_external_lock(THD*, int): Assertion `next_insert_id == 0' failed.

      #6 0x00000035a6e2b8b5 in __assert_fail () from /lib64/libc.so.6
      #7 0x000000000081b8d3 in handler::ha_external_lock (this=0x7f7da4264a60, thd=0x7f7d8c004318, lock_type=2) at handler.cc:4795
      #8 0x0000000000691d02 in unlock_external (thd=0x7f7d8c004318, table=0x7f7d8c014090, count=1) at lock.cc:830
      #9 0x0000000000690c19 in mysql_unlock_tables (thd=0x7f7d8c004318, sql_lock=0x7f7d8c014068, free_lock=true) at lock.cc:390
      #10 0x00007f7e1c15d68c in dena::dbcontext::unlock_tables_if (this=0x7f7da422b130) at database.cpp:451
      #11 0x00007f7e1c16b32d in dena::hstcpsvr_worker::run_one_ep (this=0x7f7da422b090) at hstcpsvr_worker.cpp:544
      #12 0x00007f7e1c16a09a in dena::hstcpsvr_worker::run (this=0x7f7da422b090) at hstcpsvr_worker.cpp:318
      #13 0x00007f7e1c17331b in dena::worker_throbj::operator() (this=0x7f7da422ad90) at hstcpsvr.cpp:32
      #14 0x00007f7e1c1748de in dena::thread<dena::worker_throbj>::thread_main (arg=0x7f7da422ad90) at ./../libhsclient/thread.hpp:71
      #15 0x00000035a7207761 in start_thread () from /lib64/libpthread.so.0
      #16 0x00000035a6ee098d in clone () from /lib64/libc.so.6

      This is not repeatable with the stock mysql (the test passes correctly). I could not test Percona server since handlersocket refuses to compile/load in debug builds.

      To reproduce:

      1. compile with BUILD/compile-pentium64-debug-max

      2. start mysqld

      cd mysql-test && LD_LIBRARY_PATH=../plugin/handler_socket/libhsclient/.libs MTR_VERSION=1 perl mysql-test-run.pl -start-and-exit 1st --mysqld=plugin-dir=../plugin/handler_socket/handlersocket/.libs --mysqld=loose-handlersocket_port=9998 --mysqld=loose-handlersocket_port_wr=9999 --master_port=9306 --mysqld=-innodb

      3. load handlersocket

      client/mysql -uroot --protocol=tcp --port=9306 -e 'INSTALL PLUGIN handlersocket soname "handlersocket.so"'

      4. configure and compile the handlersocket perl module

      cd plugin/handler_socket/perl-Net-HandlerSocket && perl Makefile.PL
      cd plugin/handler_socket/perl-Net-HandlerSocket && make

      4. run handlersocket test suite

      cd plugin/handler_socket/regtest/test_01_lib && MYHOST=127.0.0.1 MYPORT=9306 LD_LIBRARY_PATH=../../libhsclient/.libs/ PERL5LIB=../common:../../perl-Net-HandlerSocket/lib:../../perl-Net-HandlerSocket/blib/arch/auto/Net/HandlerSocket/ ./run.sh

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            philipstoev Philip Stoev added a comment -

            Re: Assertion `next_insert_id == 0' failed with handlersocket
            Monty said sergefp is to look at this bug.

            Show
            philipstoev Philip Stoev added a comment - Re: Assertion `next_insert_id == 0' failed with handlersocket Monty said sergefp is to look at this bug.
            Hide
            philipstoev Philip Stoev added a comment -

            Re: Assertion `next_insert_id == 0' failed with handlersocket
            Monty said he will take this bug.

            Show
            philipstoev Philip Stoev added a comment - Re: Assertion `next_insert_id == 0' failed with handlersocket Monty said he will take this bug.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 766870

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 766870

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: