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

Spider crash when selecting all rows from the partitioned table

    XMLWordPrintable

Details

    Description

      The following crash happens after upgrade to 10.5.8 (same setup worked in 10.4.11):

       
      210201 13:42:03 [ERROR] mysqld got exception 0xc0000005 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.5.8-MariaDB-log
      key_buffer_size=67108864
      read_buffer_size=1048576
      max_used_connections=82
      max_threads=65537
      thread_count=100
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 88784 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x27ed1cb7c88
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      ha_spider.dll!spider_flush_table_mon_cache_init()
      ha_spider.dll!spider_ping_table_init()
      ha_spider.dll!spider_ping_table_init()
      ha_spider.dll!spider_ping_table_init()
      server.dll!handler::ha_rnd_next()[handler.cc:3066]
      server.dll!ha_partition::rnd_next()[ha_partition.cc:5220]
      server.dll!handler::ha_rnd_next()[handler.cc:3066]
      server.dll!rr_sequential()[records.cc:519]
      server.dll!sub_select()[sql_select.cc:20616]
      server.dll!do_select()[sql_select.cc:20153]
      server.dll!JOIN::exec_inner()[sql_select.cc:4459]
      server.dll!JOIN::exec()[sql_select.cc:4241]
      server.dll!mysql_select()[sql_select.cc:4657]
      server.dll!handle_select()[sql_select.cc:417]
      server.dll!execute_sqlcom_select()[sql_parse.cc:6266]
      server.dll!mysql_execute_command()[sql_parse.cc:3968]
      server.dll!mysql_parse()[sql_parse.cc:8048]
      server.dll!dispatch_command()[sql_parse.cc:1875]
      server.dll!do_command()[sql_parse.cc:1353]
      server.dll!threadpool_process_request()[threadpool_common.cc:363]
      server.dll!tp_callback()[threadpool_common.cc:194]
      ntdll.dll!RtlReleaseSRWLockExclusive()
      ntdll.dll!RtlReleaseSRWLockExclusive()
      KERNEL32.DLL!BaseThreadInitThunk()
      ntdll.dll!RtlUserThreadStart()
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x27ed1cc11b0): select * from db.`spider_table
       
       limit 0, 1000
      Connection ID (thread ID): 25
      Status: NOT_KILLED
      ...
      

      The table has several partitions defined like these:

      PARTITION BY RANGE (`ID`)
      (PARTITION `pt1` VALUES LESS THAN (921201) 
        COMMENT = 'srv "archive", table "data_1900_2005"' ENGINE = SPIDER,
      ...
      PARTITION `pt10` VALUES LESS THAN (596063838) 
        COMMENT = 'srv "archive", table "data_2017_2019"' ENGINE = SPIDER,
      PARTITION `pt11` VALUES LESS THAN MAXVALUE 
        COMMENT = 'srv "current", table "db_current"' ENGINE = SPIDER); 
      

      The crash happens here according to the minidump created:

      ...
      CONTEXT:  (.ecxr)
      .ecxr
      rax=00000000020007d0 rbx=0000027ed23ff060 rcx=0000027ed23ff060
      rdx=00000000000001b8 rsi=0000000000000000 rdi=00000000020007d0
      rip=00007ff9e1b07c05 rsp=0000007f3735d5b0 rbp=0000027ed2f59bf0
       r8=0000000000000001  r9=0000000000000000 r10=0000027ed4a42118
      r11=0000007f3735d548 r12=0000000000000001 r13=00000000ffffffff
      r14=0000027ed2f59bf0 r15=00007ff9d6bccc38
      iopl=0         nv up ei pl zr na po nc
      cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010246
      ha_spider!spider_set_direct_limit_offset+0x45:
      00007ff9`e1b07c05 80b87a06000001  cmp     byte ptr [rax+67Ah],1 ds:00000000`02000e4a=??
      .cxr
      Resetting default scope
       
      FAULTING_IP: 
      ha_spider!spider_set_direct_limit_offset+45 [D:\winx64-packages\build\src\storage\spider\spd_table.cc @ 9354]
      00007ff9`e1b07c05 80b87a06000001  cmp     byte ptr [rax+67Ah],1
       
      EXCEPTION_RECORD:  (.exr -1)
      .exr -1
      ExceptionAddress: 00007ff9e1b07c05 (ha_spider!spider_set_direct_limit_offset+0x0000000000000045)
         ExceptionCode: c0000005 (Access violation)
        ExceptionFlags: 00000000
      NumberParameters: 2
         Parameter[0]: 0000000000000000
         Parameter[1]: 0000000002000e4a
      Attempt to read from address 0000000002000e4a
       
      DEFAULT_BUCKET_ID:  INVALID_POINTER_READ
       
      PROCESS_NAME:  mysqld.exe
       
      ERROR_CODE: (NTSTATUS) 0xc0000005 - <Unable to get error code text>
       
      EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - <Unable to get error code text>
       
      EXCEPTION_CODE_STR:  c0000005
       
      EXCEPTION_PARAMETER1:  0000000000000000
       
      EXCEPTION_PARAMETER2:  0000000002000e4a
       
      FOLLOWUP_IP: 
      ha_spider!spider_set_direct_limit_offset+45 [D:\winx64-packages\build\src\storage\spider\spd_table.cc @ 9354]
      00007ff9`e1b07c05 80b87a06000001  cmp     byte ptr [rax+67Ah],1
       
      READ_ADDRESS:  0000000002000e4a 
      ...
      

      I see nothing special in other threads, but maybe it's only me.

      Attachments

        Issue Links

          Activity

            People

              nayuta-yanagisawa Nayuta Yanagisawa (Inactive)
              valerii Valerii Kravchuk
              Votes:
              0 Vote for this issue
              Watchers:
              11 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.