Bug #55966 "plugin" tests fail in 5.5
Submitted: 13 Aug 2010 10:02 Modified: 12 Nov 2010 0:57
Reporter: Alexander Nozdrin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.5, 5.6 OS:Any
Assigned to: Mats Kindahl CPU Architecture:Any
Tags: disabled, pb2, test failure

[13 Aug 2010 10:02] Alexander Nozdrin
Description:
The following tests fail starting from 5.5:
  - main.plugin_load
  - main.plugin
  - main.plugin_not_embedded
  - rpl.rpl_plugin_load

The reason of failures is different from the one in Bug#42144.

The test cases will be disabled due to this bug.

How to repeat:
Check out PB2 (mysql-5.5-merge).
[15 Aug 2010 8:57] Sveta Smirnova
Thank you for the report.

Verified as described on Support box.

All tests fails with:

query 'INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO' failed: 1126: Can't open shared library '/users/ssmirnova/blade12/src/mysql-trunk-bugfixing/storage/example/ha_example.so' (errno: 2 undefined symbol: _myfree)

Except main.plugin_load which fails with:

mysqltest: At line 4: query 'SELECT @@global.example_enum_var = 'e2'' failed: 1193: Unknown system variable 'example_enum_var'
Failed to read from '/users/ssmirnova/blade12/src/mysql-trunk-bugfixing/mysql-test/var/log/plugin_load.log', errno: 22
[17 Aug 2010 23:46] Omer Barnir
triage: not clear if this is a server bug or a bug in the example plug in. In any case this needs to work for the release (if a plugin bug - I2 embarrassment if server bug I2 as will affect many)
[23 Aug 2010 11:46] Daniel Fischer
It's not entirely clear to me what exactly is broken.

I can't reproduce what sveta posted. The _myfree symbol does not occur anywhere in the 5.5 codebase. This however was an incompatible ABI change sometime during 5.5 development, so something like this could probably happen when building from a non-clean tree. For this, I need confirmation that the problem goes away (or not) when building from a completely fresh bzr export. This is important because if sveta's reproduction on Linux was *not* just caused by a polluted bzr branch, it's a completely different bug.

What I can reproduce is a similar error, but complaining about __dtrace_* symbols. This only happens when building with gcc 3.4.6 on Solaris, due to code in dtrace.cmake that disables dtrace for plugins when building with this combination but does so in a way that doesn't let the example plugin know. If this is what this bug report is about, it only affects builds on Solaris with gcc 3.4.6, and nothing else, in particular not the Linux on blade12 used for verification.

Unfortunately the error message is cut off in pushbuild because the path names involved are too long, so I can't tell which of these is actually happening. (Maybe time to file a bug against mysqltest/mtr about that limit...)

I can offer the following remedies:

1) I can switch solaris x86 gcc builds in pushbuild to gcc 3.4.3 instead of 3.4.6. This version works and the plugin doesn't crash, the test passes. However I don't know anymore why we are using 3.4.6 in the first place (instead of the 3.4.3 provided by the Solaris distribution), so I need confirmation that 3.4.3 is fine for 5.5 and up. GCC 4 is not an option at this time, the version that is installed apparently can't build 5.5, and building gcc on Solaris is an adventure not for the faint of heart.

2) You could mark this test case experimental again, as it has been in mysql-trunk for at least one year for this very reason, apparently.
[23 Aug 2010 17:39] Sveta Smirnova
Can not repeat failure with freshly checkout tree.
[26 Aug 2010 15:30] Alexander Nozdrin
Enabled the plugin test cases to check if they still fail.
[30 Aug 2010 2:10] Alexander Nozdrin
As mysql-5.5-merge shows it, the tests still fail.
[30 Aug 2010 8:44] Alexander Nozdrin
The test cases have been disabled again.
[30 Aug 2010 13:18] Daniel Fischer
I offered the possible workaround of reverting to gcc 3.4.3 on this platform, please let me know if that is acceptable.
[3 Sep 2010 9:43] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/117500

3250 Mats Kindahl	2010-09-03
      BUG#55966: Experimental patch
[3 Sep 2010 11:43] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/117511

3203 Mats Kindahl	2010-09-03
      Bug #55966: "plugin" tests fail in 5.5
      
      On Solaris with version 3.4.6, the ha_example.so shared library is built
      with DTrace and the server is built without DTrace support. This occurs
      because dtrace.cmake disables DTrace support for 3.4.6, but still set
      HAVE_DTRACE, which causes probes_mysql.h to include probes_mysql_dtrace.h
      instead of probes_mysql_nodtrace.h.
      
      This patch fixes this by not setting HAVE_DTRACE on Solaris for GCC 3.4.6.
[6 Sep 2010 12:44] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/117603

3204 Mats Kindahl	2010-09-06
      BUG#55966: "plugin" tests fail in 5.5
      
      Enabling all related tests.
[6 Sep 2010 12:45] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/117604

3203 Mats Kindahl	2010-09-06
      Bug #55966: "plugin" tests fail in 5.5
      
      On Solaris with version 3.4.6, the ha_example.so shared library is built
      with DTrace and the server is built without DTrace support. This occurs
      because dtrace.cmake disables DTrace support for 3.4.6, but still set
      HAVE_DTRACE, which causes probes_mysql.h to include probes_mysql_dtrace.h
      instead of probes_mysql_nodtrace.h.
      
      This patch fixes this by not setting HAVE_DTRACE on Solaris for GCC 3.4.6.
[2 Oct 2010 18:12] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alexander.nozdrin@oracle.com-20101002180948-852x1cuv7c6i85ea) (version source revid:alexander.nozdrin@oracle.com-20101002180857-an32jpuwzemsp4f2) (merge vers: 5.6.1-m4) (pib:21)
[2 Oct 2010 18:14] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101002181053-6iotvl26uurcoryp) (version source revid:alexander.nozdrin@oracle.com-20101002180917-h0n62akupm3z20nt) (pib:21)
[2 Oct 2010 18:16] Bugs System
Pushed into mysql-5.5 5.5.7-rc (revid:alexander.nozdrin@oracle.com-20101002180831-590ka2tuit9qoxbb) (version source revid:alexander.nozdrin@oracle.com-20101002180831-590ka2tuit9qoxbb) (merge vers: 5.5.7-rc) (pib:21)
[12 Nov 2010 0:57] Paul DuBois
Noted in 5.5.7, 5.6.1 changelogs.

On Solaris with gcc 3.4.6, ha_example.so was built with DTrace 
support even if the server was not, causing plugin loading problems.