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

Windows: crash when mariadbd.exe tries to load plugin which is linked to mysqld.exe

    XMLWordPrintable

Details

    Description

      Example : https://ci.appveyor.com/project/rasmushoj/server/builds/32088322

      There is a weird mix of mariadbd.exe and mysqld.exe in the crashes, in scenarious where plugins are used.

      Take a look how Create_tmp_table::add_schema_fields() from mariadbd.exe calls Type_handler_longlong::make_schema_field() from mysqld.exe below

      [00:23:38] Attempting backtrace. You can use the following information to find out
      [00:23:38] where mysqld died. If you see no messages after this, something went
      [00:23:38] terribly wrong...
      [00:23:38] 
      [00:23:38] mysqld.exe!my_malloc()[my_malloc.c:88]
      [00:23:38] mysqld.exe!alloc_root()[my_alloc.c:243]
      [00:23:38] mysqld.exe!Type_handler_longlong::make_schema_field()[sql_type.cc:3951]
      [00:23:38] mariadbd.exe!Create_tmp_table::add_schema_fields()[sql_select.cc:19111]
      [00:23:38] mariadbd.exe!create_tmp_table_for_schema()[sql_select.cc:19182]
      [00:23:38] mariadbd.exe!create_schema_table()[sql_show.cc:8097]
      [00:23:38] mariadbd.exe!mysql_schema_table()[sql_show.cc:8308]
      [00:23:38] mariadbd.exe!open_and_process_table()[sql_base.cc:3622]
      [00:23:38] mariadbd.exe!open_tables()[sql_base.cc:4215]
      [00:23:38] mariadbd.exe!open_and_lock_tables()[sql_base.cc:5110]
      [00:23:38] mariadbd.exe!execute_sqlcom_select()[sql_parse.cc:6089]
      [00:23:38] mariadbd.exe!mysql_execute_command()[sql_parse.cc:3901]
      [00:23:38] mariadbd.exe!mysql_parse()[sql_parse.cc:7958]
      [00:23:38] mariadbd.exe!dispatch_command()[sql_parse.cc:1842]
      [00:23:38] mariadbd.exe!do_command()[sql_parse.cc:1358]
      [00:23:38] mariadbd.exe!threadpool_process_request()[threadpool_common.cc:356]
      [00:23:38] mariadbd.exe!tp_callback()[threadpool_common.cc:195]
      [00:23:38] ntdll.dll!RtlReleaseSRWLockExclusive()
      [00:23:38] ntdll.dll!RtlReleaseSRWLockExclusive()
      [00:23:38] KERNEL32.DLL!BaseThreadInitThunk()
      [00:23:38] ntdll.dll!RtlUserThreadStart()
      [00:23:38] 
      [00:23:38] Trying to get some variables.
      [00:23:38] Some pointers may be invalid and cause the dump to abort.
      [00:23:38] Query (0x174659aa420): SELECT lock_mode FROM information_schema.metadata_lock_info WHERE lock_type='Backup lock'
      [00:23:38] Connection ID (thread ID): 5
      [00:23:38] Status: NOT_KILLED
      

      Interestingly, this does not happen on buildbot, which has a slightly more recent Windows
      and VS version (not sure whether VS is involved)

      What happens is that one executable (mariadbd.exe) , e.g loads a shared library (plugin), which is "linked" to another executable(mysqld.exe), and on some reason some functions will then be taken from another exe. This can't work well, but on some reason it does on buildbot. Perhaps more recent Windows OS loader figures out that mysqld.exe is a hardlink to mariadbd.exe.

      Attachments

        Issue Links

          Activity

            People

              wlad Vladislav Vaintroub
              wlad Vladislav Vaintroub
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.