Bug #3974 "SHOW FULL PROCESSLIST" crashes the embedded server
Submitted: 2 Jun 2004 22:09 Modified: 11 Jun 2004 20:14
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S3 (Non-critical)
Version:4.1.2 OS:Linux (Linux)
Assigned to: Alexey Botchkov CPU Architecture:Any

[2 Jun 2004 22:09] Matthias Leich
Description:
If I execute "SHOW FULL PROCESSLIST" via libmysqld/examples/mysqltest
the program terminates with signal 11, Segmentation fault 

My environment: Linux(SuSE 9.0), MySQL 4.1 source distribution
                                 (last bk pull 2004-06-01) 

How to repeat:
Please see above.

Suggested fix:
I think the problem is NOT important and I cannot imagine a case where this command makes sense in the environment of an embedded server.

Please avoid the crash (give useful SHOW output or refuse the execution of this
statement ), if the expense for such a solution is very small or mention the
behaviour above in the manual.
[4 Jun 2004 19:18] MySQL Verification Team
Thank you for the bug report.

mysql> show full processlist;

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 13843)]
0x08154f38 in mysql_execute_command(THD*) (thd=0x84cf970) at sql_parse.cc:2768
2768        if (!thd->priv_user[0] && check_global_access(thd,PROCESS_ACL))
(gdb) backtrace full
#0  0x08154f38 in mysql_execute_command(THD*) (thd=0x84cf970) at sql_parse.cc:2768
        res = 0
        lex = (LEX *) 0x84cf980
        tables = (TABLE_LIST *) 0x0
        select_lex = (SELECT_LEX *) 0x84cfa68
        unit = (SELECT_LEX_UNIT *) 0x84cf98c
        _db_func_ = 0x834bbc7 "mysql_parse"
        _db_file_ = 0x834ba7b "sql_parse.cc"
        _db_level_ = 5
        _db_framep_ = (char **) 0x0
#1  0x08156991 in mysql_parse(THD*, char*, unsigned) (thd=0x84cf970,
    inBuf=0x84d1170 "show full processlist", length=139262336) at sql_parse.cc:3886
        lex = (LEX *) 0x84cf980
        _db_func_ = 0x834baf8 "dispatch_command"
        _db_file_ = 0x834ba7b "sql_parse.cc"
        _db_level_ = 4
        _db_framep_ = (char **) 0xbfffef48
#2  0x08152747 in dispatch_command(enum_server_command, THD*, char*, unsigned) (
    command=COM_QUERY, thd=0x84cf970, packet=0x84cf558 "show full processlist",
    packet_length=22) at sql_parse.cc:1457
        net = (NET *) 0x84cfea4
        error = false
        _db_func_ = 0x833129f "mysql_real_query"
        _db_file_ = 0x8330fe2 "client.c"
        _db_level_ = 3
        _db_framep_ = (char **) 0x8257a05
---Type <return> to continue, or q <return> to quit---
        start_of_query = 139262320
#3  0x080e447c in emb_advanced_command (mysql=0x83d2e00, command=COM_QUERY, header=0x0,
    header_length=0, arg=0x84cf558 "show full processlist", arg_length=21,
    skip_check=1 '\001') at lib_sql.cc:105
        result = 21 '\025'
        thd = (class THD *) 0x84cf970
#4  0x080eee02 in mysql_send_query (mysql=0x83d2e00, query=0x84cf558 "show full processlist",
    length=21) at client.c:2340
        _db_func_ = 0x833129f "mysql_real_query"
        _db_file_ = 0x8330fe2 "client.c"
        _db_level_ = 3
        _db_framep_ = (char **) 0xbfffeff8
#5  0x080eeea7 in mysql_real_query (mysql=0x83d2e00, query=0x84cf558 "show full processlist",
    length=21) at client.c:2351
        _db_func_ = 0x83211ae "main"
        _db_file_ = 0x83211a5 "mysql.cc"
        _db_level_ = 2
        _db_framep_ = (char **) 0x84daafd
#6  0x080cf2f6 in mysql_real_query_for_lazy(char const*, int) (
    buf=0x84cf558 "show full processlist", length=21) at mysql.cc:1579
        error = 138228232
        retry = 0
#7  0x080cfa9c in com_go (buffer=0x83d3208, line=0x0) at sql_string.h:82
        buff = " «M\bèªM\b\027\000\000\000(§M\b\b«M\bPñÿ¿¸ðÿ¿Ñ²\r\bèªM\b ñÿ¿Å\000\000\000Öº\r\b(§M\b ñÿ¿xÂ3@(§M\bPñÿ¿Úýÿ¿Øðÿ¿V³\r\b(§M\bPñÿ¿èªM\b²\232«\aPñÿ¿ø¦M\b8ñÿ¿fº\r\bø¦M\bPñÿ¿èªM\b\202J\r\bø¦M\b ñÿ¿\017\000\000\000Å\000\000\000ø¦M\b ñÿ¿\003\000\000\000\024\000\000\000\220\001\00---Type <return> to continue, or q <return> to quit---
0\000]õL\bXñÿ¿Nã\f\b ´<\bXõL\b\004\000\000\000\222z;\b\004\000\000\000\211\0242\b"
        time_buff = " ZG@\027\000\000\000hðÿ¿ØOG@\027\000\000\000èªM\b\210ðÿ¿¦ß;@"
        pos = 0x83d3208 "XõL\b\025"
        result = (MYSQL_RES *) 0x403b912c
        timer = 12830583
        warnings = 138228232
        error = 139307773
        err = 0
#8  0x080ce735 in add_line (buffer=@0x83d3208, line=0x84daae8 "show full processlist;",
    in_string=0xbffff22e "", ml_comment=0xbffff22f) at mysql.cc:1136
        old_delimiter_length = 1
        l = 138274288
        inchar = 8 '\b'
        buff = " ZG@h+=\bé\024\000\000Â\025\b\bìË4@èªM\b\000\000\000\000Úýÿ¿\bòÿ¿\220Ò\000@s", '\0' <repeats 11 times>, "Úýÿ¿\bòÿ¿hâ\f\bèªM\b° ;\b\002\000\000\000\226$\r\b"
        pos = 0x84daafd ";"
        out = 0x84daafd ";"
        com = (COMMANDS *) 0x0
        strend = 0x84daafe ""
#9  0x080ce191 in read_lines (execute_commands=true) at mysql.cc:986
        line = 0x84daae8 "show full processlist;"
        in_string = 0 '\0'
        line_number = 0
        ml_comment = false
        com = (COMMANDS *) 0x0
#10 0x080cd697 in main (argc=1, argv=0x83de860) at mysql.cc:441
---Type <return> to continue, or q <return> to quit---
        buff = "Type 'help;' or '\\h' for help. Type '\\c' to clear the buffer.\n\000\b0Ù\000@\004óÿ¿¸òÿ¿ØOG@"
        _db_func_ = 0x838354d "?func"
        _db_file_ = 0x8383553 "?file"
        _db_level_ = 1
        _db_framep_ = (char **) 0x80d2d9c
[9 Jun 2004 19:38] Alexey Botchkov
bk commit - 4.1 tree (hf:1.1912) BUG#3974
[11 Jun 2004 20:14] Alexey Botchkov
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html