php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65258 Segfault running example code for Event PECL
Submitted: 2013-07-14 04:45 UTC Modified: 2013-07-21 12:29 UTC
From: john dot wamer at wamersports dot com Assigned: osmanov (profile)
Status: Closed Package: event (PECL)
PHP Version: 5.4.17 OS: Ubuntu 12.04 LTS (3.2.0-23-gener
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: john dot wamer at wamersports dot com
New email:
PHP Version: OS:

 

 [2013-07-14 04:45 UTC] john dot wamer at wamersports dot com
Description:
------------
Considering use of Event class in upcomming project.

Installed a fresh version of php 5.4.17, plus libevent 2.2 and event PECL ext.

Used exact example from:
http://www.php.net/manual/en/event.examples.php
Example #8 Simple HTTP server

Changed to machines local ip and the port I wanted to test on, opened in browser and cli reports a segfault.

output of php -i

phpinfo()
PHP Version => 5.4.17

System => Linux vm11 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64
Build Date => Jul 13 2013 23:30:10
Configure Command =>  './configure'  '--prefix=/usr' '--with-config-file-path=/etc/php5/conf' '--with-config-file-scan-dir=/etc/php5/conf/conf.d' '--enable-soap' '--with-openssl' '--with-zlib' '--enable-calendar' '--with-curl' '--with-curlwrappers' '--with-mhash' '--enable-intl' '--enable-mbstring' '--with-mcrypt' '--enable-pcntl' '--with-pspell' '--with-libedit' '--with-readline' '--enable-shmop' '--with-snmp' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvshm' '--with-xsl' '--with-pear' '--enable-zend-signals' '--enable-maintainer-zts' '--enable-pthreads=static'
Server API => Command Line Interface
Virtual Directory Support => enabled
Configuration File (php.ini) Path => /etc/php5/conf
Loaded Configuration File => /etc/php5/conf/php.ini
Scan this dir for additional .ini files => /etc/php5/conf/conf.d
Additional .ini files parsed => (none)
PHP API => 20100412
PHP Extension => 20100525
Zend Extension => 220100525
Zend Extension Build => API220100525,TS
PHP Extension Build => API20100525,TS
Debug Build => no
Thread Safety => enabled
Zend Signal Handling => enabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled

Registered PHP Streams => compress.zlib, dict, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtmp, rtsp, smtp, smtps, telnet, tftp, php, file, glob, data, phar
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, tls
Registered Stream Filters => zlib.*, convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies


 _______________________________________________________________________


Configuration

calendar

Calendar support => enabled

Core

PHP Version => 5.4.17

Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
always_populate_raw_post_data => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => no value => no value
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => Off => Off
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
exit_on_timeout => Off => Off
expose_php => On => On
extension_dir => /usr/lib/php/extensions/no-debug-zts-20100525 => /usr/lib/php/extensions/no-debug-zts-20100525
file_uploads => On => On
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/lib/php => .:/usr/lib/php
log_errors => On => On
log_errors_max_len => 1024 => 1024
mail.add_x_header => On => On
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => 128M => 128M
open_basedir => no value => no value
output_buffering => 0 => 0
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 16K => 16K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
sendmail_from => no value => no value
sendmail_path =>  -t -i  =>  -t -i 
serialize_precision => 17 => 17
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sql.safe_mode => Off => Off
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.multibyte => Off => Off
zend.script_encoding => no value => no value
zend.signal_check => Off => Off

ctype

ctype functions => enabled

curl

cURL support => enabled
cURL Information => 7.22.0
Age => 3
Features
AsynchDNS => No
Debug => No
GSS-Negotiate => Yes
IDN => Yes
IPv6 => Yes
Largefile => Yes
NTLM => Yes
SPNEGO => No
SSL => Yes
SSPI => No
krb4 => No
libz => Yes
CharConv => No
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtmp, rtsp, smtp, smtps, telnet, tftp
Host => x86_64-pc-linux-gnu
SSL Version => OpenSSL/1.0.1
ZLib Version => 1.2.3.4

date

date/time support => enabled
"Olson" Timezone Database Version => 2013.3
Timezone Database => internal
Default timezone => America/Chicago

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => America/Chicago => America/Chicago

dom

DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.7.8
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled
Schema Support => enabled
RelaxNG Support => enabled

ereg

Regex Library => Bundled library enabled

ev

Ev support => enabled
Debug support => disabled
Version => 0.2.4

event

event support => enabled
Debug support => disabled
Extra functionality support including HTTP, DNS, and RPC => enabled
OpenSSL support => enabled
Thread safety support => enabled
Version => 1.6.1

fileinfo

fileinfo support => enabled
version => 1.0.5

filter

Input Validation and Filtering => enabled
Revision => $Id: 2aa8dd57d9c0c655cd45e6e5872bb95fa5ad76cf $

Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value

gearman

gearman support => enabled
extension version => 1.1.1
libgearman version => 1.1.8
Default TCP Host => localhost
Default TCP Port => 4730

hash

hash support => enabled
Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b fnv132 fnv164 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 

iconv

iconv support => enabled
iconv implementation => glibc
iconv library version => 2.15

Directive => Local Value => Master Value
iconv.input_encoding => ISO-8859-1 => ISO-8859-1
iconv.internal_encoding => ISO-8859-1 => ISO-8859-1
iconv.output_encoding => ISO-8859-1 => ISO-8859-1

intl

Internationalization support => enabled
version => 1.1.0
ICU version => 4.8.1.1
ICU Data version => 4.8.1

Directive => Local Value => Master Value
intl.default_locale => no value => no value
intl.error_level => 0 => 0

json

json support => enabled
json version => 1.2.1

libevent

libevent support => enabled
extension version => 0.1.0
Revision => $Revision$
libevent version => 2.0.21-stable

libxml

libXML support => active
libXML Compiled Version => 2.7.8
libXML Loaded Version => 20708
libXML streams => enabled

mbstring

Multibyte Support => enabled
Multibyte string engine => libmbfl
HTTP input encoding translation => disabled
libmbfl version => 1.3.2

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Multibyte (japanese) regex support => enabled
Multibyte regex (oniguruma) backtrack check => On
Multibyte regex (oniguruma) version => 4.7.1

Directive => Local Value => Master Value
mbstring.detect_order => no value => no value
mbstring.encoding_translation => Off => Off
mbstring.func_overload => 0 => 0
mbstring.http_input => pass => pass
mbstring.http_output => pass => pass
mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)
mbstring.internal_encoding => no value => no value
mbstring.language => neutral => neutral
mbstring.strict_detection => Off => Off
mbstring.substitute_character => no value => no value

mcrypt

mcrypt support => enabled
mcrypt_filter support => enabled
Version => 2.5.8
Api No => 20021217
Supported ciphers => cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes 
Supported modes => cbc cfb ctr ecb ncfb nofb ofb stream 

Directive => Local Value => Master Value
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value

mhash

MHASH support => Enabled
MHASH API Version => Emulated Support

mongo

MongoDB Support => enabled
Version => 1.4.1
SSL Support => enabled

Directive => Local Value => Master Value
mongo.allow_empty_keys => 0 => 0
mongo.chunk_size => 262144 => 262144
mongo.cmd => $ => $
mongo.default_host => localhost => localhost
mongo.default_port => 27017 => 27017
mongo.is_master_interval => 15 => 15
mongo.long_as_object => 0 => 0
mongo.native_long => 0 => 0
mongo.ping_interval => 5 => 5

openssl

OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.0.1 14 Mar 2012
OpenSSL Header Version => OpenSSL 1.0.1 14 Mar 2012

pcntl

pcntl support => enabled

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.32 2012-11-30

Directive => Local Value => Master Value
pcre.backtrack_limit => 1000000 => 1000000
pcre.recursion_limit => 100000 => 100000

PDO

PDO support => enabled
PDO drivers => sqlite

pdo_sqlite

PDO Driver for SQLite 3.x => enabled
SQLite Library => 3.7.7.1

Phar

Phar: PHP Archive support => enabled
Phar EXT version => 2.0.1
Phar API version => 1.1.1
SVN revision => $Id: c5042cc34acebcc0926625b57dff03deebbe6472 $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
gzip compression => enabled
bzip2 compression => disabled (install pecl/bz2)
Native OpenSSL support => enabled


Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive => Local Value => Master Value
phar.cache_list => no value => no value
phar.readonly => On => On
phar.require_hash => On => On

posix

Revision => $Id: 32db6705f5b617967a546be3114e178a4138c1ca $

pspell

PSpell Support => enabled

pthreads

Version => 0.44

readline

Readline Support => enabled
Readline library => EditLine wrapper

Directive => Local Value => Master Value
cli.pager => no value => no value
cli.prompt => \b \>  => \b \> 

Reflection

Reflection => enabled
Version => $Id: 6c4d8062369898a397e4b128348042f5c01b4427 $

session

Session Support => enabled
Registered save handlers => files user 
Registered serializer handlers => php php_binary 

Directive => Local Value => Master Value
session.auto_start => Off => Off
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => Off => Off
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off
session.entropy_file => /dev/urandom => /dev/urandom
session.entropy_length => 32 => 32
session.gc_divisor => 1000 => 1000
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 1 => 1
session.hash_bits_per_character => 5 => 5
session.hash_function => 0 => 0
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => no value => no value
session.serialize_handler => php => php
session.upload_progress.cleanup => On => On
session.upload_progress.enabled => On => On
session.upload_progress.freq => 1% => 1%
session.upload_progress.min_freq => 1 => 1
session.upload_progress.name => PHP_SESSION_UPLOAD_PROGRESS => PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix => upload_progress_ => upload_progress_
session.use_cookies => On => On
session.use_only_cookies => On => On
session.use_trans_sid => 0 => 0

shmop

shmop support => enabled

SimpleXML

Simplexml support => enabled
Revision => $Id: 692516840b2d7d6e7aedb0bedded1f53b764a99f $
Schema support => enabled

snmp

NET-SNMP Support => enabled
NET-SNMP Version => 5.4.3
PHP SNMP Version => 0.1

soap

Soap Client => enabled
Soap Server => enabled

Directive => Local Value => Master Value
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400

sockets

Sockets Support => enabled

SPL

SPL support => enabled
Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

sqlite3

SQLite3 support => enabled
SQLite3 module version => 0.7
SQLite Library => 3.7.7.1

Directive => Local Value => Master Value
sqlite3.extension_dir => no value => no value

standard

Dynamic Library Support => enabled
Path to sendmail =>  -t -i 

Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 5 => 5
from => no value => no value
url_rewriter.tags => a=href,area=href,frame=src,input=src,form=fakeentry => a=href,area=href,frame=src,input=src,form=fakeentry
user_agent => no value => no value

sysvmsg

sysvmsg support => enabled
Revision => $Id: a57e25e6c32775fb53ad02fa294f63e934911815 $

tokenizer

Tokenizer Support => enabled

xml

XML Support => active
XML Namespace Support => active
libxml2 Version => 2.7.8

xmlreader

XMLReader => enabled

xmlwriter

XMLWriter => enabled

xsl

XSL => enabled
libxslt Version => 1.1.26
libxslt compiled against libxml Version => 2.7.8
EXSLT => enabled
libexslt Version => 1.1.26

zlib

ZLib Support => enabled
Stream Wrapper => compress.zlib://
Stream Filter => zlib.inflate, zlib.deflate
Compiled Version => 1.2.3.4
Linked Version => 1.2.3.4

Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value

Additional Modules

Module Name
sysvshm

Environment

Variable => Value
TERM => xterm
SHELL => /bin/bash
SSH_CLIENT => 192.168.1.105 59211 22
SSH_TTY => /dev/pts/1
USER => john
LS_COLORS => rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
MAIL => /var/mail/john
PATH => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
PWD => /media/teamwamer/framework/trunk/tests/event
LANG => en_US.UTF-8
SHLVL => 1
HOME => /home/john
LOGNAME => john
SSH_CONNECTION => 192.168.1.105 59211 192.168.1.130 22
LESSOPEN => | /usr/bin/lesspipe %s
LESSCLOSE => /usr/bin/lesspipe %s %s
OLDPWD => /media/teamwamer/framework/trunk/tests/libev
_ => /usr/bin/php

PHP Variables

Variable => Value
_SERVER["TERM"] => xterm
_SERVER["SHELL"] => /bin/bash
_SERVER["SSH_CLIENT"] => 192.168.1.105 59211 22
_SERVER["SSH_TTY"] => /dev/pts/1
_SERVER["USER"] => john
_SERVER["LS_COLORS"] => rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
_SERVER["MAIL"] => /var/mail/john
_SERVER["PATH"] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
_SERVER["PWD"] => /media/teamwamer/framework/trunk/tests/event
_SERVER["LANG"] => en_US.UTF-8
_SERVER["SHLVL"] => 1
_SERVER["HOME"] => /home/john
_SERVER["LOGNAME"] => john
_SERVER["SSH_CONNECTION"] => 192.168.1.105 59211 192.168.1.130 22
_SERVER["LESSOPEN"] => | /usr/bin/lesspipe %s
_SERVER["LESSCLOSE"] => /usr/bin/lesspipe %s %s
_SERVER["OLDPWD"] => /media/teamwamer/framework/trunk/tests/libev
_SERVER["_"] => /usr/bin/php
_SERVER["PHP_SELF"] => 
_SERVER["SCRIPT_NAME"] => 
_SERVER["SCRIPT_FILENAME"] => 
_SERVER["PATH_TRANSLATED"] => 
_SERVER["DOCUMENT_ROOT"] => 
_SERVER["REQUEST_TIME_FLOAT"] => 1373777000.1304
_SERVER["REQUEST_TIME"] => 1373777000
_SERVER["argv"] => Array
(
)

_SERVER["argc"] => 0

PHP License
This program is free software; you can redistribute it and/or modify
it under the terms of the PHP License as published by the PHP Group
and included in the distribution in the file:  LICENSE

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact license@php.net.


Generated backtrace as below:

Test script:
---------------
Used exact example from:
http://www.php.net/manual/en/event.examples.php
Example #8 Simple HTTP server

Actual result:
--------------
Attempting to test script generates a stack dump, gdb backtrace:
(gdb) run /media/teamwamer/framework/trunk/tests/event/simple_http.php
Starting program: /usr/bin/php /media/teamwamer/framework/trunk/tests/event/simple_http.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".


Program received signal SIGSEGV, Segmentation fault.
0x000000000078ed47 in zend_update_class_constants (class_type=0x1275ea0,
    tsrm_ls=0x0) at /tmp/php-5.4.17/Zend/zend_API.c:1063
1063                    zend_class_entry **scope = EG(in_execution)?&EG(scope):&CG(active_class_entry);
(gdb) bt
#0  0x000000000078ed47 in zend_update_class_constants (class_type=0x1275ea0,
    tsrm_ls=0x0) at /tmp/php-5.4.17/Zend/zend_API.c:1063
#1  0x000000000078f264 in _object_and_properties_init (arg=0x7ffff7fcd188,
    class_type=0x1275ea0, properties=0x0, tsrm_ls=0x0)
    at /tmp/php-5.4.17/Zend/zend_API.c:1159
#2  0x00007fffedc2d6fa in _http_default_callback (req=0x1373150,
    arg=<optimized out>) at /tmp/pear/temp/event/classes/http.c:123
#3  0x00007fffed7fb145 in ?? () from /usr/lib/libevent_extra-2.0.so.5
#4  0x00007fffed7fa271 in ?? () from /usr/lib/libevent_extra-2.0.so.5
#5  0x00007fffed5da7dd in ?? () from /usr/lib/libevent_core-2.0.so.5
#6  0x00007fffed5d02fc in event_base_loop ()
   from /usr/lib/libevent_core-2.0.so.5
#7  0x00007fffedc2719d in zim_EventBase_loop (ht=<optimized out>,
    return_value=0x7ffff7fcd0c8, return_value_ptr=<optimized out>,
    this_ptr=0x7ffff7fcefa0, return_value_used=<optimized out>,
    tsrm_ls=0xfc1510) at /tmp/pear/temp/event/classes/base.c:119
#8  0x0000000000841951 in zend_do_fcall_common_helper_SPEC (
    execute_data=<optimized out>, tsrm_ls=<optimized out>)
    at /tmp/php-5.4.17/Zend/zend_vm_execute.h:643
#9  0x00000000007f5c0d in execute (op_array=0x7ffff7fcb278, tsrm_ls=0xfc1510)
    at /tmp/php-5.4.17/Zend/zend_vm_execute.h:410
#10 0x000000000078cd7c in zend_execute_scripts (type=8, tsrm_ls=0xfc1510,
    retval=0x0, file_count=3) at /tmp/php-5.4.17/Zend/zend.c:1315
#11 0x000000000071fe19 in php_execute_script (primary_file=0x7fffffffd2c0,
    tsrm_ls=0xfc1510) at /tmp/php-5.4.17/main/main.c:2494
#12 0x0000000000844736 in do_cli (argc=2, argv=0x7fffffffe6b8,
    tsrm_ls=0xfc1510) at /tmp/php-5.4.17/sapi/cli/php_cli.c:988
#13 0x000000000043504e in main (argc=2, argv=0x7fffffffe6b8)
    at /tmp/php-5.4.17/sapi/cli/php_cli.c:1364

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-15 19:39 UTC] osmanov@php.net
You have libevent PECL extension installed, which conflicts with the event extension.
They won't work together! I have to mark it in the code :-/. Try to uninstall libevent extension and re-run the script.

If it doesn't fix the issue, please copy and paste output of the following commands:

$ arch
$ pecl list
$ dpkg --list | grep libevent
$ ls -l /usr/lib/libevent

For better GDB backtrace please re-install the event extension with --enable-event-debug flag, or enable debugging support during the PECL package installation.
 [2013-07-16 04:33 UTC] john dot wamer at wamersports dot com
Uninstalled event and libevent (pecl uninstall event libevent)

Reinstalled Event (pecl install event)
Enabled debugging this time

Attempted to run test script, segfault still occurred.

Here is the latest backtrace:
(gdb) run /media/teamwamer/framework/trunk/tests/event/simple_http.php
Starting program: /usr/bin/php /media/teamwamer/framework/trunk/tests/event/simple_http.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".


Program received signal SIGSEGV, Segmentation fault.
0x000000000078ed47 in zend_update_class_constants (class_type=0x12719d0,
    tsrm_ls=0x0) at /tmp/php-5.4.17/Zend/zend_API.c:1063
1063                    zend_class_entry **scope = EG(in_execution)?&EG(scope):&CG(active_class_entry);
(gdb) bt
#0  0x000000000078ed47 in zend_update_class_constants (class_type=0x12719d0,
    tsrm_ls=0x0) at /tmp/php-5.4.17/Zend/zend_API.c:1063
#1  0x000000000078f264 in _object_and_properties_init (arg=0x7ffff7fcd188,
    class_type=0x12719d0, properties=0x0, tsrm_ls=0x0)
    at /tmp/php-5.4.17/Zend/zend_API.c:1159
#2  0x00007fffee07cc30 in _http_default_callback (req=0x136b9f0,
    arg=0x7ffff7fcfca8) at /tmp/pear/temp/event/classes/http.c:123
#3  0x00007fffedc44145 in ?? () from /usr/lib/libevent_extra-2.0.so.5
#4  0x00007fffedc43271 in ?? () from /usr/lib/libevent_extra-2.0.so.5
#5  0x00007fffeda237dd in ?? () from /usr/lib/libevent_core-2.0.so.5
#6  0x00007fffeda192fc in event_base_loop ()
   from /usr/lib/libevent_core-2.0.so.5
#7  0x00007fffee0736d2 in zim_EventBase_loop (ht=0,
    return_value=0x7ffff7fcd0c8, return_value_ptr=0x0,
    this_ptr=0x7ffff7fcefa0, return_value_used=0, tsrm_ls=0xfc1510)
    at /tmp/pear/temp/event/classes/base.c:119
#8  0x0000000000841951 in zend_do_fcall_common_helper_SPEC (
    execute_data=<optimized out>, tsrm_ls=<optimized out>)
    at /tmp/php-5.4.17/Zend/zend_vm_execute.h:643
#9  0x00000000007f5c0d in execute (op_array=0x7ffff7fcb278, tsrm_ls=0xfc1510)
    at /tmp/php-5.4.17/Zend/zend_vm_execute.h:410
#10 0x000000000078cd7c in zend_execute_scripts (type=8, tsrm_ls=0xfc1510,
    retval=0x0, file_count=3) at /tmp/php-5.4.17/Zend/zend.c:1315
#11 0x000000000071fe19 in php_execute_script (primary_file=0x7fffffffd2c0,
    tsrm_ls=0xfc1510) at /tmp/php-5.4.17/main/main.c:2494
#12 0x0000000000844736 in do_cli (argc=2, argv=0x7fffffffe6b8,
    tsrm_ls=0xfc1510) at /tmp/php-5.4.17/sapi/cli/php_cli.c:988
#13 0x000000000043504e in main (argc=2, argv=0x7fffffffe6b8)
    at /tmp/php-5.4.17/sapi/cli/php_cli.c:1364

Here is the output from the requested commands:

1)arch
x86_64

2)pecl list
Installed packages, channel pecl.php.net:
=========================================
Package  Version State
event    1.6.1   stable
gearman  1.1.1   stable
mongo    1.4.1   stable
pthreads 0.0.44  beta
xdebug   2.2.3   stable

3)dpkg --list | grep libevent
ii  libevent-2.0-5                   2.0.16-stable-1            Asynchronous event notification library
ii  libevent-core-2.0-5              2.0.16-stable-1            Asynchronous event notification library (core)
ii  libevent-dev                     2.0.16-stable-1            Asynchronous event notification library (development files)
ii  libevent-extra-2.0-5             2.0.16-stable-1            Asynchronous event notification library (extra)
ii  libevent-openssl-2.0-5           2.0.16-stable-1            Asynchronous event notification library (openssl)
ii  libevent-pthreads-2.0-5          2.0.16-stable-1            Asynchronous event notification library (pthreads)

4)ls -l /usr/lib/libevent
NO such directory found
 [2013-07-17 15:25 UTC] osmanov@php.net
Can't reproduce, unfortunately.
 [2013-07-21 12:29 UTC] osmanov@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: osmanov
 [2013-07-21 12:29 UTC] osmanov@php.net
Sorry, unable to reproduce. There are some fixes in the latest release. Please 
try to upgrade.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 08 07:01:27 2024 UTC