Bug#14234028 - CRASH DURING SHUTDOWN WITH BACKGROUND PURGE THREAD    Analysis  ---------     my_stat() calls stat() and if the stat() call fails we try to set   the variable  my_errno which is actually a thread specific data .  We try to get the  address of this thread specific data using  my_pthread_getspecifc(),but for the purge thread we have not defined   any thread specific data so it returns null and when dereferencing   null we get a segmentation fault.         init_available_charsets() seen in the core stack is invoked   through  pthread_once() .pthread_once is used for one time   initialization.Since free_charsets() is called before innodb plugin   shutdown ,purge thread calls init_avaliable_charsets() which leads   to the crash.
Bug#14234028 - CRASH DURING SHUTDOWN WITH BACKGROUND PURGE THREAD
 
 Analysis
 --------- 
 
 my_stat() calls stat() and if the stat() call fails we try to set 
 the variable  my_errno which is actually a thread specific data .
 We try to get the  address of this thread specific data using
 my_pthread_getspecifc(),but for the purge thread we have not defined 
 any thread specific data so it returns null and when dereferencing 
 null we get a segmentation fault.
        init_available_charsets() seen in the core stack is invoked 
 through  pthread_once() .pthread_once is used for one time 
 initialization.Since free_charsets() is called before innodb plugin 
 shutdown ,purge thread calls init_avaliable_charsets() which leads 
 to the crash.

 Fix
 ---
 Call free_charsets() after the innodb plugin shutdown,since purge 
 threads are still using the charsets. 

ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,natsys/mariadb_10.2,natsys/mariadb_10.2,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,natsys/mariadb_10.2,ollie314/server,slanterns/server,ollie314/server,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,davidl-zend/zenddbi,ollie314/server,davidl-zend/zenddbi,ollie314/server,natsys/mariadb_10.2,flynn1973/mariadb-aix,ollie314/server,flynn1973/mariadb-aix,ollie314/server,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,natsys/mariadb_10.2,flynn1973/mariadb-aix,flynn1973/mariadb-aix,natsys/mariadb_10.2,natsys/mariadb_10.2,ollie314/server,ollie314/server,natsys/mariadb_10.2,flynn1973/mariadb-aix,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,davidl-zend/zenddbi,davidl-zend/zenddbi