MyBB Community Forums

Full Version: [Bug?] php-cgi process segfault on conversion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

While trying to convert from IPB 2.3.6 to MyBB, I've got the following problem: php-cgi process segfaults after the Merge System finishes importing forums.
Segfault happens right before it had to return to module selection page, imported forums do not show up in MyBB installation(users/usergroups do).

I tested this on following platforms:
  • Apache 2.2.11 or lighttpd 1.4.22, mysql 5.1.34, PHP 5.2.9 with Suhosin-Patch 0.9.7 (my working machine);
  • Apache 2.2 branch, mysql 5.0.67, PHP 5.2.6 (hosting);
With both beta 3 and 4 of the merge system.

Lighttpd messages:
2009-06-01 11:05:14: (mod_fastcgi.c.2494) unexpected end-of-file (perhaps the fastcgi process died): pid: 29676 socket: unix:/tmp/php-fastcgi.socket-3 
2009-06-01 11:05:14: (mod_fastcgi.c.3326) response not received, request sent: 1234 on socket: unix:/tmp/php-fastcgi.socket-3 for /mybb/convert/index.php , closing connection

Apache messages:
[Mon Jun 01 09:21:27 2009] [notice] child pid 15500 exit signal Segmentation fault (11)

kernel log:
Jun  1 11:01:33 sm217 kernel: php-cgi[3761]: segfault at bf6b6ec8 ip 0822205f sp bf6b6ec0 error 6 in php-cgi[8048000+436000]
(please ignore that time/pid differ)

This is first time I see php segfaulting D:
Any ideas?
Do you have any modifications or outdated PHP/Apache extensions? Is your apache installations setup on worker or prefork?
Apache on working machine is prefork, no idea about one on my hosting. MyBB installation has no modifications, IPB one has some. List of PHP extensions:
extension=bz2.so
extension=gettext.so
extension=iconv.so
extension=mysql.so
extension=mysqli.so
extension=session.so
extension=zlib.so

Lighttpd runs with mod_fastcgi, mod_cgi, mod_compress, mod_accesslog. Apache runs with all available modules except unique_id_module (I use lighty, so I don't care).
A PHP script shouldn't cause a segfault - basically means that if one does occur, it can't really be a problem with a PHP script.
I've found php-cgi or PHP + FastCGI to segfault quite often in my experience (dunno why, but it just keep happening to me). Perhaps give Apache + normal CGI (PHP module) a go.
I tried that, and also XAMPP, same thing :<
As it segfaults right after, or during forums import, I'll have a look at that code, maybe I can find something.
What's seg faulting now? Apache itself?
I think PHP still does. Apache's error_log has:
[Tue Jun 02 08:48:35 2009] [notice] child pid 28687 exit signal Segmentation fault (11)

I think that is a problem with modificatons to my IPB installation. I just checked, a clean one converted fine(except encoding, but that's not really a problem).
It seems that replacing ibf_forums with one from clean IPB fixes this, I'll play some more and post here.
Child pid? If you're using PHP as an Apache CGI module, it shouldn't be spawning a child process.

But anyway, glad you figured something out.
Just tried with normal PHP, same thing.
(2009-06-03, 10:11 AM)Evgeny Wrote: [ -> ]Just tried with normal PHP, same thing.
Yeah, but what segfaulted in that case? Apache itself?