≡ Menu


According to wikipedia:

A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a memory location in a way that is not allowed (for example, attempting to write to a read-only location, or to overwrite part of the operating system).

Usually signal #11 (SIGSEGV) set, which is defined in the header file signal.h file. The default action for a program upon receiving SIGSEGV is abnormal termination. This action will end the process, but may generate a core file (also known as core dump) to aid debugging, or perform some other platform-dependent action. A core dump is the recorded state of the working memory of a computer program at a specific time, generally when the program has terminated abnormally.

Segmentation fault can also occur under following circumstances:

a) A buggy program / command, which can be only fixed by applying patch.

b) It can also appear when you try to access an array beyond the end of an array under C programming.

c) Inside a chrooted jail this can occur when critical shared libs, config file or /dev/ entry missing.

d) Sometime hardware or faulty memory or driver can also create problem.

e) Maintain suggested environment for all computer equipment (overheating can also generate this problem).

Suggestions to debug Segmentation Fault errors

To debug this kind of error try one or all of the following techniques :

  • Use gdb to track exact source of problem.
  • Make sure correct hardware installed and configured.
  • Always apply all patches and use updated system.
  • Make sure all dependencies installed inside jail.
  • Turn on core dumping for supported services such as Apache.
  • Use strace which is a useful diagnostic, instructional, and debugging tool.
  • Google and find out if there is a solution to problem.
  • Fix your C program for logical errors such as pointer, null pointer, arrays and so on.
  • Analyze core dump file generated by your system using gdb

Further readings:

Please add your suggestions and debugging techniques in the comment below.

Midori OS: Microsoft Sees End of Windows Era

Midori operating system is the code name for a microkernel-based operating system written as managed code, being developed at Microsoft, mooted as a possible successor to Microsoft Windows by many.

Midori will use the Internet to operate and data will be stored on central Microsoft server. It will remove the role of a single PC. From the BBC article:

Microsoft has kicked off a research project to create software that will take over when it retires Windows. Called Midori, the cut-down operating system is radically different to Microsoft's older programs. It is centred on the internet and does away with the dependencies that tie Windows to a single PC. It is seen as Microsoft's answer to rivals' use of "virtualisation" as a way to solve many of the problems of modern-day computing.

I don't know about Windows user, but Linux will be there as a desktop operating system along with other alternatives. I'm not going to store my data on 3rd company corporate network, I don't trust 3rd party for my data, period. Imagine security related problems. That's why, I don't use any of the Web 2.0 stuff including Google docs, flickr and so on.