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

Service registered with deprecated "mysqld.exe --install" crashes on startup

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.5.4
    • 10.5.5
    • Platform Windows, Server
    • None
    • Windows 10 18363

    Description

      Today i tried upgrading from 10.4.13 to 10.5.4 without success. On my windows machine i've installed Mariadb as a service.

      When i upgrade mariadb server files and than want to start the server again, it crashes instantly. In windows errors logs i have the following error message.

      I've seen that with 10.5.x the ucrtbase.dll is not shipped anymore with the "bin" folder of mariadb. Now this missing module is taken from my Windows/System32 folder which results in a crash, maybe because it's incompatible with mariadb.

      I cannot get it to work. I have reverted back to 10.4.13 which works like a charm.

      Name der fehlerhaften Anwendung: mysqld.exe, Version: 10.5.4.0, Zeitstempel: 0x5ef224e3
      Name des fehlerhaften Moduls: ucrtbase.dll, Version: 10.0.18362.815, Zeitstempel: 0x32a6df9a
      Ausnahmecode: 0xc0000005
      Fehleroffset: 0x0000000000023838
      ID des fehlerhaften Prozesses: 0x314c
      Startzeit der fehlerhaften Anwendung: 0x01d64dd9d949e3c3
      Pfad der fehlerhaften Anwendung: c:\srv\mariadb\bin\mysqld.exe
      Pfad des fehlerhaften Moduls: C:\Windows\System32\ucrtbase.dll
      Berichtskennung: fac4cfb2-9443-4387-bd34-598660c851dc
      Vollständiger Name des fehlerhaften Pakets: 
      Anwendungs-ID, die relativ zum fehlerhaften Paket ist: 
      

      Attachments

        1. mariadb.zip
          474 kB
        2. Report.zip
          4 kB

        Issue Links

          Activity

            BrainFooLong Roland added a comment -

            Ok, thanks for that hint. But, to make things worse, i've now tried various things and it turns out that i CAN start mysqld by hand with command line, with or without providing the path to the ini.

            If i just start from command line (with and without elevated user), the mysqld starts fine and database is working correct.

            But if i want to start it from windows services, it doesn't work, no matter what i try. By default, the service run as system user. I tried several users, admin, normal and system user. No user can start mysqld from the service window, but every user can start directly from command line.

            I've also tried deleting and re-installing the service with "mysqld --install MariaDB". Doesn't help.

            For that reason, i cannot give you a dump when it crashes, because i cannot intercept the service call that crashes with procdump.

            I don't know what to do now. All logs that i have when it crashes are already uploaded here.

            BrainFooLong Roland added a comment - Ok, thanks for that hint. But, to make things worse, i've now tried various things and it turns out that i CAN start mysqld by hand with command line, with or without providing the path to the ini. If i just start from command line (with and without elevated user), the mysqld starts fine and database is working correct. But if i want to start it from windows services, it doesn't work, no matter what i try. By default, the service run as system user. I tried several users, admin, normal and system user. No user can start mysqld from the service window, but every user can start directly from command line. I've also tried deleting and re-installing the service with "mysqld --install MariaDB". Doesn't help. For that reason, i cannot give you a dump when it crashes, because i cannot intercept the service call that crashes with procdump. I don't know what to do now. All logs that i have when it crashes are already uploaded here.
            wlad Vladislav Vaintroub added a comment - - edited

            I fixed the title to reflect what actually happened. The mysqld --install is the culprit, if you just told it from the start on.

            For temporary workaround, you can hack in a registry
            Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MariaDB
            Change "ImagePath" value to be

            c:\srv\mariadb\bin\mysqld.exe "--defaults-file=C:\srv\mariadb\data\my.ini" mariadb

            And yes, you'd need a valid --defaults-file, a different path is OK

            wlad Vladislav Vaintroub added a comment - - edited I fixed the title to reflect what actually happened. The mysqld --install is the culprit, if you just told it from the start on. For temporary workaround, you can hack in a registry Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MariaDB Change "ImagePath" value to be c:\srv\mariadb\bin\mysqld.exe "--defaults-file=C:\srv\mariadb\data\my.ini" mariadb And yes, you'd need a valid --defaults-file, a different path is OK
            BrainFooLong Roland added a comment -

            Thanks. I can confirm that the regedit hack does work. I see that with 10.5.5 this already should be fixed. Need we need to re-install services with 10.5.5 in order to fix this issue?

            BrainFooLong Roland added a comment - Thanks. I can confirm that the regedit hack does work. I see that with 10.5.5 this already should be fixed. Need we need to re-install services with 10.5.5 in order to fix this issue?

            I think it would be a fine to just live with registry "hack" for the time being. Unless you specifically want to test 10.5.5 fix, when it comes out. The registry structure like this is completely legit, this is how better supported mysql_install_db.exe would create it, 2 parameters for mysqld, rather than 1 (defaults-file and service name)

            wlad Vladislav Vaintroub added a comment - I think it would be a fine to just live with registry "hack" for the time being. Unless you specifically want to test 10.5.5 fix, when it comes out. The registry structure like this is completely legit, this is how better supported mysql_install_db.exe would create it, 2 parameters for mysqld, rather than 1 (defaults-file and service name)
            BrainFooLong Roland added a comment -

            Ok. We have a lot of long running MariaDb servers that will need the fix. I'll stick with a fixed .reg file that i just need to run once on each server.
            This should probably be mentioned in upgrade notes here -> https://mariadb.com/kb/en/upgrading-from-mariadb-104-to-mariadb-105/ as it is a breaking change for this specific case.

            BrainFooLong Roland added a comment - Ok. We have a lot of long running MariaDb servers that will need the fix. I'll stick with a fixed .reg file that i just need to run once on each server. This should probably be mentioned in upgrade notes here -> https://mariadb.com/kb/en/upgrading-from-mariadb-104-to-mariadb-105/ as it is a breaking change for this specific case.

            People

              wlad Vladislav Vaintroub
              BrainFooLong Roland
              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.