Commit 59037d9
Nirbhay Choubey
MDEV-8208: Sporadic SEGFAULT on startup
Problem: When mysqld starts as a galera node, it creates 2 system threads (applier & rollbacker) using start_wsrep_THD(). These threads are created before plugin initialization (plugin_init()) for SST methods like rsync and xtrabackup. The threads' initialization itself can proceed in parallel to mysqld's main thread of execution. As a result, the thread initialization code (start_wsrep_THD()) can end up accessing some un/partially initialized structures (like maria_hton, in this particular case) resulting in segfault. Solution: Fixed by calling THD::init_for_queries() (which accesses maria_hton) only after the plugins have been initialized.1 parent 30711c6 commit 59037d9
3 files changed
+56
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5125 | 5125 | | |
5126 | 5126 | | |
5127 | 5127 | | |
5128 | | - | |
5129 | | - | |
5130 | | - | |
5131 | | - | |
5132 | | - | |
5133 | 5128 | | |
5134 | 5129 | | |
5135 | 5130 | | |
| |||
5204 | 5199 | | |
5205 | 5200 | | |
5206 | 5201 | | |
| 5202 | + | |
| 5203 | + | |
| 5204 | + | |
| 5205 | + | |
| 5206 | + | |
| 5207 | + | |
| 5208 | + | |
| 5209 | + | |
| 5210 | + | |
| 5211 | + | |
| 5212 | + | |
| 5213 | + | |
| 5214 | + | |
| 5215 | + | |
| 5216 | + | |
| 5217 | + | |
| 5218 | + | |
| 5219 | + | |
| 5220 | + | |
| 5221 | + | |
| 5222 | + | |
| 5223 | + | |
| 5224 | + | |
5207 | 5225 | | |
5208 | 5226 | | |
5209 | 5227 | | |
| |||
5412 | 5430 | | |
5413 | 5431 | | |
5414 | 5432 | | |
5415 | | - | |
5416 | 5433 | | |
5417 | 5434 | | |
5418 | 5435 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
792 | 798 | | |
793 | 799 | | |
794 | 800 | | |
| 801 | + | |
795 | 802 | | |
796 | 803 | | |
797 | 804 | | |
| |||
1719 | 1726 | | |
1720 | 1727 | | |
1721 | 1728 | | |
1722 | | - | |
| 1729 | + | |
1723 | 1730 | | |
1724 | | - | |
1725 | | - | |
| 1731 | + | |
1726 | 1732 | | |
1727 | 1733 | | |
1728 | | - | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
1732 | 1734 | | |
1733 | 1735 | | |
1734 | 1736 | | |
| |||
1765 | 1767 | | |
1766 | 1768 | | |
1767 | 1769 | | |
1768 | | - | |
| 1770 | + | |
1769 | 1771 | | |
1770 | 1772 | | |
1771 | 1773 | | |
| |||
1788 | 1790 | | |
1789 | 1791 | | |
1790 | 1792 | | |
1791 | | - | |
1792 | | - | |
| 1793 | + | |
1793 | 1794 | | |
1794 | 1795 | | |
1795 | 1796 | | |
| |||
1799 | 1800 | | |
1800 | 1801 | | |
1801 | 1802 | | |
1802 | | - | |
1803 | | - | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
1804 | 1808 | | |
1805 | 1809 | | |
1806 | 1810 | | |
1807 | 1811 | | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
1808 | 1818 | | |
1809 | 1819 | | |
1810 | 1820 | | |
| |||
1842 | 1852 | | |
1843 | 1853 | | |
1844 | 1854 | | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
1845 | 1864 | | |
1846 | 1865 | | |
1847 | 1866 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
341 | 342 | | |
342 | 343 | | |
343 | 344 | | |
| 345 | + | |
344 | 346 | | |
345 | 347 | | |
346 | 348 | | |
0 commit comments