Skip to content

[PHP] Segmentation fault on arena.c #8786

Closed
@piotrantosik

Description

@piotrantosik

What version of protobuf and what language are you using?
Version: v3.17.3
Language: PHP c extension, PHP 8.0.8

What operating system (Linux, Windows, ...) and version?
Alpine 3.13

What did you do?

We receive randomly FPM sigserv, it's not depend on message
Core dump:

Core was generated by `php-fpm: pool app      '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f37a56d81f3 in Arena_Get (val=val@entry=0x7f37a7c92d58) at /tmp/pear/temp/protobuf/arena.c:72
72      /tmp/pear/temp/protobuf/arena.c: No such file or directory.
(gdb) bt
#0  0x00007f37a56d81f3 in Arena_Get (val=val@entry=0x7f37a7c92d58) at /tmp/pear/temp/protobuf/arena.c:72
#1  0x00007f37a56e368f in zim_Message___construct (execute_data=0x7f37a7c136a0, return_value=<optimized out>) at /tmp/pear/temp/protobuf/message.c:579
#2  0x00007f37a7a1ca96 in ?? () from /usr/local/lib/php/extensions/no-debug-non-zts-20200930/blackfire.so
#3  0x0000557a8258c465 in ?? ()
#4  0x0000557a828d980e in execute_ex ()
#5  0x00007f37a7a1d03c in ?? () from /usr/local/lib/php/extensions/no-debug-non-zts-20200930/blackfire.so
#6  0x00007f37a51de5b0 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1329
#7  0x0000557a8258c3f0 in ?? ()
#8  0x0000557a828d980e in execute_ex ()
#9  0x00007f37a7a1d03c in ?? () from /usr/local/lib/php/extensions/no-debug-non-zts-20200930/blackfire.so
#10 0x00007f37a51de5b0 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1329
#11 0x0000557a8258c69c in ?? ()
#12 0x0000557a828d980e in execute_ex ()
#13 0x00007f37a7a1d03c in ?? () from /usr/local/lib/php/extensions/no-debug-non-zts-20200930/blackfire.so
#14 0x00007f37a51de5b0 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1329
#15 0x0000557a8258c3f0 in ?? ()
#16 0x0000557a828d980e in execute_ex ()
#17 0x00007f37a7a1d03c in ?? () from /usr/local/lib/php/extensions/no-debug-non-zts-20200930/blackfire.so
#18 0x00007f37a51de5b0 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1329
#19 0x0000557a8258c3f0 in ?? ()
#20 0x0000557a828d980e in execute_ex ()
#21 0x00007f37a7a1d03c in ?? () from /usr/local/lib/php/extensions/no-debug-non-zts-20200930/blackfire.so
#22 0x00007f37a51de5b0 in nr_php_execute () at /home/hudson/workspace/php-release-agent/label/centos5-64-nrcamp/agent/php_execute.c:1329
#23 0x0000557a8258c3f0 in ?? ()
(gdb) frame 0
#0  0x00007f37a56d81f3 in Arena_Get (val=val@entry=0x7f37a7c95dd0) at /tmp/pear/temp/protobuf/arena.c:72
72      /tmp/pear/temp/protobuf/arena.c: No such file or directory.
(gdb) info frame
Stack level 0, frame at 0x7fff5a578ef0:
 rip = 0x7f37a56d81f3 in Arena_Get (/tmp/pear/temp/protobuf/arena.c:72); saved rip = 0x7f37a56e368f
 called by frame at 0x7fff5a578f40
 source language c.
 Arglist at 0x7fff5a578ee0, args: val=val@entry=0x7f37a7c95dd0
 Locals at 0x7fff5a578ee0, Previous frame's sp is 0x7fff5a578ef0
 Saved registers:
  rip at 0x7fff5a578ee8

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions