Segfault in performance-schema while preparing statement on a view
Description
Environment
Ubuntu 16.04, using packages from Percona-Ubuntu repo.
Does NOT happen on Ubuntu 14.04 nor on Centos 7
Attachments
Smart Checklist
Activity

Kathy Williamson April 22, 2020 at 11:48 AM
MySQL 5.6 is scheduled for EOL in Feb 2021. At this time, we do not believe that this issue will be fixed prior to EOL. If you believe this issue is important enough to be be fixed prior to EOL, or that it also affects a later version, please leave a comment and we will consider the new information.

Przemyslaw Malkowski September 18, 2018 at 10:52 AM
Thank you for the test script. I am able to reproduce the crash on PXC 5.6.39 and 5.6.40 on each test run.
Not reproducible on PS 5.6.41, PS 5.7.23 nor PXC 5.7.22 (also tested on Ubuntu Xenial).
Also, cannot reproduce on PXC 5.6.40 on Centos 7.
Test case as above, so first install PXC 5.6 package on Xenial instance (no config modification needed), prepare database and tables:
CREATE DATABASE d;USE d;CREATE TABLE t (id int);CREATE VIEW v AS SELECT * FROM t;
Then run:
- crash happens like in the error log I am attaching.

Nathan Bruning September 18, 2018 at 8:04 AM
Hi,
Thanks for looking into this issue.
I've just reproduced with Ubuntu 16 + 5.6.40-84.0-56, using your Vagrant method.
However, the issue is only reproducible when there is an EXTERNAL connection creating the prepared statement.
To reproduce:
create Vagrant machine using your instructions
apt-get install php7.0 php7.0-mysql
using attached test.php to crash percona

Przemyslaw Malkowski September 13, 2018 at 11:23 AMEdited
Hello ,
I tried to reproduce the issue with steps you provided, but I am not able to trigger any crash. I tried with both PXC 5.6.40 and 5.6.39 installed on Ubuntu Xenial and no crash. Also, no crash with PXC 5.7.22.
Here is what I did:
Then, as simply installing isn't initializing Galera plugin, I added to /etc/mysql/my.cnf :
And restarted the node, which have bootstrapped single node cluster. Same test - no crash:
Then I downgraded to same version as you reported:
Same result - no crash.
If you can reproduce the crash on demand, please include your my.cnf and what exactly PREPARE command did you use.
Also, can you reproduce the same on another Xenial box or just this particular one? Please provide pt-summary report as well as dmesg output from it if the latter.
Details
Details
Assignee
Reporter

Affects versions
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist

On a single-node Percona XtraDB cluster (5.6.39-26.25-1.xenial), we're able to crash the node with just one prepare-statement command. The bug occurs when the prepared statement does a select on a view.
With the same Percona XtraDB version on Ubuntu Trusty, we can't reproduce. Also with Percona Server, no reproduction.
The bug seems to be very similar to PXC-1909.
The problem occurs with the default Ubuntu config, no config files changed.
An easy fix is to set `performance_schema=OFF`.
To reproduce, execute this SQL:
And prepare this statement:
Attached are the error.log, a gdb backtrace (with symbols) and a Valgrind log, from 3 different reproductions.