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

Assertion `pins->pin[i] == 0' failed in _lf_pinbox_put_pins on concurrent OPTIMIZE TABLE and DML with Aria tables

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.5.25
    • Fix Version/s: 5.5.27
    • Component/s: None
    • Labels:
      None

      Description

      mysqld: maria-5.5/mysys/lf_alloc-pin.c:220: _lf_pinbox_put_pins: Assertion `pins->pin[i] == 0' failed.
      [ERROR] mysqld got signal 6 ;

      #6  0x00007f912f074d4d in __GI___assert_fail (assertion=0xe7f086 "pins->pin[i] == 0", file=<optimized out>, line=220, function=<optimized out>) at assert.c:81
      #7  0x0000000000cc6aff in _lf_pinbox_put_pins (pins=0x3af2280) at mysys/lf_alloc-pin.c:220
      #8  0x000000000095b94d in lf_pinbox_put_pins (pins=0x3af2280) at include/lf.h:173
      #9  0x000000000095ca10 in trnman_end_trn (trn=0x3b1c860, commit=1 '\001') at storage/maria/trnman.c:515
      #10 0x000000000098fb17 in ma_commit (trn=0x3b1c860) at storage/maria/ma_commit.c:72
      #11 0x000000000095867b in ha_maria::implicit_commit (thd=0x3b6ed20, new_trn=false) at storage/maria/ha_maria.cc:2824
      #12 0x0000000000614484 in mysql_execute_command (thd=0x3b6ed20) at sql/sql_parse.cc:4518
      #13 0x0000000000617299 in mysql_parse (thd=0x3b6ed20, rawbuf=0x3b7a868 "DELETE FROM `B` WHERE `pk` >= 0 LIMIT 2", length=39, parser_state=0x7f912629c550) at sql/sql_parse.cc:5736
      #14 0x000000000060ab0f in dispatch_command (command=COM_QUERY, thd=0x3b6ed20, packet=0x3b72751 "DELETE FROM `B` WHERE `pk` >= 0 LIMIT 2", packet_length=39) at sql/sql_parse.cc:1055
      #15 0x0000000000609dc6 in do_command (thd=0x3b6ed20) at sql/sql_parse.cc:794
      #16 0x000000000070b6af in do_handle_one_connection (thd_arg=0x3b6ed20) at sql/sql_connect.cc:1253
      #17 0x000000000070b09a in handle_one_connection (arg=0x3b6ed20) at sql/sql_connect.cc:1168
      #18 0x00007f912fdb6efc in start_thread (arg=0x7f912629d700) at pthread_create.c:304

      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x3b7a868): DELETE FROM `B` WHERE `pk` >= 0 LIMIT 2
      Connection ID (thread ID): 9
      Status: NOT_KILLED

      All threads' stack trace is attached.

      maria/5.5
      bzr version-info
      revision-id: sergii@pisem.net-20120822213345-yhkfv11akr0di65o
      date: 2012-08-22 23:33:45 +0200
      build-date: 2012-08-24 04:17:42 +0400
      revno: 3503

      Could not reproduce on maria/5.3.
      On release builds instead of the assertion the flow sometimes just hangs, seemingly forever. Observed on 5.5.25 and 5.5.24.

      RQG grammar (1.yy)

      thread1:
              OPTIMIZE TABLE _table ;
       
      thread2:
              OPTIMIZE TABLE _table ;
       
      query:
              DELETE FROM _table WHERE `pk` >= _digit LIMIT 2 | 
              INSERT INTO _table ( `pk` ) VALUES (NULL);

      Command line to run:

      perl ./runall.pl  --queries=100M --duration=600 --engine=Aria --grammar=1.yy  --basedir=<basedir> 

      For me it crashes within 1-3 minutes after the start. It seems to be enough to run the test with 3 threads only (2 for OPTIMIZE and 1 for DML), but with more it happens faster, so I've left the default number of 8 threads on the command line above.

        Attachments

          Activity

            People

            • Assignee:
              serg Sergei Golubchik
              Reporter:
              elenst Elena Stepanova
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: