[MDEV-4083] Can't load plugins on Win Created: 2013-01-24  Updated: 2013-01-31  Resolved: 2013-01-31

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.0, 5.5.28a, 5.3.11
Fix Version/s: 10.0.2

Type: Bug Priority: Major
Reporter: Federico Razzoli Assignee: Vladislav Vaintroub
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

WinXP


Attachments: File Logfile.PML     PNG File depends.png    

 Description   

An error message tells that MariaDB can't find the modules, but I see the DLL files in the specified dir:

MariaDB [(none)]> SELECT @@global.plugin_dir;
+---------------------------------------+
| @@global.plugin_dir                   |
+---------------------------------------+
| C:\Programmi\MariaDB 10.0\lib\plugin\ |
+---------------------------------------+
1 row in set (0.11 sec)
 
MariaDB [(none)]> INSTALL PLUGIN oqgraph SONAME 'ha_oqgraph.dll';
ERROR 1126 (HY000): Can't open shared library 'C:\Programmi\MariaDB 10.0\lib\plu
gin\ha_oqgraph.dll' (errno: 2 Impossibile trovare il modulo specificato.
)
MariaDB [(none)]> INSTALL PLUGIN blackhole SONAME 'ha_blackhole.dll';
ERROR 1126 (HY000): Can't open shared library 'C:\Programmi\MariaDB 10.0\lib\plu
gin\ha_blackhole.dll' (errno: 2 Impossibile trovare il modulo specificato.
)



 Comments   
Comment by Elena Stepanova [ 2013-01-26 ]

Hi Federico,

So far I wasn't able to reproduce the problem. Could you please provide the full output of "dir" command in the specified folder (or whatever else you have on the machine that will produce the list of files with their sizes)?

Please also run
SHOW VARIABLES LIKE '%version%';
and paste its output also.

Thanks.

Comment by Federico Razzoli [ 2013-01-26 ]

Hi Elena. Files:

 
C:\PROGRA~1\MARIAD~1.0\lib\plugin>dir /O
 Il volume nell'unità C non ha etichetta.
 Numero di serie del volume: 2C97-D9D5
 
 Directory di C:\PROGRA~1\MARIAD~1.0\lib\plugin
 
24/01/2013  10.49    <DIR>          .
24/01/2013  10.49    <DIR>          ..
11/11/2012  16.32            67.184 authentication_windows_client.dll
11/11/2012  16.31            56.432 dialog.dll
11/11/2012  16.31           122.992 ha_archive.dll
11/11/2012  16.30         1.724.416 ha_archive.pdb
11/11/2012  16.31            68.720 ha_blackhole.dll
11/11/2012  16.30         2.101.248 ha_blackhole.pdb
11/11/2012  16.31            98.416 ha_federated.dll
11/11/2012  16.30         2.404.352 ha_federated.pdb
11/11/2012  16.31           110.192 ha_federatedx.dll
11/11/2012  16.30         2.527.232 ha_federatedx.pdb
11/11/2012  16.31           129.136 ha_oqgraph.dll
11/11/2012  16.30         4.403.200 ha_oqgraph.pdb
11/11/2012  16.31           121.456 ha_sphinx.dll
11/11/2012  16.30         2.576.384 ha_sphinx.pdb
11/11/2012  16.31            40.560 mysql_clear_password.dll
11/11/2012  16.31            88.688 semisync_master.dll
11/11/2012  16.30         2.347.008 semisync_master.pdb
11/11/2012  16.32            56.944 semisync_slave.dll
11/11/2012  16.30         2.052.096 semisync_slave.pdb
11/11/2012  16.32            66.160 sql_errlog.dll
11/11/2012  16.30         1.265.664 sql_errlog.pdb
              21 File     22.428.480 byte
               2 Directory  41.599.291.392 byte disponibili
 
C:\PROGRA~1\MARIAD~1.0\lib\plugin>

Version:

 
MariaDB [(none)]> SHOW VARIABLES LIKE '%version%';
+-------------------------+---------------------+
| Variable_name           | Value               |
+-------------------------+---------------------+
| innodb_version          | 1.2.0               |
| protocol_version        | 10                  |
| slave_type_conversions  |                     |
| version                 | 10.0.0-MariaDB      |
| version_comment         | Source distribution |
| version_compile_machine | x86                 |
| version_compile_os      | Win32               |
+-------------------------+---------------------+
7 rows in set (0.49 sec)
 
MariaDB [(none)]>

Notes:

  • I'm not sure about what 'Source distribution' means: actually I installed MariaDB from the MSI
  • MariaDB dir is: C:\Programmi\MariaDB 10.0\bin so it contains spaces... can this be the reason why it says it can't find the module? However I used the default dir...
Comment by Elena Stepanova [ 2013-01-26 ]

Hi Federico,

Is it really Windows XP?
I have Windows XP, but for me it doesn't contract the directory names to 8 symbols, it looks like some older Windows. Or, maybe it's specifics of your local one. Anyways, it makes me suspicious whether it might be the reason.

Could you put this exact name (the contracted one, C:\PROGRA~1\MARIAD~1.0\lib\plugin\ ) to your my.ini file, restart the service and try to install a plugin again? It's a dirty trick, and it shouldn't really make the difference, but who knows...

Comment by Federico Razzoli [ 2013-01-26 ]

Sorry, it didn't work.
Yes, I have WinXP Home edition SP2 with NTFS.
I have no idea why yours doesn't contract names and mine does...

Comment by Elena Stepanova [ 2013-01-26 ]

Then I have to pass it to the Windows wizard, who has more ideas on how to debug this mysterious problem.

Comment by Federico Razzoli [ 2013-01-26 ]

Sorry, correction: it's professional edition, not home edition (in case it's relevant)

Comment by Vladislav Vaintroub [ 2013-01-26 ]

Hi Federico,
did you ever come across Process Monitor (aka procmon) monitoring/tracing tool by Sysinternals/Microsoft?
The URL for download is here : http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

  • If you know how to use it, can capture what mysqld.exe for the duration of "install plugin..." ,save as PML file and attach?
  • If you do not know how to use it, just tell and I'll create a short doc on KB. It is quite easy to handle
Comment by Federico Razzoli [ 2013-01-27 ]

Hi! I don't know that tool. Probably a short doc is a good idea.

Comment by Federico Razzoli [ 2013-01-30 ]

Hi,
I hope this is what you want. I only captured events from "mysqldd" process, and I enabled advanced output.
Please let me know if I missed something or you want more info.

Comment by Vladislav Vaintroub [ 2013-01-31 ]

Hi Federico,
unfortunately this trace only contains system-wide profiling events, so I can't fish useful info from it. I wrote up a small KB article

https://kb.askmonty.org/en/how-to-use-procmon-to-trace-mysqldexe-filesystem-access/

using "install plugin" as example.

Could you please try it again, as in the article? Should take only couple of minutes.

Comment by Vladislav Vaintroub [ 2013-01-31 ]

Ok, I looked again into the procmon logs. It appears you run mysqld.exe renamed as mysqldd.exe . This won't work with plugins. And the reason is - this is how linking on Windows works, plugins use/import function from the server executable, and functions are imported using both module name and function name. And module name was mysqld.exe when server was built.

Loading fails because symbols imported from mysqld.exe are unresolved.

Resolution would be to use the original name mysqld.exe.

Comment by Vladislav Vaintroub [ 2013-01-31 ]

I attached a picture demonstrating plugin dependency from mysqld.exe, and imported symbols, using DependencyWalker tool

Generated at Thu Feb 08 06:53:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.