protocolbuffers / protobuf

Protocol Buffers - Google's data interchange format
http://protobuf.dev
Other
65.28k stars 15.45k forks source link

coredump under the MIPS64 architecture #3532

Closed FZUPotato closed 2 months ago

FZUPotato commented 7 years ago

[15:52:04]GNU gdb 6.8 Cavium Networks Version: 2_0_0 build 95 [15:52:04]Copyright (C) 2008 Free Software Foundation, Inc. [15:52:04]License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html [15:52:04]This is free software: you are free to change and redistribute it. [15:52:04]There is NO WARRANTY, to the extent permitted by law. Type "show copying" [15:52:04]and "show warranty" for details. [15:52:04]This GDB was configured as "mips64-octeon-linux-gnu"... [15:52:05]Reading symbols from /lib64/libjemalloc.so...done. [15:52:05]Loaded symbols for /lib64/libjemalloc.so [15:52:05]Reading symbols from /lib64/libcrypt.so.1...done. [15:52:05]Loaded symbols for /lib64/libcrypt.so.1 [15:52:05]Reading symbols from /lib64/libpq.so.5...done. [15:52:05]Loaded symbols for /lib64/libpq.so.5 [15:52:05]Reading symbols from /lib64/librt.so.1...done. [15:52:05]Loaded symbols for /lib64/librt.so.1 [15:52:05]Reading symbols from /lib64/libiconv.so.2...done. [15:52:05]Loaded symbols for /lib64/libiconv.so.2 [15:52:05]Reading symbols from /lib64/libm.so.6...done. [15:52:05]Loaded symbols for /lib64/libm.so.6 [15:52:05]Reading symbols from /lib64/libxml2.so.2...done. [15:52:05]Loaded symbols for /lib64/libxml2.so.2 [15:52:05]Reading symbols from /lib64/libdl.so.2...done. [15:52:05]Loaded symbols for /lib64/libdl.so.2 [15:52:05]Reading symbols from /lib64/libc.so.6...done. [15:52:05]Loaded symbols for /lib64/libc.so.6 [15:52:06]Reading symbols from /lib64/libpthread.so.0...done. [15:52:06]Loaded symbols for /lib64/libpthread.so.0 [15:52:06]Reading symbols from /lib64/ld.so.1...done. [15:52:06]Loaded symbols for /lib64/ld.so.1 [15:52:06]Reading symbols from /lib64/libz.so.1...done. [15:52:06]Loaded symbols for /lib64/libz.so.1 [15:52:06]Reading symbols from /lib64/phpredis.so...done. [15:52:06]Loaded symbols for /lib64/phpredis.so [15:52:06]Reading symbols from /lib64/client.so...done. [15:52:06]Loaded symbols for /lib64/client.so [15:52:06]Reading symbols from /lib64/librg-thread.so...done. [15:52:06]Loaded symbols for /lib64/librg-thread.so [15:52:06]Reading symbols from /lib64/librg_syslog.so...done. [15:52:06]Loaded symbols for /lib64/librg_syslog.so [15:52:06]Reading symbols from /lib64/libhiredis.so...done. [15:52:06]Loaded symbols for /lib64/libhiredis.so [15:52:06]Reading symbols from /lib64/libredis.so...done. [15:52:06]Loaded symbols for /lib64/libredis.so [15:52:06]Reading symbols from /lib64/curl.so...done. [15:52:06]Loaded symbols for /lib64/curl.so [15:52:06]Reading symbols from /lib64/libcurl.so.4...done. [15:52:06]Loaded symbols for /lib64/libcurl.so.4 [15:52:06]Reading symbols from /lib64/libssl.so.0.9.8...done. [15:52:06]Loaded symbols for /lib64/libssl.so.0.9.8 [15:52:06]Reading symbols from /lib64/libcrypto.so.0.9.8...done. [15:52:06]Loaded symbols for /lib64/libcrypto.so.0.9.8 [15:52:06]Reading symbols from /lib64/protobuf.so...done. [15:52:06]Loaded symbols for /lib64/protobuf.so [15:52:06]Reading symbols from /lib64/libnss_compat.so.2...done. [15:52:06]Loaded symbols for /lib64/libnss_compat.so.2 [15:52:06]Reading symbols from /lib64/libnsl.so.1...done. [15:52:06]Loaded symbols for /lib64/libnsl.so.1 [15:52:06]Reading symbols from /lib64/libnss_nis.so.2...done. [15:52:06]Loaded symbols for /lib64/libnss_nis.so.2 [15:52:06]Reading symbols from /lib64/libnss_files.so.2...done. [15:52:06]Loaded symbols for /lib64/libnss_files.so.2 [15:52:06]Core was generated by `php-fpm: pool www '. [15:52:06]Program terminated with signal 10, Bus error. [15:52:06][New process 32302] [15:52:06]#0 dispatch (d=0x555f4f8a40) [15:52:06] at /php-5.6.31/ext/protobuf/upb.h:1264 [15:52:06]1264 /php-5.6.31/ext/protobuf/upb.h: No such file or directory. [15:52:06] in */php-5.6.31/ext/protobuf/upb.h 15:52:09 bt full [15:52:09]#0 dispatch (d=0x555f4f8a40) [15:52:09] at */php-5.6.31/ext/protobuf/upb.h:1264 [15:52:09] dispatch = (upb_inttable ) 0x5f4b0fb800000055 [15:52:09] tag = 10 [15:52:09] wire_type = 2 '\002' [15:52:09] fieldnum = 1 [15:52:09] val = {val = 0} [15:52:09]#1 0x000000555e6ed98c in run_decoder_vm (d=0x555f4f8a40, [15:52:09] group=, handle=0xffff9fbe00) [15:52:09] at */php-5.6.31/ext/protobuf/upb.c:10002 [15:52:09] shortofs = 10 '\n' [15:52:09] arg = 2048 [15:52:09]#2 0x000000555e6ee000 in upb_pbdecoder_decode (decoder=0x555f4f8a40, [15:52:09] group=0x555f462630, buf=, [15:52:09] size=, handle=0xffff9fbe00) [15:52:09] at /php-5.6.31/ext/protobuf/upb.c:10147 [15:52:09]No locals. [15:52:09]#3 0x000000555e6d4b10 in upb_bufsrc_putbuf ( [15:52:09] buf=0x555ec76c18 "\nN\n\021addressbook.proto\"1\n\006Person\022\f\n\004name\030\001 \001(\t\022\n\n\002id\030\002 \001(\005\022\r\n\005email\030\003 \001(\tb\006proto3", len=80, sink=0x555f4f8a48) [15:52:09] at /php-5.6.31/ext/protobuf/upb.h:6230 [15:52:09] subc = (void *) 0xa [15:52:09] ret = [15:52:09] handle = { [15:52:09] buf = 0x555ec76c18 "\nN\n\021addressbook.proto\"1\n\006Person\022\f\n\004name\030\001 \001(\t\022\n\n\002id\030\002 \001(\005\022\r\n\005email\030\003 \001(\tb\006proto3", obj = 0x0, objtype = 0x0, objofs = 0} [15:52:09]#4 0x000000555e6f0f64 in upb_loaddescriptor ( [15:52:09] buf=0x555ec76c18 "\nN\n\021addressbook.proto\"1\n\006Person\022\f\n\004name\030\001 \001(\t\022\n\n\002id\030\002 \001(\005\022\r\n\005email\030\003 \001(\tb\006proto3", n=80, owner=0xffff9fbf30, status=0xffff9fbf40) [15:52:09] at **/php-5.6.31/ext/protobuf/upb.c:10838 [15:52:09] decoder_m = (const upb_pbdecodermethod ) 0x555f4b0f00 [15:52:09] reader_h = (const upbhandlers *) 0x555ed86200 [15:52:09] env = {arena = {alloc = {func = 0x555e6d1940 }, [15:52:09] block_alloc = 0x555e70f230, bytes_allocated = 5568, [15:52:09] next_block_size = 14272, max_block_size = 16384, [15:52:09] block_head = 0x555f521800, cleanup_head = 0x555f4f8a20, [15:52:09] future1 = 0x120414388, future2 = 0xffff9fbf00}, [15:52:09] errorfunc = 0x555e6cccc8 , errorud = 0xffff9fbf40, [15:52:09] ok_ = true} [15:52:09] opts = {handlers = 0x555ed86200, lazy = false} [15:52:09] reader = [15:52:09] i = [15:52:09] ret = [15:52:09]#5 0x000000555e6bf494 in zim_DescriptorPool_internalAddGeneratedFile ( [15:52:09] ht=, return_value=, [15:52:09] return_value_ptr=, this_ptr=, [15:52:09] return_value_used=) [15:52:09] at */php-5.6.31/ext/protobuf/def.c:459 [15:52:09] status = {ok = true, code = 0, errorspace = 0x0, [15:52:09] msg = '\0' <repeats 127 times>} [15:52:09] data = 0x555ec76c18 "\nN\n\021addressbook.proto\"1\n\006Person\022\f\n\004name\030\001 \001(\t\022\n\n\002id\030\002 \001(\005\022\r\n\005email\030\003 \001(\tb\006proto3" [15:52:09] data_len = 80 [15:52:09] files = [15:52:09] i = [15:52:09] pool = (DescriptorPool *) 0x555ec7ae38 [15:52:09]#6 0x00000001204af290 in zend_do_fcall_common_helper_SPEC ( [15:52:09] execute_data=0x555ec43cb0) [15:52:09] at /php-5.6.31/Zend/zend_vm_execute.h:558 [15:52:09] ret = (temp_variable ) 0x555ec43b50 [15:52:09] opline = (zend_op ) 0x555ec7db80 [15:52:09] should_change_scope = 1 '\001' [15:52:09] fbc = (zend_function ) 0x555f48ff00 [15:52:09] num_args = 1 [15:52:09]#7 0x00000001204a34a8 in execute_ex (execute_data=0x555ec43cb0) [15:52:09] at **/php-5.6.31/Zend/zend_vm_execute.h:363 [15:52:09] original_in_execution = 0 '\0' [15:52:09]#8 0x0000000120406da0 in zend_execute_scripts (type=8, retval=0x0, [15:52:09] file_count=3) [15:52:09] at /php-5.6.31/Zend/zend.c:1341 [15:52:09] files = (va_list) 0xffff9fc238 [15:52:09] i = 1 [15:52:09] file_handle = (zend_file_handle ) 0xffff9fe5a0 [15:52:09] orig_op_array = (zend_op_array ) 0x0 [15:52:09] orig_retval_ptr_ptr = (zval **) 0x0 [15:52:09]#9 0x0000000120384f44 in php_execute_script (primary_file=0xffff9fe5a0) [15:52:09] at */php-5.6.31/main/main.c:2613 [15:52:09] realfile = "\000\000\000\000\000\000\000@\000\000\000\000\000\000\000@\000\000\000\000\000\000\000@\000\000\000\000\000\000\001繺000\000\000\000\000\000\001繺000\000\000\000\000\000\000\b\000\000\000\003\000\000\000\004\000\000\000\000\000\000礬b\000\000\000\000\000\000礬b\000\000\000\000\000\000礬b\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\020\000\000\000\000\000\000\000\b\000\000\000\001\000\000\000\005", '\0' <repeats 30 times>, "礬034\000\000\000\000\000\000礬034\000\000\000\000\000\001\000\000\000\000\000\001\000\000\000\006\000\000\000\000\000\000控\000\000\000\000\000\001控\000\000\000\000\000\001控\000\000\000\000\000\000\002p\000\000\000\000\000\000\005豛000\000\000\000\000\001\000\000\000\000\000\002"... [15:52:09] orig_bailout = (jmp_buf *) 0xffff9fe6c0 [15:52:09] bailout = {{jmpbuf = {{pc = 4835528084, sp = 1099505320528, [15:52:09] regs = {1099505329568, -1, -1, 4842064832, 8, 1099505339256, 0, [15:52:09] 4841935248}, fp = 1099505324640, gp = 4841969776, [15:52:09] fpc_csr = 0, fpregs = {1.8114735872792628e-312, [15:52:09] 1.8115262905413347e-312, 1.8114740407920004e-312, [15:52:09] 1.8114730918302332e-312, 0, 0, 1.8114739031255489e-312, [15:52:09] 1.8114740407920004e-312}}}, mask_was_saved = 0, __saved_mask = { [15:52:09] val = {366646235880, 0, 4096, 366665243392, 366661926176, [15:52:09] 1099505339248, 832, 9170820079774990592, 0, 844459289870337, 8416, [15:52:09] 64, 197080, 9262497088686522424, 2252074694213669, 25769803781}}}} [15:52:09] prepend_file_p = (zend_file_handle ) 0x0 [15:52:09] append_file_p = (zend_file_handle ) 0x0 [15:52:09] prepend_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0, [15:52:09] opened_path = 0x0, handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, [15:52:09] isatty = 0, mmap = {len = 0, pos = 0, map = 0x0, buf = 0x0, [15:52:09] old_handle = 0x0, old_closer = 0}, reader = 0, fsizer = 0, [15:52:09] closer = 0}}, free_filename = 0 '\0'} [15:52:09] append_file = {type = ZEND_HANDLE_FILENAME, filename = 0x0, [15:52:09] opened_path = 0x0, handle = {fd = 0, fp = 0x0, stream = {handle = 0x0, [15:52:09] isatty = 0, mmap = {len = 0, pos = 0, map = 0x0, buf = 0x0, [15:52:09] old_handle = 0x0, old_closer = 0}, reader = 0, fsizer = 0, [15:52:09] closer = 0}}, free_filename = 0 '\0'} [15:52:09] retval = [15:52:09]#10 0x00000001204eabd8 in main (argc=8, argv=0xffffa00b78) [15:52:09] at */php-5.6.31/sapi/fpm/fpm/fpm_main.c:1989 [15:52:09] primary_script = 0x555ec75b48 "/tmp/html/protobuf_test.php" [15:52:09] bailout = {{jmpbuf = {{pc = 4836993012, sp = 1099505329392, [15:52:09] regs = {0, 4841930752, -1, 4842061824, 8, 1099505339256, 0, [15:52:09] 4841935248}, fp = 4841832176, gp = 4841969776, fpc_csr = 85, [15:52:09] fpregs = {1.8114743018365251e-312, 0, 0, 1.8115295722686334e-312, [15:52:09] 1.8115295708852496e-312, 1.8115295715967041e-312, [15:52:09] 4.9406564584124654e-324, 1.8115295708457244e-312}}}, [15:52:09] mask_was_saved = 0, __saved_mask = {val = {0, 366661861424, 16384, [15:52:09] 366646671120, 0, 366646477448, 366661861376, 1, 1, 0, 640, [15:52:09] 366661877760, 128, 366646701600, 366657670400, 366646481680}}}} [15:52:09] exit_status = [15:52:09] c = [15:52:09] use_extended_info = 0 [15:52:09] file_handle = {type = ZEND_HANDLE_MAPPED, [15:52:09] filename = 0x555ec43460 "/tmp/html/protobuf_test.php", opened_path = 0x0, [15:52:09] handle = {fd = 85, fp = 0x555ec75d10, stream = {handle = 0x555ec75d10, [15:52:09] isatty = 0, mmap = {len = 741, pos = 0, map = 0x0, [15:52:09] buf = 0x555dd38000 <Address 0x555dd38000 out of bounds>, [15:52:09] old_handle = 0x0, old_closer = 0}, [15:52:09] reader = 0x1203a3a60 <_php_stream_read>, [15:52:09] fsizer = 0x120386868 , [15:52:09] closer = 0x120386820 }}, [15:52:09] free_filename = 0 '\0'} [15:52:09] orig_optind = 1 [15:52:09] orig_optarg = 0x0 [15:52:09] ini_entries_len = 0 [15:52:09] max_requests = 0 [15:52:09] requests = 0 [15:52:09] request = {listen_socket = 0, fd = 3, id = 1, keep = 0, closed = 0, [15:52:09] in_len = 0, in_pad = 0, out_hdr = 0x0, out_pos = 0xffff9fe950 "", [15:52:09] out_buf = '\0' <repeats 8191 times>, reserved = '\0' <repeats 15 times>, [15:52:09] env = 0x555ec42300} [15:52:09] fpm_config = 0xffffa03a67 "" [15:52:09] fpm_prefix = 0xffffa03aa0 "" [15:52:09] fpm_pid = 0x0 [15:52:09] test_conf = 0 [15:52:09] force_daemon = -1 [15:52:09] force_stderr = 0 [15:52:09] php_information = 0 [15:52:09] php_allow_to_run_as_root = 1 [15:52:09] func__ = "main" 15:52:13 q [15:52:17]/var/tmp/coredump # uname -m [15:52:17]mips64

FZUPotato commented 7 years ago

version:tag 3.3.0

liujisi commented 7 years ago

From the log, it seems it's the upb header missing when building php. @TeBoring would you like to take a look?

FZUPotato commented 7 years ago

i dont know why gdb prompt upd.h is no found.Actually upd.h is included while building php.it is coredump at line 1264 in udp.h(func upb_inttable_lookup32): UPB_INLINE bool upb_inttable_lookup32(const upb_inttable t, uint32_t key, upb_value v) { v = upb_value_int32(0); / Silence compiler warnings. / if (key < t->array_size) { ----------->here, t is point to a upb_inttable struct,but it's value from dispatch = (upb_inttable ) 0x5f4b0fb800000055(dispatch is a odd address,under the MIPS64 architecture, gdb will throw "BUS Error" and generate a coredump).

In my analysis, upd.h(Line:1264) upb_inttable_lookup32 t = dispatch; upd.c(Line:9789) int32_t dispatch upb_inttable dispatch = d->top->dispatch; upd.c(Line:9908) size_t run_decoder_vm memcpy(&d->top->dispatch, d->pc, sizeof(void));

d->pc is pointed to a static upb_fielddef.maybe a odd address?

liujisi commented 7 years ago

@haberman

TeBoring commented 6 years ago

Does the error still exist in 3.6.0 release?

github-actions[bot] commented 3 months ago

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

github-actions[bot] commented 2 months ago

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.

This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.