★ wanayoo — archive 1999 https://github.com/phpredis/phpredis/issues/237Nouvelle recherche | Portail wanayoo
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault after redis server Closing idle client #237

Closed
songerzhou opened this issue Aug 29, 2012 · 4 comments
Closed

Segmentation fault after redis server Closing idle client #237

songerzhou opened this issue Aug 29, 2012 · 4 comments
Labels

Comments

@songerzhou
Copy link

@songerzhou songerzhou commented Aug 29, 2012

redis server config timeout=60

here is the php code

pconnect('localhost', 6379); $conn->set("foo", "bar"); echo $conn->get("foo"); echo "\n"; sleep(120); echo $conn->get("foo"); echo "\n"; ?>

#0 _php_stream_set_option (stream=0x253e8e0, option=12, value=0, ptrparam=0x0) at /data/src/php-5.2.17/main/streams/streams.c:1165
#1 0x0000000000674166 in _php_stream_xport_create (name=0x2513858 "localhost:6379", namelen=14, options=4, flags=2,

persistent_id=0x25137b0 "phpredis:localhost:6379:0.000000", timeout=0x7fffcbf99fd0, context=0x0, error_string=0x7fffcbf9a070, error_code=0x7fffcbf9a08c)
at /data/src/php-5.2.17/main/streams/transports.c:79

#2 0x00007fc7e1d87f6c in redis_sock_connect (redis_sock=0x2513e88) at /data/src/nicolasff-phpredis-22f4555/library.c:888
#3 0x00007fc7e1d87999 in redis_check_eof (redis_sock=0x2513e88) at /data/src/nicolasff-phpredis-22f4555/library.c:59
#4 0x00007fc7e1d87d5f in redis_sock_write (redis_sock=0x2513e88, cmd=0x2513900 "*2\r\n$7\r\nHGETALL\r\n$3\r\nxxx\r\n", sz=26)

at /data/src/nicolasff-phpredis-22f4555/library.c:1218

#5 0x00007fc7e1d6e097 in generic_hash_command_1 (ht=, return_value=0x2513588, return_value_ptr=, this_ptr=,

return_value_used=<value optimized out>, keyword=0x7fc7e1d97604 "HGETALL", keyword_len=7) at /data/src/nicolasff-phpredis-22f4555/redis.c:4582

#6 0x00007fc7e1d81224 in zim_Redis_hGetAll (ht=1, return_value=0x2513588, return_value_ptr=0x0, this_ptr=0x2511fe0, return_value_used=1)

at /data/src/nicolasff-phpredis-22f4555/redis.c:4632

#7 0x00007fc7e2834377 in xdebug_execute_internal (current_execute_data=0x7fffcbf9a770, return_value_used=1) at /tmp/pear/temp/xdebug/xdebug.c:1483
#8 0x00000000006cd7d3 in zend_do_fcall_common_helper_SPEC (execute_data=0x7fffcbf9a770) at /data/src/php-5.2.17/Zend/zend_vm_execute.h:202
#9 0x00000000006ba23c in execute (op_array=0x2512808) at /data/src/php-5.2.17/Zend/zend_vm_execute.h:92
#10 0x00007fc7e2834859 in xdebug_execute (op_array=0x2512808) at /tmp/pear/temp/xdebug/xdebug.c:1391
#11 0x0000000000697a7a in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /data/src/php-5.2.17/Zend/zend.c:1134
#12 0x0000000000656cfb in php_execute_script (primary_file=0x7fffcbf9ce30) at /data/src/php-5.2.17/main/main.c:2036
#13 0x0000000000709223 in main (argc=2, argv=0x7fffcbf9d028) at /data/src/php-5.2.17/sapi/cli/php_cli.c:1165

@nicolasff
Copy link
Contributor

@nicolasff nicolasff commented Feb 17, 2013

I can't reproduce this issue with the latest master. @songerzhou, is this still an issue for you?

@AndLindemann
Copy link

@AndLindemann AndLindemann commented May 7, 2013

I seem to have a similar issue though I couldn't figure out if it is related to timeouts so far.
Also it seems to appear random, 2-3 times per day.
Since then I've lowered the timeout considerably for testing and that made the issue occur much more often.
This is with latest master (from May 06, 2013).

Here's a backtrace from a coredump that occurs:

Program terminated with signal 11, Segmentation fault.
#0 0x00000001004c2b98 in _php_stream_set_option ()
(gdb) bt
#0 0x00000001004c2b98 in _php_stream_set_option ()
#1 0x00000001004c15c4 in _php_stream_eof ()
#2 0xffffffff78544f24 in redis_check_eof () from ...php/extensions/no-debug-non-zts-20100525/redis.so
#3 0xffffffff7854d1d0 in redis_sock_write () from .../php/extensions/no-debug-non-zts-20100525/redis.so
#4 0xffffffff7850e15c in redis_generic_setex () from .../php/extensions/no-debug-non-zts-20100525/redis.so
#5 0xffffffff7850e6b4 in zim_Redis_setex () from .../php/extensions/no-debug-non-zts-20100525/redis.so
#6 0x00000001005b7ec0 in zend_do_fcall_common_helper_SPEC ()
#7 0x00000001005b8e90 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
#8 0x00000001005b64b8 in execute ()
#9 0x0000000100566d94 in zend_execute_scripts ()
#10 0x000000010049e998 in php_execute_script ()
#11 0x00000001006deb50 in main ()

@AndLindemann
Copy link

@AndLindemann AndLindemann commented May 14, 2013

Note: This seems to happen with persistent connections only.

@michael-grunder
Copy link
Member

@michael-grunder michael-grunder commented Apr 23, 2017

This issue is unlikely relevant to the current codebase. Please reopen if the issue persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.