Menu

:: Database query error

2009-11-18
2013-01-16
  • Paul Southerby

    Paul Southerby - 2009-11-18

    I tried to add a task and got the below error.
    I have an x64 (AMD) system running Opensolaris snv_127.
    PHP 5.2, MySQL 5.1, Apache 2.2

    I can log onto the system and create projects, but when I try
    and add tasks, I get this error.

    :: Database query error
    The following query :

    SELECT tasks.id AS id, tasks.name AS name, tasks.parent AS parent, tasks.status AS status, tasks.finished_time AS finished_time, UNIX_TIMESTAMP( tasks.deadline) AS due, UNIX_TIMESTAMP( tasks.edited) AS edited, UNIX_TIMESTAMP( tasks.lastforumpost) AS lastpost, UNIX_TIMESTAMP( tasks.lastfileupload) AS lastfileupload, tasks.owner AS owner, tasks.priority AS priority, users.id AS userid, users.fullname AS username, taskgroups.id AS group_id, taskgroups.name AS group_name, taskgroups.description AS group_description, UNIX_TIMESTAMP( seen.time) AS last_seen FROM tasks LEFT JOIN users ON (users.id=tasks.owner) LEFT JOIN taskgroups ON (taskgroups.id=tasks.taskgroupid) LEFT JOIN seen ON (tasks.id=seen.taskid AND seen.userid=1) WHERE tasks.projectid=18 ORDER BY IF(taskgroups.name IS NULL, 1, 0), group_name, name

    Had the following error:
    Lost connection to MySQL server during query

     
  • Paul Southerby

    Paul Southerby - 2009-11-18

    I started seeing problem after I changed the time with "date" on my
    x64 system.  Not sure if this has anything to do with the problem.

     
  • Andrew Simpson

    Andrew Simpson - 2009-11-18

    Hmmm… very strange indeed.  The query is associated with the task listing screen, not the task add screen.

    The query looks normal enough, and certainly there's no error message about the syntax.

    The lost connection message, I think, is caused by the server disconnecting or otherwise failing during the query.

    Anything in the mysql logs?

     
  • Paul Southerby

    Paul Southerby - 2009-11-18

    The err log is huge.  Thanks for suggesting I take a look.  I'm new to
    mysql.   Here is a small piece of the err log (below).  Do you have
    any suggestions?  If you need the complete err log, I could send it
    to you.

    thd->thread_id=5
    thd->killed=NOT_KILLED
    The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
    information that should help you find out what is causing the crash.
    091118 07:58:46 mysqld_safe mysqld restarted
    091118  7:58:46  option 'thread_stack': unsigned value 65536 adjusted to 131072
    091118  7:58:46  option 'thread_stack': unsigned value 65536 adjusted to 131072
    091118  7:58:46  InnoDB: Started; log sequence number 0 46409
    091118  7:58:46  Event Scheduler: Loaded 0 events
    091118  7:58:46  /usr/mysql/5.1/bin/mysqld: ready for connections.
    Version: '5.1.30'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
    /usr/mysql/5.1/bin/mysqld'my_print_stacktrace+0x1c
    /usr/mysql/5.1/bin/mysqld'handle_segfault+0x1f3
    /lib/libc.so.1'__sighndlr+0x15
    /lib/libc.so.1'call_user_handler+0x2af
    /usr/mysql/5.1/bin/mysqld'__1cQbest_access_path6FpnEJOIN_pnNst_join_table_pnDTHD_XIdd_v_+0x5a1
    /usr/mysql/5.1/bin/mysqld'__1cbGbest_extension_by_limited_search6FpnEJOIN_XIddII_b_+0x251
    /usr/mysql/5.1/bin/mysqld'__1cbGbest_extension_by_limited_search6FpnEJOIN_XIddII_b_+0x58d
    /usr/mysql/5.1/bin/mysqld'__1cbGbest_extension_by_limited_search6FpnEJOIN_XIddII_b_+0x58d
    /usr/mysql/5.1/bin/mysqld'__1cLchoose_plan6FpnEJOIN_X_b_+0x2b3
    /usr/mysql/5.1/bin/mysqld'__1cUmake_join_statistics6FpnEJOIN_pnKTABLE_LIST_pnEItem_pnQst_dynamic_array__b_+0x16d9
    /usr/mysql/5.1/bin/mysqld'__1cEJOINIoptimize6M_i_+0x5a0
    /usr/mysql/5.1/bin/mysqld'__1cMmysql_select6FpnDTHD_pppnEItem_pnKTABLE_LIST_IrnEList4n0B___p2IpnIst_order_9D39DXpnNselect_result_pnSst_select_lex_unit_pnNst_select_lex__b_+0x363
    /usr/mysql/5.1/bin/mysqld'__1cNhandle_select6FpnDTHD_pnGst_lex_pnNselect_result_L_b_+0x11f
    /usr/mysql/5.1/bin/mysqld'__1cVexecute_sqlcom_select6FpnDTHD_pnKTABLE_LIST__b_+0x20f
    /usr/mysql/5.1/bin/mysqld'__1cVmysql_execute_command6FpnDTHD__i_+0x497
    /usr/mysql/5.1/bin/mysqld'__1cQdispatch_command6FnTenum_server_command_pnDTHD_pcI_b_+0x26b3
    /usr/mysql/5.1/bin/mysqld'__1cKdo_command6FpnDTHD__b_+0x105
    /usr/mysql/5.1/bin/mysqld'handle_one_connection+0x3b6
    /lib/libc.so.1'_thrp_setup+0x9b
    /lib/libc.so.1'_lwp_start+0x0
    091118  7:59:45 - mysqld got signal 11 ;
    This could be because you hit a bug. It is also possible that this binary
    or one of the libraries it was linked against is corrupt, improperly built,
    or misconfigured. This error can also be caused by malfunctioning hardware.
    We will try our best to scrape up some info that will hopefully help diagnose
    the problem, but since we have already crashed, something is definitely wrong
    and this may fail.

    key_buffer_size=16384
    read_buffer_size=262144
    max_used_connections=1
    max_threads=151
    threads_connected=1
    It is possible that mysqld could use up to
    key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 49277 K
    bytes of memory
    Hope that's ok; if not, decrease some variables in the equation.

    thd: 0xb1c4608
    Attempting backtrace. You can use the following information to find out
    where mysqld died. If you see no messages after this, something went
    terribly wrong…
    stack_bottom = fee0dfac thread_stack 0x20000
    Trying to get some variables.
    Some pointers may be invalid and cause the dump to abort…
    thd->query at b5ea618 = SELECT tasks.id AS id,
                    tasks.name AS name,
                    tasks.parent AS parent,
                    tasks.status AS status,
                    tasks.finished_time AS finished_time,
                    UNIX_TIMESTAMP(  tasks.deadline) AS due,
                    UNIX_TIMESTAMP(  tasks.edited) AS edited,
                    UNIX_TIMESTAMP(  tasks.lastforumpost) AS lastpost,
                    UNIX_TIMESTAMP(  tasks.lastfileupload) AS lastfileupload,
                    tasks.owner AS owner,
                    tasks.priority AS priority,
                    users.id AS userid,
                    users.fullname AS username,
                    taskgroups.id AS group_id,
                    taskgroups.name AS group_name,
                    taskgroups.description AS group_description,
                    UNIX_TIMESTAMP(  seen.time) AS last_seen
                    FROM tasks
                    LEFT JOIN users ON (users.id=tasks.owner)
                    LEFT JOIN taskgroups ON (taskgroups.id=tasks.taskgroupid)
                    LEFT JOIN seen ON (tasks.id=se
    thd->thread_id=5
    thd->killed=NOT_KILLED
    The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
    information that should help you find out what is causing the crash.
    091118 07:59:45 mysqld_safe mysqld restarted
    091118  7:59:45  option 'thread_stack': unsigned value 65536 adjusted to 131072
    091118  7:59:45  option 'thread_stack': unsigned value 65536 adjusted to 131072
    091118  7:59:45  InnoDB: Started; log sequence number 0 46409
    091118  7:59:45  Event Scheduler: Loaded 0 events
    091118  7:59:45  /usr/mysql/5.1/bin/mysqld: ready for connections.
    Version: '5.1.30'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution

     
  • Paul Southerby

    Paul Southerby - 2009-11-18

    Maybe I have the wrong MySQL database set up.  Maybe I
    need InnoDB MySQL database in order for this to work?
    I'll try creating a different database (once I figure out how to do
    this).

    091117 03:21:04 mysqld_safe Starting mysqld daemon with databases from /var/mysql/5.1/data
    091117  3:21:04  option 'thread_stack': unsigned value 65536 adjusted to 131072
    091117  3:21:04  option 'thread_stack': unsigned value 65536 adjusted to 131072
    InnoDB: The first specified data file ./ibdata1 did not exist:
    InnoDB: a new database to be created!
    091117  3:21:04  InnoDB: Setting file ./ibdata1 size to 10 MB
    InnoDB: Database physically writes the file full: wait…
    091117  3:21:05  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
    InnoDB: Setting log file ./ib_logfile0 size to 5 MB
    InnoDB: Database physically writes the file full: wait…
    091117  3:21:05  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
    InnoDB: Setting log file ./ib_logfile1 size to 5 MB
    InnoDB: Database physically writes the file full: wait…
    InnoDB: Doublewrite buffer not found: creating new
    InnoDB: Doublewrite buffer created
    InnoDB: Creating foreign key constraint system tables
    InnoDB: Foreign key constraint system tables created
    091117  3:21:05  InnoDB: Started; log sequence number 0 0
    091117  3:21:05  Event Scheduler: Loaded 0 events
    091117  3:21:05  /usr/mysql/5.1/bin/mysqld: ready for connections.
    Version: '5.1.30'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
    091117  5:28:17 - mysqld got signal 11 ;
    This could be because you hit a bug. It is also possible that this binary
    or one of the libraries it was linked against is corrupt, improperly built,
    or misconfigured. This error can also be caused by malfunctioning hardware.
    We will try our best to scrape up some info that will hopefully help diagnose
    the problem, but since we have already crashed, something is definitely wrong
    and this may fail.

     
  • Paul Southerby

    Paul Southerby - 2009-11-18

    Well, I created a new database and selected the MySQL with InnoDB
    from the Webcollab web page, but I'm still seeing MySQL crash. 
    Hmm…

     
  • Paul Southerby

    Paul Southerby - 2009-11-19

    The problem is a bug with MySQL.
    (See http://bugs.mysql.com/bug.php?id=44538)

    I have an AMD 64 bit processor.  I needed to run the mysql database
    in 64 bit.  Once I changed the mysql database to run in 64 bit,
    webcollab worked fine.

    Work around:

    # svccfg -s mysql:version_51 setprop mysql/enable_64bit=true
    # svcadm refresh mysql:version_51
    # svcadm restart mysql:version_51

     
  • Andrew Simpson

    Andrew Simpson - 2009-11-19

    Excellent.  That has to be the most impressive MySQL crash I've seen!  Actually, I don't think I've ever really seen it crash before.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.