[MDEV-4890] Valgrind warnings on shutdown on a build with openSSL Created: 2013-08-12 Updated: 2013-11-19 Resolved: 2013-11-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.4, 5.5.32, 5.1.67, 5.3.12 |
| Fix Version/s: | 10.0.5, 5.5.34, 5.1.73, 5.3.13 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | valgrind | ||
| Environment: |
Ubuntu 12.04 x86_64 |
||
| Description |
|
I built the server with openSSL (WITH_SSL=system instead of bundled) and started getting valgrind warnings on server shutdown:
I'm not sure whether they're essential or not, and if they are, whether it's our fault, maybe it's a bad valgrind version or a 3rd-party library bug.
|
| Comments |
| Comment by Alexander Barkov [ 2013-08-13 ] |
|
The same problem is observed with:
|
| Comment by Alexander Barkov [ 2013-08-13 ] |
|
The problem is repeatable with:
|
| Comment by Alexander Barkov [ 2013-10-11 ] |
|
Still reproducible with openssl-1.0.1e-4.fc17.x86_64. |
| Comment by Alexander Barkov [ 2013-10-16 ] |
|
Fixed in 5.1, 5.2, 5.3, 5.5, 10.0-base. |
| Comment by Pavel Ivanov [ 2013-11-17 ] |
|
The change in vio_end() made here http://bazaar.launchpad.net/~maria-captains/maria/10.0/revision/2502.565.54 causes mysqltest_embedded to hang on exit. So in 10.0.5 tarball testing of embedded server doesn't work at all when it's compiled with openssl. I think the problem is that mysql_server_end() in case of compilation with embedded server calls both end_embedded_server() (which calls clean_up() which calls vio_end() ) and vio_end(). But apparently ERR_remove_state(0) can be called only once. On the second call it hangs inside openssl trying to lock the mutex. |
| Comment by Elena Stepanova [ 2013-11-17 ] |
|
Hi Alexander, Re-opening to draw your attention to the above. I think for the sake of changelog history and such, it will be better to open another bug report and close this one again, but I'll leave it to you to decide. |
| Comment by Alexander Barkov [ 2013-11-18 ] |
|
Pavel, can you please post how-to-repeat instructions? I can't repeat the hang on my FC18 64bit box. cmake . -DCMAKE_INSTALL_PREFIX=/opt/mariadb-10.0 -DWITH_SSL=system -DWITH_EMBEDDED_SERVER=yes and cmake . -DCMAKE_INSTALL_PREFIX=/opt/mariadb-10.0 -DWITH_SSL=system -DWITH_EMBEDDED_SERVER=yes -DCMAKE_BUILD_TYPE=Debug It does not hang. Note, I can confirm that there is a problem in the code with vio_end() executed twice. |
| Comment by Pavel Ivanov [ 2013-11-18 ] |
|
Hm... Sorry, it turned out that I was linking with a locally built openssl library that included some hacks which were actually causing the hang. I can't reproduce with Ubuntu's standard openssl library either. |
| Comment by Alexander Barkov [ 2013-11-19 ] |
|
Thanks for checking! I opened a separate issue for this: |