php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71710 Segmentation fault (core dumped) when work with amqp
Submitted: 2016-03-04 08:48 UTC Modified: 2021-06-10 15:37 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: seyferseed at mail dot ru Assigned: cmb (profile)
Status: Closed Package: amqp (PECL)
PHP Version: 5.6.19 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: seyferseed at mail dot ru
New email:
PHP Version: OS:

 

 [2016-03-04 08:48 UTC] seyferseed at mail dot ru
Description:
------------
When trying use this vendor for Zend Framework 2 for work with amqp 
https://github.com/prolic/HumusAmqpModule/

issue in module
https://github.com/prolic/HumusAmqpModule/issues/33

Spotted on different servers

one

php -v
PHP 5.6.18 (cli) (built: Feb  3 2016 12:50:09) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

two

php -v
PHP 5.6.18-1+deb.sury.org~wily+1 (cli) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Queues is registered in rabbit. Messages was added successful, but consumer fails.

Our command to run looks like this

/usr/bin/php /home/project/public/index.php humus amqp consumer reporting.history.cpm.consumer

strace output below

open("/home/project/vendor/prolic/humus-amqp-module/src/HumusAmqpModule/QueueFactoryInterface.php", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=1355, ...}) = 0
fstat(7, {st_mode=S_IFREG|0644, st_size=1355, ...}) = 0
fstat(7, {st_mode=S_IFREG|0644, st_size=1355, ...}) = 0
mmap(NULL, 1355, PROT_READ, MAP_SHARED, 7, 0) = 0x7f9bb8e92000
stat("/home/project/vendor/prolic/humus-amqp-module/src/HumusAmqpModule/QueueFactoryInterface.php", {st_mode=S_IFREG|0644, st_size=1355, ...}) = 0
fcntl(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = 0
fcntl(3, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=1}) = 0
munmap(0x7f9bb8e92000, 1355)            = 0
close(7)                                = 0
sendto(6, "\1\0\1\0\0\0!\0002\0\n\0\0\25reporting.history."..., 41, MSG_NOSIGNAL, NULL, 0) = 41
recvfrom(6, 0x2c672b0, 131072, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=6, events=POLLIN}], 1, -1)    = 1 ([{fd=6, revents=POLLIN}])
recvfrom(6, "\1\0\1\0\0\0\"\0002\0\v\25reporting.history.cp"..., 131072, 0, NULL, NULL) = 42
sendto(6, "\1\0\1\0\0\0004\0002\0\24\0\0\25reporting.history."..., 60, MSG_NOSIGNAL, NULL, 0) = 60
recvfrom(6, 0x2c672b0, 131072, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=6, events=POLLIN}], 1, -1)    = 1 ([{fd=6, revents=POLLIN}])
recvfrom(6, "\1\0\1\0\0\0\4\0002\0\25\316", 131072, 0, NULL, NULL) = 12
lstat("/home/project/vendor/prolic/humus-amqp-module/src/HumusAmqpModule/Consumer.php", {st_mode=S_IFREG|0644, st_size=11161, ...}) = 0
lstat("/home/project/vendor/prolic/humus-amqp-module/src/HumusAmqpModule", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/project/vendor/prolic/humus-amqp-module/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/project/vendor/prolic/humus-amqp-module", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/project/vendor/prolic", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/project/vendor/prolic/humus-amqp-module/src/HumusAmqpModule/Consumer.php", {st_mode=S_IFREG|0644, st_size=11161, ...}) = 0
lstat("/home/project/vendor/prolic/humus-amqp-module/src/HumusAmqpModule", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/project/vendor/prolic/humus-amqp-module/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/project/vendor/prolic/humus-amqp-module", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/project/vendor/prolic", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/home/project/vendor/prolic/humus-amqp-module/src/HumusAmqpModule/Consumer.php", O_RDONLY) = 7
fstat(7, {st_mode=S_IFREG|0644, st_size=11161, ...}) = 0
fstat(7, {st_mode=S_IFREG|0644, st_size=11161, ...}) = 0
fstat(7, {st_mode=S_IFREG|0644, st_size=11161, ...}) = 0
mmap(NULL, 11161, PROT_READ, MAP_SHARED, 7, 0) = 0x7f9ba072a000
stat("/home/project/vendor/prolic/humus-amqp-module/src/HumusAmqpModule/Consumer.php", {st_mode=S_IFREG|0644, st_size=11161, ...}) = 0
fcntl(3, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)

rabbit versions

one
RabbitMQ 3.5.6, Erlang R14B04

two
RabbitMQ 3.5.4, Erlang 18.0

There is my core dump

gdb /usr/bin/php /home/seyfer/core_dumps/core-php.4177
GNU gdb (Ubuntu 7.10-1ubuntu2) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.

warning: core file may not match specified executable file.
[New LWP 4177]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `php ./public/index.php humus amqp consumer reporting.history.cpm.consumer'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000006db444 in _zval_ptr_dtor ()



Actual result:
--------------
Core was generated by `php ./public/index.php humus amqp consumer reporting.history.cpm.consumer'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000006db444 in _zval_ptr_dtor ()

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-06-10 15:37 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-06-10 15:37 UTC] cmb@php.net
The amqp bug tracker is now on Github[1].  If this is still an
issue, please report there.

[1] <https://github.com/php-amqp/php-amqp/issues>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 06:01:30 2024 UTC