Archive for the tag 'crash'

How to generate a crash dump on Redhat Linux

The Red Hat Crash Utility is a kernel-specific debugger. It is usually used for performing postmortem system analysis when the system panicked, locked up, or appears unresponsive.

Starting with the Red Hat Enterprise Linux 3 release, the crash utility is automatically installed during the system installation if the Development Tools package set is selected.

Test that Diskdump works. The following commands will crash your machine:

# echo 1 > /proc/sys/kernel/sysrq
# echo c > /proc/sysrq-trigger

Make sure that you run the above two commands in console (press Ctrl + Alt + F1), so that we can see what is happening when your system crashes. You have to perform this so that you can have a vmcore file to follow the rest of the paper. It will be located at /var/crash.

Using myisamchk for Crash Recovery in cPnael

If you run mysqld with external locking disabled (which is the default), you cannot reliably use myisamchk to check a table when mysqld is using the same table.

If the server is run with external locking enabled, you can use myisamchk to check tables at any time. In this case, if the server tries to update a table that myisamchk is using, the server will wait for myisamchk to finish before it continues.

If you use myisamchk to repair or optimize tables, you must always ensure that the mysqld server is not using the table (this also applies if external locking is disabled). If you do not stop mysqld, you should at least do a mysqladmin flush-tables before you run myisamchk. Your tables may become corrupted if the server and myisamchk access the tables simultaneously.

When performing crash recovery, it is important to understand that each MyISAM table tbl_name in a database corresponds to the three files in the database directory shown in the following table.

File Purpose
tbl_name.frm Definition (format) file
tbl_name.MYD Data file
tbl_name.MYI Index file

Each of these three file types is subject to corruption in various ways, but problems occur most often in data files and index files.

myisamchk works by creating a copy of the .MYD data file row by row. It ends the repair stage by removing the old .MYD file and renaming the new file to the original file name.

myisamchk -e tbl_name

This does a complete and thorough check of all data (-e means “extended check”). It does a check-read of every key for each row to verify that they indeed point to the correct row. This may take a long time for a large table that has many indexes. Normally, myisamchk stops after the first error it finds. If you want to obtain more information, you can add the -v (verbose) option. This causes myisamchk to keep going, up through a maximum of 20 errors.

Reference: http://dev.mysql.com/

Apache crash during high load in Ensim Pro Control Panel

Apache crash on high load with the following error in the error log: “(28) No space left on device: mod_python: Failed to create global mutex 1 of 4 exclog: signal received 15″

The problem may be caused by small number of semaphores in system.

Resolution is to increase number of semaphores.

To increase the number of semaphores please take the following steps, Login to your PPCPL server as root. Open the /etc/sysctl.conf file using a text editor

vi /etc/sysctl.conf

Locate the kernel.sem parameter and double current values

If the parameter is not defined in the /etc/sysctl.conf file you can obtain current values by executing the following command:

cat /proc/sys/kernel/sem

After obtaining current values, double them and add to the /etc/sysctl.conf file so that the line looks like.

kernel.sem = 512 32000 100 512

Execute sysctl in order the changes to take effect

sysctl –p

Apache crash during high load with Parallels Pro Control Panel

Apache crash on high load with the following error in the error log: “No space left on device:” The problem may be caused by small number of semaphores in system. To increase the number of semaphores please take the following steps:

Login to your PPCPL server as root. Open the /etc/sysctl.conf file using a text editor

vi /etc/sysctl.conf

Locate the kernel.sem parameter and double current values. If the parameter is not defined in the /etc/sysctl.conf file you can obtain current values by executing the following command:

cat /proc/sys/kernel/sem

After obtaining current values, double them and add to the /etc/sysctl.conf file so that the line looks like

kernel.sem = 512 32000 100 512

Please note, values for your installation may varry. Execute sysctl in order the changes to take effect.

sysctl –p