Ubuntu

[SRU] [lucid] php5 segfault when calling mysqli_options()

Reported by Geoffrey Hausheer on 2010-04-20
64
This bug affects 11 people
Affects Status Importance Assigned to Milestone
php
Unknown
Unknown
php5 (Ubuntu)
Medium
Unassigned
Lucid
Medium
Unassigned
Maverick
Medium
Unassigned

Bug Description

Binary package hint: php5

After upgrading to lucid, I get a segfault in php5-cgi when accessing a specific page (adding a new image in Gallery2) using lighttpd + php5-cgi
This happens both using cgi and fastcgi mode.
I have tried increasing the memory to 512M without any change in behavior.
using php-dbg and attaching to the process, I get the attached back-trace

Geoffrey Hausheer (tn8zg4c02) wrote :
Geoffrey Hausheer (tn8zg4c02) wrote :

Some useful info:
php5-cgi version 5.3.2-1ubuntu4
Architecture: amd64

Geoffrey Hausheer (tn8zg4c02) wrote :

FYI I was able to successfully downgrade to php5.2.10 from Karmic and everything works again, but 5.3.2 isn't reallyusable for me.

Mathias Gug (mathiaz) wrote :

Could you provide a simple test script that make php segfault?

Changed in php5 (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Geoffrey Hausheer (tn8zg4c02) wrote :

No, I don't know how to do that.
I can make it fault on demand by accessing specific pages on my site, but I don't know how to strip it down to a test-case.

Still, I don't expect php to ever segfault, and I certainly necver had this issues on previous php versions.

On Tue, Apr 20, 2010 at 10:31:37PM -0000, Geoffrey Hausheer wrote:
> No, I don't know how to do that.
> I can make it fault on demand by accessing specific pages on my site, but I don't know how to strip it down to a test-case.
>

Could you outline which version of the software you're using on your site?
Which page generates the segfault?

--
Mathias Gug
Ubuntu Developer http://www.ubuntu.com

Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments at:

http://bugs.php.net/bug.php?id=51624

Changed in php5 (Ubuntu):
status: Incomplete → Triaged
Chuck Short (zulcss) wrote :

Can you try the version in https://edge.launchpad.net/~zulcss/+archive/server-lucid-bug-fixes when it becomes available?

Thanks
chuck

Geoffrey Hausheer (tn8zg4c02) wrote :

Yes, using 5.3.2-1ubuntu5 seems to have fixed the issue. Thanks!

Ondřej Surý (ondrej) wrote :

Chuck, care to share the patch with Debian?

Chuck Short (zulcss) wrote :

This is a patch

Chuck Short (zulcss) on 2010-05-03
summary: - [lucid] php5-cgi crashes in memcpy using lighttpd
+ [SRU] [lucid] php5-cgi crashes in memcpy using lighttpd

Statement of Impact:

Lucid was shipped with a bug in PHP that can cause PHP applications to segfault when running certain applications (ex: gallyer2). This was addressed in PHP bug #51624, and is fixed in PHP 5.3.3-dev.

How this has been addressed:

This bug has been fixed in the PHP SVN and the patch has been backported to 5.3.2. I have asked people to verfiy that the patch fixes their installation of gallery2 as shown below. I have attached the patch which fixes this issue.

How to reproduce:

1. Try to install gallery2 with ubuntu4.
2. Check the segfaults in dmesg

There shouldnt be any regressions with this patch. If you have any questions please let me know.

Regards
chuck

Accepted php5 into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in php5 (Ubuntu Lucid):
status: Triaged → Fix Committed
tags: added: verification-needed

fixes #574741, which is marked dup of this bug.

Martin Pitt (pitti) on 2010-05-04
tags: added: verification-done
removed: verification-needed
Loïc Minier (lool) on 2010-05-04
summary: - [SRU] [lucid] php5-cgi crashes in memcpy using lighttpd
+ [SRU] [lucid] php5 segfault when calling mysqli_options()
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package php5 - 5.3.2-1ubuntu4.1

---------------
php5 (5.3.2-1ubuntu4.1) lucid-proposed; urgency=low

  * debian/patches/fix-mysql-badmem.patch: Fix mysql crash when using php5-cgi. (LP: #567043)
 -- Chuck Short <email address hidden> Mon, 03 May 2010 11:23:43 -0400

Changed in php5 (Ubuntu Lucid):
status: Fix Committed → Fix Released
Martin Pitt (pitti) wrote :

Copied to maverick.

Changed in php5 (Ubuntu Maverick):
status: Triaged → Fix Released
Loïc Minier (lool) wrote :

Just for the record, I had segfaults with gallery2 not only during install but apparently also after install at random (local connections worked, but not remote ones, no idea why). After installing the update, I don't have the problem anymore.

Alon Swartz (alonswartz) wrote :

While installing Gallery2 on Lucid, php5 5.3.2-1ubuntu4.5, the following error is displayed several hundred times - as explained in #569865 (which was marked as a duplicate of this bug).

  Deprecated: Function ereg() is deprecated in /usr/share/gallery2/modules/core/classes/GalleryStorage.class

Regression from 5.3.2-1ubuntu4.1? Different bug?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.