[MDEV-23038] Service registered with deprecated "mysqld.exe --install" crashes on startup Created: 2020-06-29 Updated: 2020-07-10 Resolved: 2020-06-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Platform Windows, Server |
| Affects Version/s: | 10.5.4 |
| Fix Version/s: | 10.5.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Roland | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 10 18363 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| 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.
|
| Comments |
| Comment by Vladislav Vaintroub [ 2020-06-29 ] |
|
It crashes it one of the ucrtbase.dll functions, but not because we do not ship ucrtbase.dll. This dll is part of your Windows 10. If it is part of OS (and it is since Windows 8.1) , It will always load from system32, whether it is put into executable directory, or not. And anything prior to Windows 8.1 had already reached end of life, thus there is no whatever reason to put it into executable's directory. And it crashes because there is some bug in mariadb. Would it be possible to provide at least the error log, and ideally also the crash dump? And all supplemental files, like e.g my.ini |
| Comment by Roland [ 2020-06-29 ] |
|
Thanks for your answer. I'll provide all information as wanted. To the my.ini. I've provided 2 files, one stripped down to our minimums, even with that it doesn't work. The ucrtbase.dll is the one from my windows/system32 folder. Also there is no error log in the error log destination file. Errors just only show up in syslog from windows event viewer. mariadb.zip |
| Comment by Vladislav Vaintroub [ 2020-06-29 ] |
|
Thank you. the last and the the most interesting one, would be |
| Comment by Vladislav Vaintroub [ 2020-06-29 ] |
|
And if not there, then "möglicherweise" there C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_mysqld.exe_e4f99a763f7ceb1563f76a1a352eb93224d66522_31d2382f_a4f3c35d-16a6-4fd4-b973-c57f8bcf3371 |
| Comment by Roland [ 2020-06-29 ] |
|
Unfortunately there is just the "AppCrash" file that exist, all other files logged in the error log doesn't exist after the crash. I've uploaded those. Report.zip |
| Comment by Vladislav Vaintroub [ 2020-06-29 ] |
|
BrainFooLong^ , could you provide the WER crash dump, please? Thank you! |
| Comment by Roland [ 2020-06-29 ] |
|
I would, if the files would exist. There are no WER crash dumps, even if they are listed in the log. |
| Comment by Vladislav Vaintroub [ 2020-06-29 ] |
|
its a pity. For such things, crash dump is really important. maybe you can run procdump -mp -x . mysqld.exe <args> from the command line (let's try elevated command line just in case) rather than from service Then the .dmp will be written in the current working directory https://docs.microsoft.com/en-us/sysinternals/downloads/procdump contains the information about the procdump utility and the link to download. |
| Comment by Roland [ 2020-06-29 ] |
|
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. |
| Comment by Vladislav Vaintroub [ 2020-06-29 ] |
|
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 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 |
| Comment by Roland [ 2020-06-30 ] |
|
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? |
| Comment by Vladislav Vaintroub [ 2020-06-30 ] |
|
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) |
| Comment by Roland [ 2020-06-30 ] |
|
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. |