CarolBooth Posted September 22, 2014 Posted September 22, 2014 (edited) I'm running Moodle 2.6 on Ubuntu 12.04, apache 2.2.22, php 5.3.10 using apc 3.1.7-1 I've been noticing occasional segmentation faults in the apache logs for over a year but lately they are getting much more frequent (5 today!) Can't think of any settings changes which coincide with the increase although we went up to Moodle 2.6 from 2.5 in the Summer I've been attempting to get apache to core dump as I've read that I will then be able to use gdb to track down the source of the error but it doesn't write the dumps I have done: set up core dump directory: this line in /etc/apache2/apache2.conf: CoreDumpDirectory /etc/apache2/apache2-gdb-dump in /etc/apache2/ drwxrwxrwx 2 www-data www-data 4096 Mar 19 2014 apache2-gdb-dump ensured core dump size isn’t limited with ulimit -c unlimited installed gcore restarted apache apache logs have lots of lines like: [Mon Sep 22 14:37:35 2014] [notice] child pid 22909 exit signal Segmentation fault (11), possible coredump in /etc/apache2/apache2-gdb-dump ... but no core dump is getting written I've seen some stuff about debug symbols but I can't work out where to get them. Any help really gratefully received! Carol Here's what I've been doing on my test server to try and test core dumping: carol@ubuntuTEST:~$ ps waux | grep apache root 1607 0.0 1.8 327412 71880 ? Ss 14:01 0:00 /usr/sbin/apache2 -k start www-data 1610 0.0 0.1 327436 6024 ? S 14:01 0:00 /usr/sbin/apache2 -k start www-data 1611 0.0 0.1 327436 6024 ? S 14:01 0:00 /usr/sbin/apache2 -k start www-data 1612 0.0 0.1 327436 6024 ? S 14:01 0:00 /usr/sbin/apache2 -k start www-data 1613 0.0 0.1 327436 6024 ? S 14:01 0:00 /usr/sbin/apache2 -k start www-data 1614 0.0 0.1 327436 6024 ? S 14:01 0:00 /usr/sbin/apache2 -k start carol 2284 0.0 0.0 9396 880 pts/0 S+ 15:16 0:00 grep --color=auto apache carol@ubuntuTEST:~$ sudo gcore 1607 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff103fe000 0x00007ff4b3bc9683 in select () from /lib/x86_64-linux-gnu/libc.so.6 warning: Memory read failed for corefile section, 1048576 bytes at 0x7ff4a4cd9000. ... many more lines like this Saved corefile core.1607 carol@ubuntuTEST:~$ sudo gdb /usr/sbin/apache2ctl core.1607 GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04 Copyright © 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: ... "/usr/sbin/apache2ctl": not in executable format: File format not recognised [New LWP 1607] warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff103fe000 Core was generated by `apache2'. #0 0x00007ff4b3bc9683 in ?? () (gdb) Edited September 22, 2014 by CarolBooth additonal information
jtoland Posted September 22, 2014 Posted September 22, 2014 Hay if you are a school get cpanel edu for £15 and change to centos it will work perfectly for you
CarolBooth Posted September 24, 2014 Author Posted September 24, 2014 Segmentation faults solved! It was due to apc memory set too small. Changed from 100M to 300M and now seems happy - no segfaults for 2 days now new content of /etc/php5/conf.d/apc.ini: extension=apc.so apc.shm_size = 300M apc.max_file_size=10M Interestingly (?) I had previously been setting apc memory size in /etc/php5/apache2/php.ini I take it that apc.ini overrides whatever is in php.ini having said that, I'd still love to know why I can't get apache to do a core dump - any advice welcomed
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now