[MDEV-4723] "State" column of SHOW PROCESSLIST returns wrong values (non-ascii chars) for some states Created: 2013-06-27 Updated: 2013-11-12 Resolved: 2013-11-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.31 |
| Fix Version/s: | 5.5.34 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Jean Weisbuch | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | processlist, upstream | ||
| Environment: |
Debian Squeeze amd64 |
||
| Attachments: |
|
| Description |
|
An example of these abnormal values (i added the "|cat -v" at the end of the command to convert the non-ascii chars to standardized notations to avoid the loss/modification of those while copy/pasting to JIRA) :
Insert queries in the example has been stripped for security reason but all looks the same but not ran on the same base and table ; these queries are all almost the same. This does not seems to happen on the other server under MySQL 5.5.30 having the same tables/structures and applications executing the same kind of queries. I havent found so far anything out of the ordinary on the app executing the queries (it does other queries than these INSERTS using the same function without encountering the same bug. ps: it seems that the STATE value on INFORMATION_SCHEMA.PROCESSLIST is correct and is "Repair with 3 threads" for the problematic recuring INSERT queries so the bug is only on the output of the SHOW PROCESSLIST command. |
| Comments |
| Comment by Elena Stepanova [ 2013-06-29 ] |
|
Hi, Is the table MyISAM? Thanks. |
| Comment by Jean Weisbuch [ 2013-06-29 ] |
|
The tables are in MyISAM and i attached the vairables list. Notice especially these values : |
| Comment by Elena Stepanova [ 2013-07-03 ] |
|
I can easily trigger it with a stress test. By far the most frequent value that the field gets populated with, at least in my env, is CR (13). Here are other examples in decimal codes that I was getting on the client side while executing SHOW PROCESSLIST. 63 63 1 16 63 127 Unfortunately I wasn't able to produce a syncpoint-based test case in any reasonable time. I think the problem is not so much the synchronization itself (it seems fairly simple – let the field value be generated, then wait till the query it belongs to finishes, proceed), but the fact that the problem is only visible when the old data is actually corrupted, which I guess is sporadic and depends on the memory layout, and I couldn't figure how to make it reliable. So instead of a sync point I added a check and assertion in the SHOW PROCESSLIST code where it gets corrupted (in mysqld_list_processes(THD *thd,const char *user, bool verbose)): === modified file 'sql/sql_show.cc' if (protocol->write()) (sorry if it's not elegant, but I'm not a practicing developer, my code is supposed to be ugly to make the real coders' code look better). In fact, the value gets broken any time after I just chose the downmost point, because once broken, it remains broken, so the further down the higher probability. With that and a primitive RQG grammar below, the assertion gets hit quite quickly, at least on my machine and on perro. Obviously, instead of the assertion you can do something smart in there.
thread1_init: thread2: query:
runall command line: perl ./runall-new.pl --grammar=mdev4723.yy --skip-gendata --threads=4 --queries=100M --duration=600 --basedir=<basedir> --vardir=<vardir> gentest command line: perl ./gentest.pl --grammar=mdev4723.yy --threads=4 --queries=100M --duration=600 --dsn='dbi:mysql:host=127.0.0.1:port=3306:user=root:database=test' You can also try to increase the number of threads. No specific server options are needed, server can be start with all defaults. If it's not reproducible in your environment, I can set it up on perro, I already checked it fails there. |
| Comment by Elena Stepanova [ 2013-11-11 ] |
|
I ran tests on 5.5-serg revision-id: sergii@pisem.net-20131111090500-ur3361v8k40y6v00 / revno: 3960. === modified file 'sql/sql_show.cc' + Now it fails on the 2nd DBUG_ASSERT (while on a tree before the fix the first one fails). I've set up the test on perro under mariadb.
It starts server on port 4723 and runs the RQG test. The basedir is ./5.5-serg (symlink). The logs go to ./vardir. |