php5-cgi crashed with SIGSEGV in zval_mark_grey()

Bug #590255 reported by Volodymyr Kolesnykov
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
New
Medium
Unassigned

Bug Description

Binary package hint: php5

# lsb_release -rd
Description: Ubuntu 10.04 LTS
Release: 10.04

# apt-cache policy php5-cgi
php5-cgi:
  Installed: 5.3.2-1ubuntu4.2
  Candidate: 5.3.2-1ubuntu4.2
  Version table:
 *** 5.3.2-1ubuntu4.2 0
        500 http://ua.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
        100 /var/lib/dpkg/status
     5.3.2-1ubuntu4 0
        500 http://ua.archive.ubuntu.com/ubuntu/ lucid/main Packages

php is run as a FastCGI server, serves WordPress 2.9.x and WordPress 3.0-dev.

Crashes happen at least once a day

ProblemType: Crash
DistroRelease: Ubuntu 10.04
Package: php5-cgi 5.3.2-1ubuntu4.2
ProcVersionSignature: Ubuntu 2.6.32-22.36-server 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-server x86_64
Architecture: amd64
CrashCounter: 1
Date: Sat Jun 5 22:25:17 2010
ExecutablePath: /usr/bin/php5-cgi
ProcCmdline: /usr/bin/php-cgi -q -b /dev/shm/php-fcgi.sock -c /etc/php5/cgi/php.ini
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SegvAnalysis:
 Segfault happened at: 0x6b21ec <zval_mark_grey+188>: mov (%rax),%rdi
 PC (0x006b21ec) ok
 source "(%rax)" (0x06d99f98) not located in a known VMA region (needed readable region)!
 destination "%rdi" ok
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: php5
StacktraceTop:
 zval_mark_grey (pz=0x2d99008) at /build/buildd/php5-5.3.2/Zend/zend_gc.c:360
 gc_collect_cycles () at /build/buildd/php5-5.3.2/Zend/zend_gc.c:417
 gc_zval_possible_root (zv=0x2d99008) at /build/buildd/php5-5.3.2/Zend/zend_gc.c:166
 zend_hash_destroy (ht=0x349e630) at /build/buildd/php5-5.3.2/Zend/zend_hash.c:726
 _zval_dtor_func (zvalue=0x21a52a0) at /build/buildd/php5-5.3.2/Zend/zend_variables.c:46
Title: php5-cgi crashed with SIGSEGV in zval_mark_grey()
UserGroups:

Revision history for this message
Volodymyr Kolesnykov (sjinks) wrote :
description: updated
Revision history for this message
Volodymyr Kolesnykov (sjinks) wrote :

UPD: yesterday there were 30 segfaults according to /var/log/kern.log, php serves ~ 150,000 pages a day. The crash is difficult to reproduce but it is very annoying

Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 ?? ()
 gc_collect_cycles ()
 gc_zval_possible_root ()
 zend_hash_destroy ()
 _zval_dtor_func ()

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in php5 (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
visibility: private → public
Revision history for this message
stuecki (lauchpad-k) wrote :

Same here with
Ubuntu Server 10.04, php 5.3.2-1ubuntu4.9
running a modified xtcommerce-shop.

The SIGSEGV happens at the end of the script (all output allready written) every time it runs, no matter whether php5-cgi, php5 or cli.

No more Segfaults when zend.enable_gc=Off is set in php.ini.

Top of Trace :

--- stack trace ---
#0 zval_mark_grey (pz=0x23bbc58) at /build/buildd/php5-5.3.2/Zend/zend_gc.c:356
        p = 0xfffffffffffffffc
#1 0x00000000006b4ee5 in gc_collect_cycles () at /build/buildd/php5-5.3.2/Zend/zend_gc.c:417
        p = 0x7f73be97a1b2
        q = 0xfffffffffffffffc
        orig_free_list = 0x7fffc3b15ef1
        orig_next_to_free = 0x7fffc3b15eb7
        count = -1097358928
#2 0x0000000000697645 in zend_deactivate () at /build/buildd/php5-5.3.2/Zend/zend.c:972
        __orig_bailout = 0x7fffc3b11960

[...]

--- source code stack trace ---
#0 zval_mark_grey (pz=0x23bbc58) at /build/buildd/php5-5.3.2/Zend/zend_gc.c:356
  [Error: /build/buildd/php5-5.3.2/Zend/zend_gc.c was not found in source tree]
#1 0x00000000006b4ee5 in gc_collect_cycles () at /build/buildd/php5-5.3.2/Zend/zend_gc.c:417
  [Error: /build/buildd/php5-5.3.2/Zend/zend_gc.c was not found in source tree]
#2 0x0000000000697645 in zend_deactivate () at /build/buildd/php5-5.3.2/Zend/zend.c:972
  [Error: /build/buildd/php5-5.3.2/Zend/zend.c was not found in source tree]
#3 0x0000000000643185 in php_request_shutdown (dummy=0x23bbc58) at /build/buildd/php5-5.3.2/main/main.c:1649
  [Error: /build/buildd/php5-5.3.2/main/main.c was not found in source tree]
#4 0x0000000000724ba0 in main (argc=32767, argv=0x0) at /build/buildd/php5-5.3.2/sapi/cgi/cgi_main.c:2160
  [Error: /build/buildd/php5-5.3.2/sapi/cgi/cgi_main.c was not found in source tree]

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.