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

Bug #567043 reported by PhracturedBlue
64
This bug affects 11 people
Affects Status Importance Assigned to Milestone
php
Unknown
Unknown
php5 (Ubuntu)
Fix Released
Medium
Unassigned
Lucid
Fix Released
Medium
Unassigned
Maverick
Fix Released
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

Revision history for this message
PhracturedBlue (pblue) wrote :
Revision history for this message
PhracturedBlue (pblue) wrote :

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

Revision history for this message
PhracturedBlue (pblue) 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.

Revision history for this message
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
Revision history for this message
PhracturedBlue (pblue) 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.

Revision history for this message
Mathias Gug (mathiaz) wrote : Re: [Bug 567043] Re: [lucid] php5-cgi crashes in memcpy using lighttpd

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

Revision history for this message
Chuck Short (zulcss) wrote : Re: [lucid] php5-cgi crashes in memcpy using lighttpd

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
Revision history for this message
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

Revision history for this message
PhracturedBlue (pblue) wrote :

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

Revision history for this message
Ondřej Surý (ondrej) wrote :

Chuck, care to share the patch with Debian?

Revision history for this message
Chuck Short (zulcss) wrote :

This is a patch

Chuck Short (zulcss)
summary: - [lucid] php5-cgi crashes in memcpy using lighttpd
+ [SRU] [lucid] php5-cgi crashes in memcpy using lighttpd
Revision history for this message
Chuck Short (zulcss) wrote : Re: [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

Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

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
Revision history for this message
John van der Kamp (john-zarafa) wrote : Re: [SRU] [lucid] php5-cgi crashes in memcpy using lighttpd

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

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Loïc Minier (lool)
summary: - [SRU] [lucid] php5-cgi crashes in memcpy using lighttpd
+ [SRU] [lucid] php5 segfault when calling mysqli_options()
Revision history for this message
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
Revision history for this message
Martin Pitt (pitti) wrote :

Copied to maverick.

Changed in php5 (Ubuntu Maverick):
status: Triaged → Fix Released
Revision history for this message
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.

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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