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).
o 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
2 Comments
Back to Ubuntu?
[Reply]
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).
o 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
实际上就是用gdb去跟踪错误的原因….我觉得如此大范围的问题….可能就是出现在core dump上面….而且是应该某个通用库的问题….用gdb基本可以过滤出Segmentation fault的基本原因
[Reply]