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

Server crashes while continuously inserting records with MediumBlob data field.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.5.12
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Raspberry PI - 4B ( 4GB Ram), mariadb version 10.5.12

      Description

      *1) I created a table with multiple columns of Medium Blob field. *

      create table TABLE1(B1 MEDIUMBLOB, B2 MEDIUMBLOB, B3 MEDIUMBLOB, B4 MEDIUMBLOB, B5 MEDIUMBLOB, B6 MEDIUMBLOB, B7 MEDIUMBLOB, B8 MEDIUMBLOB, B9 MEDIUMBLOB, B10 MEDIUMBLOB);

      2) the client code is in JavaScript-NodeJs combo. Below is the code for your reference.

      const mysql = require("mysql");
      var i=0;
       
      const db = mysql.createPool({
        user: "root",
        host: "localhost",
        password: "1234",
        database: "testDB",
      });
      var q=0;
      for (var a=0;a<1000;a++){
      	console.log("before query: " + a);
      db.query(
          `INSERT INTO TABLE1(B1, B2, B3, B4, B5, B6, B7, B8, B9, B10) VALUES(load_file("/var/lib/mysql-files/binfile1"),load_file("/var/lib/mysql-files/binfile2"),load_file("/var/lib/mysql-files/binfile1"),load_file("/var/lib/mysql-files/binfile1"),"NA","NA","NA","NA", "NA", "NA")`,
          (err, result) => {
            if (err) {
              console.log("error", err);
            } else {
              console.log("query successs: " + q++);
            }
          }
      );
      i++;
      }
      

      *AFter some time I receive the below error. *

      Feb 11 02:42:57 raspberrypi mariadbd[11825]: 2022-02-11  2:42:57 213 [Warning] Aborted      connection 213 to db: 'testDB' user: 'root' host: 'localhost' (Got an error reading c     ommunication packets)
      4975 Feb 11 02:59:10 raspberrypi mariadbd[11825]: 2022-02-11  2:59:10 0 [ERROR] InnoDB: Spa     ce id and page no stored in the page, read in are [page id: space=9, page number=97984     ], should be [page id: space=9, page number=360128]
      4976 Feb 11 02:59:10 raspberrypi mariadbd[11825]: InnoDB: Next record offset is nonsensical      52955 in record at offset 101
      4977 Feb 11 02:59:10 raspberrypi mariadbd[11825]: InnoDB: rec address 0x9eb7c065, space id      9, page 97984
      4978 Feb 11 02:59:10 raspberrypi mariadbd[11825]: 2022-02-11 02:59:10 0x999f5380  InnoDB: A     ssertion failure in file ./storage/innobase/include/page0page.ic line 445
      4979 Feb 11 02:59:10 raspberrypi mariadbd[11825]: InnoDB: We intentionally generate a memor     y trap.
      4980 Feb 11 02:59:10 raspberrypi mariadbd[11825]: InnoDB: Submit a detailed bug report to h     ttps://jira.mariadb.org/
      4981 Feb 11 02:59:10 raspberrypi mariadbd[11825]: InnoDB: If you get repeated assertion fai     lures or crashes, even
      4982 Feb 11 02:59:10 raspberrypi mariadbd[11825]: InnoDB: immediately after the mysqld star     tup, there may be
      Feb 11 02:59:10 raspberrypi mariadbd[11825]: InnoDB: corruption in the InnoDB tablespa     ce. Please refer to
      4984 Feb 11 02:59:10 raspberrypi mariadbd[11825]: InnoDB: https://mariadb.com/kb/en/library     /innodb-recovery-modes/
      4985 Feb 11 02:59:10 raspberrypi mariadbd[11825]: InnoDB: about forcing recovery.
      4986 Feb 11 02:59:10 raspberrypi mariadbd[11825]: 220211  2:59:10 [ERROR] mysqld got signal      6 ;
      4987 Feb 11 02:59:10 raspberrypi mariadbd[11825]: This could be because you hit a bug. It i     s also possible that this binary
      4988 Feb 11 02:59:10 raspberrypi mariadbd[11825]: or one of the libraries it was linked aga     inst is corrupt, improperly built,
      4989 Feb 11 02:59:10 raspberrypi mariadbd[11825]: or misconfigured. This error can also be      caused by malfunctioning hardware.
      4990 Feb 11 02:59:10 raspberrypi mariadbd[11825]: To report this bug, see https://mariadb.c     om/kb/en/reporting-bugs
      4991 Feb 11 02:59:10 raspberrypi mariadbd[11825]: We will try our best to scrape up some in     fo that will hopefully help
      4992 Feb 11 02:59:10 raspberrypi mariadbd[11825]: diagnose the problem, but since we have a     lready crashed,
      4993 Feb 11 02:59:10 raspberrypi mariadbd[11825]: something is definitely wrong and this ma     y fail.
      Feb 11 02:59:10 raspberrypi mariadbd[11825]: Server version: 10.5.12-MariaDB-0+deb11u1
      4995 Feb 11 02:59:10 raspberrypi mariadbd[11825]: key_buffer_size=134217728
      4996 Feb 11 02:59:10 raspberrypi mariadbd[11825]: read_buffer_size=131072
      4997 Feb 11 02:59:10 raspberrypi mariadbd[11825]: max_used_connections=12
      4998 Feb 11 02:59:10 raspberrypi mariadbd[11825]: max_threads=153
      4999 Feb 11 02:59:10 raspberrypi mariadbd[11825]: thread_count=11
      5000 Feb 11 02:59:10 raspberrypi mariadbd[11825]: It is possible that mysqld could use up t     o
      5001 Feb 11 02:59:10 raspberrypi mariadbd[11825]: key_buffer_size + (read_buffer_size + sor     t_buffer_size)*max_threads = 466524 K  bytes of memory
      5002 Feb 11 02:59:10 raspberrypi mariadbd[11825]: Hope that's ok; if not, decrease some var     iables in the equation.
      5003 Feb 11 02:59:10 raspberrypi mariadbd[11825]: Thread pointer: 0x0
      Feb 11 02:59:10 raspberrypi mariadbd[11825]: Attempting backtrace. You can use the following information to find out
      Feb 11 02:59:10 raspberrypi mariadbd[11825]: where mysqld died. If you see no messages after this, something went
      Feb 11 02:59:10 raspberrypi mariadbd[11825]: terribly wrong...
      Feb 11 02:59:10 raspberrypi mariadbd[11825]: stack_bottom = 0x0 thread_stack 0x49000
      Feb 11 02:59:10 raspberrypi mariadbd[11825]: The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
      Feb 11 02:59:10 raspberrypi mariadbd[11825]: information that should help you find out what is causing the crash.
      

      *3) Below are different setting values. *

      Variable_name | Value |
      +-------------------------------------+----------------+
      | aria_pagecache_buffer_size | 134217728 |
      | aria_sort_buffer_size | 268434432 |
      | bulk_insert_buffer_size | 8388608 |
      | innodb_buffer_pool_chunk_size | 134217728 |
      | innodb_buffer_pool_dump_at_shutdown | ON |
      | innodb_buffer_pool_dump_now | OFF |
      | innodb_buffer_pool_dump_pct | 25 |
      | innodb_buffer_pool_filename | ib_buffer_pool |
      | innodb_buffer_pool_instances | 1 |
      | innodb_buffer_pool_load_abort | OFF |
      | innodb_buffer_pool_load_at_startup | ON |
      | innodb_buffer_pool_load_now | OFF |
      | innodb_buffer_pool_size | 134217728 |
      | innodb_change_buffer_max_size | 25 |
      | innodb_change_buffering | all |
      | innodb_log_buffer_size | 16777216 |
      | innodb_sort_buffer_size | 1048576 |
      | join_buffer_size | 262144 |
      | join_buffer_space_limit | 2097152 |
      | key_buffer_size | 134217728 |
      | mrr_buffer_size | 262144 |
      | myisam_sort_buffer_size | 134216704 |
      | net_buffer_length | 16384 |
      | preload_buffer_size | 32768 |
      | read_buffer_size | 131072 |
      | read_rnd_buffer_size | 262144 |
      | sort_buffer_size | 2097152 |
      | sql_buffer_result | OFF |
      

      please advise.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jelari Jelari
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration

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