Protobuf PHP compiled library segmentation faults

172 views
Skip to first unread message

TommyTek

unread,
Sep 19, 2022, 9:11:16 AM9/19/22
to Google Ads API and AdWords API Forum
Hello,
I've random segfaults when using protobuf php compiled extension.
Same issue with both PHP 7.4.29 and PHP 8.1.6 on
$ uname -a
Linux srv25.inartek.it 5.4.0-100-generic #113-Ubuntu SMP Thu Feb 3 18:43:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Core was generated by `/usr/local/php81debug/bin/php /home/sfinartek/domains/sf.inartek.it/cron/proces'.

Program terminated with signal SIGSEGV, Segmentation fault.

#0 0x0000561648c65d07 in _zend_is_inconsistent (ht=0x0, file=0x5616496c7238 "/usr/local/directadmin/custombuild/php-8.1.6/Zend/zend_hash.c", line=2469) at /usr/local/directadmin/custombuild/php-8.1.6/Zend/zend_hash.c:54

54 if ((HT_FLAGS(ht) & HASH_FLAG_CONSISTENCY) == HT_OK) {

[Current thread is 1 (Thread 0x7f3cb9586bc0 (LWP 3090694))]

(gdb) bt

#0 0x0000561648c65d07 in _zend_is_inconsistent (ht=0x0, file=0x5616496c7238 "/usr/local/directadmin/custombuild/php-8.1.6/Zend/zend_hash.c", line=2469) at /usr/local/directadmin/custombuild/php-8.1.6/Zend/zend_hash.c:54

#1 0x0000561648c6dd71 in zend_hash_get_current_data_ex (ht=0x0, pos=0x24) at /usr/local/directadmin/custombuild/php-8.1.6/Zend/zend_hash.c:2469

#2 0x0000561648a36502 in zif_current (execute_data=0x7f3cb9217190, return_value=0x7f3cb92170e0) at /usr/local/directadmin/custombuild/php-8.1.6/ext/standard/array.c:1184

#3 0x0000561648c8e616 in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER () at /usr/local/directadmin/custombuild/php-8.1.6/Zend/zend_vm_execute.h:1297

#4 0x0000561648d036db in execute_ex (ex=0x7f3cb9216020) at /usr/local/directadmin/custombuild/php-8.1.6/Zend/zend_vm_execute.h:55756

#5 0x0000561648d08f2f in zend_execute (op_array=0x7f3cb925f3c0, return_value=0x0) at /usr/local/directadmin/custombuild/php-8.1.6/Zend/zend_vm_execute.h:60123

#6 0x0000561648c51979 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/directadmin/custombuild/php-8.1.6/Zend/zend.c:1792

#7 0x0000561648bae644 in php_execute_script (primary_file=0x7ffc99f3f6b0) at /usr/local/directadmin/custombuild/php-8.1.6/main/main.c:2538

#8 0x0000561648dc5725 in do_cli (argc=4, argv=0x56164b7c19e0) at /usr/local/directadmin/custombuild/php-8.1.6/sapi/cli/php_cli.c:966

#9 0x0000561648dc6867 in main (argc=4, argv=0x56164b7c19e0) at /usr/local/directadmin/custombuild/php-8.1.6/sapi/cli/php_cli.c:1368

I can provide the coredump too (but it's > 200MB).


The segmentation faults only happen when using the compiled version of the library; if I include the library with Composer it's fine (but slow)

I opened the issue on the protocol buffer Forum, but they said it's an issue with Google APIs and not with their library:

https://github.com/protocolbuffers/protobuf/issues/10113


Do you have any advice?

This is happening with the most recent versions fo the libraries too.


Thank you


Google Ads API Forum Advisor

unread,
Sep 19, 2022, 10:36:29 AM9/19/22
to adcente...@gmail.com, adwor...@googlegroups.com
Hi Tommy,

Thank you for reaching out.

I would suggest referring to this document as it discusses all the processes on how to configure the PHP client library including about the protobuf PHP Extension that can be seen on this document.

Let me know if you have further questions.

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2eQPgf:ref

TommyTek

unread,
Sep 19, 2022, 10:43:02 AM9/19/22
to Google Ads API and AdWords API Forum
Hi Nirmita,
  thank you for your quick reaction.

The php compiled extension is compiled and installed properly.
I use:
pecl install protobuf
I can properly download reports, but every once in a while php crashes with a segmentation fault.

I'm not sure this was clear, the links that you kindly provided are meant for people installing it the first time, I guess.

Thank you

Google Ads API Forum Advisor

unread,
Sep 19, 2022, 1:33:55 PM9/19/22
to adcente...@gmail.com, adwor...@googlegroups.com

TommyTek

unread,
Sep 21, 2022, 12:38:50 PM9/21/22
to Google Ads API and AdWords API Forum
Hi Nirmita,
  thank you for your feedback.

Are you asking me to contact the team that has developed the Google Ads php client library?

Thank you

Google Ads API Forum Advisor

unread,
Sep 21, 2022, 2:17:43 PM9/21/22
to adcente...@gmail.com, adwor...@googlegroups.com
Hi Tommy,

Thank you for the reply.

Yes, You may reach out to the PHP client library owners via this link , as they are more equipped to provide guidance on this matter.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2eQPgf:ref

TommyTek

unread,
Sep 22, 2022, 2:26:01 AM9/22/22
to Google Ads API and AdWords API Forum
Hi Heidi,
  done, let's see.

Thank you!

Reply all
Reply to author
Forward
0 new messages