<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="what-is-crashing">
      </a>
      B.3.1 How to Determine What Is Causing a Problem
     </h3>
    </div>
   </div>
  </div>
  <p>
   When you run into a problem, the first thing you should do is to
        find out which program or piece of equipment is causing it:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      If you have one of the following symptoms, then it is
            probably a hardware problems (such as memory, motherboard,
            CPU, or hard disk) or kernel problem:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         The keyboard does not work. This can normally be checked
                by pressing the Caps Lock key. If the Caps Lock light
                does not change, you have to replace your keyboard.
                (Before doing this, you should try to restart your
                computer and check all cables to the keyboard.)
        </p>
       </li>
       <li class="listitem">
        <p>
         The mouse pointer does not move.
        </p>
       </li>
       <li class="listitem">
        <p>
         The machine does not answer to a remote machine's pings.
        </p>
       </li>
       <li class="listitem">
        <p>
         Other programs that are not related to MySQL do not
                behave correctly.
        </p>
       </li>
       <li class="listitem">
        <p>
         Your system restarted unexpectedly. (A faulty user-level
                program should never be able to take down your system.)
        </p>
       </li>
      </ul>
     </div>
     <p>
      In this case, you should start by checking all your cables
            and run some diagnostic tool to check your hardware! You
            should also check whether there are any patches, updates, or
            service packs for your operating system that could likely
            solve your problem. Check also that all your libraries (such
            as
      <code class="literal">
       glibc
      </code>
      ) are up to date.
     </p>
     <p>
      It is always good to use a machine with ECC memory to
            discover memory problems early.
     </p>
    </li>
    <li class="listitem">
     <p>
      If your keyboard is locked up, you may be able to recover by
            logging in to your machine from another machine and
            executing
      <code class="literal">
       kbd_mode -a
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      Please examine your system log file
            (
      <code class="filename">
       /var/log/messages
      </code>
      or similar) for
            reasons for your problem. If you think the problem is in
            MySQL, you should also examine MySQL's log files. See
      <a class="xref" href="server-logs.html" title="7.4 MySQL Server Logs">
       Section 7.4, “MySQL Server Logs”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      If you do not think you have hardware problems, you should
            try to find out which program is causing problems. Try using
      <span class="command">
       <strong>
        top
       </strong>
      </span>
      ,
      <span class="command">
       <strong>
        ps
       </strong>
      </span>
      , Task Manager,
            or some similar program, to check which program is taking
            all CPU or is locking the machine.
     </p>
    </li>
    <li class="listitem">
     <p>
      Use
      <span class="command">
       <strong>
        top
       </strong>
      </span>
      ,
      <span class="command">
       <strong>
        df
       </strong>
      </span>
      , or a
            similar program to check whether you are out of memory, disk
            space, file descriptors, or some other critical resource.
     </p>
    </li>
    <li class="listitem">
     <p>
      If the problem is some runaway process, you can always try
            to kill it. If it does not want to die, there is probably a
            bug in the operating system.
     </p>
    </li>
   </ul>
  </div>
  <p>
   If you have examined all other possibilities and concluded that
        the MySQL server or a MySQL client is causing the problem, it is
        time to create a bug report, see
   <a class="xref" href="bug-reports.html" title="1.6 How to Report Bugs or Problems">
    Section 1.6, “How to Report Bugs or Problems”
   </a>
   .
        In the bug report, try to give a complete description of how the
        system is behaving and what you think is happening. Also state
        why you think that MySQL is causing the problem. Take into
        consideration all the situations described in this chapter.
        State any problems exactly how they appear when you examine your
        system. Use the
   <span class="quote">
    “
    <span class="quote">
     copy and paste
    </span>
    ”
   </span>
   method for any
        output and error messages from programs and log files.
  </p>
  <p>
   Try to describe in detail which program is not working and all
        symptoms you see. We have in the past received many bug reports
        that state only
   <span class="quote">
    “
    <span class="quote">
     the system does not work.
    </span>
    ”
   </span>
   This
        provides us with no information about what could be the problem.
  </p>
  <p>
   If a program fails, it is always useful to know the following
        information:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      Has the program in question made a segmentation fault (did
            it dump core)?
     </p>
    </li>
    <li class="listitem">
     <p>
      Is the program taking up all available CPU time? Check with
      <span class="command">
       <strong>
        top
       </strong>
      </span>
      . Let the program run for a while, it
            may simply be evaluating something computationally
            intensive.
     </p>
    </li>
    <li class="listitem">
     <p>
      If the
      <a class="link" href="mysqld.html" title="6.3.1 mysqld — The MySQL Server">
       <span class="command">
        <strong>
         mysqld
        </strong>
       </span>
      </a>
      server is causing problems,
            can you get any response from it with
      <a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
       <span class="command">
        <strong>
         mysqladmin -u
            root ping
        </strong>
       </span>
      </a>
      or
      <a class="link" href="mysqladmin.html" title="6.5.2 mysqladmin — A MySQL Server Administration Program">
       <span class="command">
        <strong>
         mysqladmin -u root
            processlist
        </strong>
       </span>
      </a>
      ?
     </p>
    </li>
    <li class="listitem">
     <p>
      What does a client program say when you try to connect to
            the MySQL server? (Try with
      <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
       <span class="command">
        <strong>
         mysql
        </strong>
       </span>
      </a>
      , for
            example.) Does the client jam? Do you get any output from
            the program?
     </p>
    </li>
   </ul>
  </div>
  <p>
   When sending a bug report, you should follow the outline
        described in
   <a class="xref" href="bug-reports.html" title="1.6 How to Report Bugs or Problems">
    Section 1.6, “How to Report Bugs or Problems”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
