diff options
author | Shishir Jaiswal <shishir.j.jaiswal@oracle.com> | 2015-09-16 18:58:43 +0530 |
---|---|---|
committer | Shishir Jaiswal <shishir.j.jaiswal@oracle.com> | 2015-09-16 18:58:43 +0530 |
commit | 17387bc574a4054a9aeac7ba4aa60e25588dc7bf (patch) | |
tree | fafe0ea8486b45271af0d310b88b6afe0e6d20f3 /sql-bench/Data | |
parent | adf12e6e1704dbf4f5e06fa45f40ab5b71514cff (diff) | |
download | mariadb-git-17387bc574a4054a9aeac7ba4aa60e25588dc7bf.tar.gz |
Bug #21467458 - UNINSTALL PLUGIN DAEMON_EXAMPLE CRASHES
MYSQLD.
DESCRIPTION
===========
Crash occurs when daemon_example plugin is uninstalled
immediately after its installed. This can be reproduced
by installing and uninstalling the plugin repeatedly.
ANALYSIS
========
The daemon_example_plugin_deinit() function of the daemon
example plugin calls pthread_cancel() but doesn't wait for
the worker thread to actually complete before deallocating
the data buffer and closing the file that it writes to.
This is causing SEGFAULT!
FIX
===
Added a pthread_join() to wait for the thread to complete
before doing the cleanup work.
Removed a stray 'x' variable from the example code.
NOTE
====
Have made an entry in .opt file as given below:
--plugin-dir=$DAEMONEXAMPLE_DIR
This is done so that the program takes plugin directory as
../<dbg>/plugin/daemon_example/ instead of
../lib/plugin/
Diffstat (limited to 'sql-bench/Data')
0 files changed, 0 insertions, 0 deletions