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

XtraDB thread never exits. Always in 'cleaning up'

    XMLWordPrintable

Details

    • 10.0.25

    Description

      I've been having an issue with an instance of MariaDB 10.1.12 on a non-production machine which makes it never shutdown. It just hangs forever with "waiting for transaction".

      This was odd as nothing was showing in "SHOW FULL PROCESSLIST"

      I discovered a transaction thread never finishes.
      This is the data collected. If you need more, let met know.

      MariaDB [(none)]> show full processlist\G
      *************************** 1. row ***************************
            Id: 80
          User: root
          Host: localhost
            db: NULL
       Command: Query
          Time: 0
         State: init
          Info: show full processlist
      Progress: 0.000
      1 row in set (0.00 sec)
       
      MariaDB [(none)]> show engine innodb status\G
      *************************** 1. row ***************************
        Type: InnoDB
        Name:
      Status:
      =====================================
      2016-03-16 10:03:21 7ff7fc505700 INNODB MONITOR OUTPUT
      =====================================
      Per second averages calculated from the last 25 seconds
      -----------------
      BACKGROUND THREAD
      -----------------
      srv_master_thread loops: 50 srv_active, 0 srv_shutdown, 673746 srv_idle
      srv_master_thread log flush and writes: 673567
      ----------
      SEMAPHORES
      ----------
      OS WAIT ARRAY INFO: reservation count 118
      OS WAIT ARRAY INFO: signal count 120
      Mutex spin waits 2904, rounds 3613, OS waits 53
      RW-shared spins 68, rounds 1956, OS waits 64
      RW-excl spins 3, rounds 50, OS waits 1
      Spin rounds per wait: 1.24 mutex, 28.76 RW-shared, 16.67 RW-excl
      ------------
      TRANSACTIONS
      ------------
      Trx id counter 5443238
      Purge done for trx's n:o < 5443232 undo n:o < 0 state: running but idle
      History list length 541
      LIST OF TRANSACTIONS FOR EACH SESSION:
      ---TRANSACTION 0, not started
      MySQL thread id 80, OS thread handle 0x7ff7fc505700, query id 2271 localhost root init
      show engine innodb status
      ---TRANSACTION 0, not started
      MySQL thread id 24, OS thread handle 0x7ff7ff267700, query id 174 cleaning up
      --------
      FILE I/O
      --------
      I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
      I/O thread 1 state: waiting for completed aio requests (log thread)
      I/O thread 2 state: waiting for completed aio requests (read thread)
      I/O thread 3 state: waiting for completed aio requests (read thread)
      I/O thread 4 state: waiting for completed aio requests (read thread)
      I/O thread 5 state: waiting for completed aio requests (read thread)
      I/O thread 6 state: waiting for completed aio requests (write thread)
      I/O thread 7 state: waiting for completed aio requests (write thread)
      I/O thread 8 state: waiting for completed aio requests (write thread)
      I/O thread 9 state: waiting for completed aio requests (write thread)
      Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] ,
       ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
      Pending flushes (fsync) log: 0; buffer pool: 0
      2049 OS file reads, 621 OS file writes, 280 OS fsyncs
      0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
      -------------------------------------
      INSERT BUFFER AND ADAPTIVE HASH INDEX
      -------------------------------------
      Ibuf: size 1, free list len 1842, seg size 1844, 0 merges
      merged operations:
       insert 0, delete mark 0, delete 0
      discarded operations:
       insert 0, delete mark 0, delete 0
      0.00 hash searches/s, 0.00 non-hash searches/s
      ---
      LOG
      ---
      Log sequence number 225203203047
      Log flushed up to   225203203047
      Pages flushed up to 225203203047
      Last checkpoint at  225203203047
      Max checkpoint age    80354304
      Checkpoint age target 77843232
      Modified age          0
      Checkpoint age        0
      0 pending log writes, 0 pending chkp writes
      201 log i/o's done, 0.00 log i/o's/second
      ----------------------
      BUFFER POOL AND MEMORY
      ----------------------
      Total memory allocated 138412032; in additional pool allocated 0
      Total memory allocated by read views 200
      Internal hash tables (constant factor + variable factor)
          Adaptive hash index 2561632         (2213368 + 348264)
          Page hash           139112 (buffer pool 0 only)
          Dictionary cache    2001389         (554768 + 1446621)
          File system         938224  (812272 + 125952)
          Lock system         333592  (332872 + 720)
          Recovery system     0       (0 + 0)
      Dictionary memory allocated 1446621
      Buffer pool size        8191
      Buffer pool size, bytes 134201344
      Free buffers            6575
      Database pages          1595
      Old database pages      607
      Modified db pages       0
      Percent of dirty pages(LRU & free pages): 0.000
      Max dirty pages percent: 75.000
      Pending reads 0
      Pending writes: LRU 0, flush list 0, single page 0
      Pages made young 0, not young 0
      0.00 youngs/s, 0.00 non-youngs/s
      Pages read 1572, created 23, written 369
      0.00 reads/s, 0.00 creates/s, 0.00 writes/s
      No buffer pool page gets since the last printout
      Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
      LRU len: 1595, unzip_LRU len: 0
      I/O sum[0]:cur[0], unzip sum[0]:cur[0]
      --------------
      ROW OPERATIONS
      --------------
      0 queries inside InnoDB, 0 queries in queue
      0 read views open inside InnoDB
      0 RW transactions active inside InnoDB
      0 RO transactions active inside InnoDB
      0 out of 1000 descriptors used
      Main thread process no. 3914, id 140702637872896, state: sleeping
      Number of rows inserted 157, updated 37, deleted 850, read 188280
      0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
      Number of system rows inserted 0, updated 0, deleted 0, read 0
      0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
      ----------------------------
      END OF INNODB MONITOR OUTPUT
      ============================
       
      1 row in set (0.00 sec)
       
      MariaDB [(none)]>
      

      Attachments

        1. my.cnf
          5 kB
        2. mysqld.err
          47 kB
        3. thread-trace.txt
          57 kB

        Issue Links

          Activity

            People

              jplindst Jan Lindström (Inactive)
              grknight Brian Evans
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.