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

Occasional coredump occurred when using ParseFromString #13387

Closed
rong-lai opened this issue Jul 25, 2023 · 4 comments
Closed

Occasional coredump occurred when using ParseFromString #13387

rong-lai opened this issue Jul 25, 2023 · 4 comments
Labels
c++ inactive Denotes the issue/PR has not seen activity in the last 90 days. wait for user action

Comments

@rong-lai
Copy link

What version of protobuf and what language are you using?
Version: v3.13.0
Language: C++

What operating system (Linux, Windows, ...) and version?
ubuntu 18.04

What runtime / compiler are you using (e.g., python version or gcc version)
gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)

What did you do?
Steps to reproduce the behavior:

  1. Call ParseFromString in the program

What did you expect to see
Program runs normally

What did you see instead?
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x0000ffffa4807974 in __GI_abort () at abort.c:79
#2 0x0000ffffa4846a3c in __malloc_assert (assertion=assertion@entry=0xffffa48fd938 "(unsigned long) (size) >= (unsigned long) (nb)", file=file@entry=0xffffa48fcf80 "malloc.c", line=line@entry=4033,
function=function@entry=0xffffa48fdf48 <PRETTY_FUNCTION.14013> "_int_malloc") at malloc.c:298
#3 0x0000ffffa484a0b8 in _int_malloc (av=av@entry=0xffffa4927a70 <main_arena>, bytes=bytes@entry=8) at malloc.c:4033
#4 0x0000ffffa484b444 in __GI___libc_malloc (bytes=8) at malloc.c:3075
#5 0x0000ffffa49e252c in operator new(unsigned long) () from /usr/lib/aarch64-linux-gnu/libstdc++.so.6
#6 0x0000ffffa5cafdcc in void std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator >> >::_M_realloc_insert<std::__cxx11::basic_string<char, std::char_traits, std::allocator >* const&>(__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator >> > >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >* const&) () from /root/.tspkg/lib/libprotobuf.so.17
#7 0x0000ffffa5c91d40 in google::protobuf::DescriptorPool::Tables::AllocateString(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) ()
from /root/.tspkg/lib/libprotobuf.so.17
#8 0x0000ffffa5ca14c4 in google::protobuf::DescriptorBuilder::BuildFileImpl(google::protobuf::FileDescriptorProto const&) () from /root/.tspkg/lib/libprotobuf.so.17
#9 0x0000ffffa5ca2974 in google::protobuf::DescriptorBuilder::BuildFile(google::protobuf::FileDescriptorProto const&) () from /root/.tspkg/lib/libprotobuf.so.17
#10 0x0000ffffa5ca2d18 in google::protobuf::DescriptorPool::BuildFileFromDatabase(google::protobuf::FileDescriptorProto const&) const () from /root/.tspkg/lib/libprotobuf.so.17
#11 0x0000ffffa5ca2e88 in google::protobuf::DescriptorPool::TryFindFileInFallbackDatabase(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const ()
from /root/.tspkg/lib/libprotobuf.so.17
#12 0x0000ffffa5ca2fb0 in google::protobuf::DescriptorPool::FindFileByName(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const ()
from /root/.tspkg/lib/libprotobuf.so.17
#13 0x0000ffffa5d00bc8 in google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const
, google::protobuf::ServiceDescriptor const**) ()
from /root/.tspkg/lib/libprotobuf.so.17
#14 0x0000ffffa604cc78 in __pthread_once_slow (once_control=0xffffa5b6e9c8 <protobuf_basic_5fservice_5fconfig_2eproto::protobuf_AssignDescriptorsOnce()::once>, init_routine=0xffffa4a0bf40 <__once_proxy>)
at pthread_once.c:116
#15 0x0000ffffa5d330e8 in google::protobuf::TextFormat::Parser::Parse(google::protobuf::io::ZeroCopyInputStream*, google::protobuf::Message*) () from /root/.tspkg/lib/libprotobuf.so.17
#16 0x0000ffffa5d33284 in google::protobuf::TextFormat::Parser::ParseFromString(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, google::protobuf::Message*) ()
from /root/.tspkg/lib/libprotobuf.so.17

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

@rong-lai rong-lai added the untriaged auto added to all issues by default when created. label Jul 25, 2023
@zhangskz
Copy link
Member

Is this by chance on very large protos?

Unfortunately Protobuf 3.13.x is very old and no longer part of our official support window. Can you confirm if this issue is still present on a more recent branch (i.e. 3.21.x, 4.23.x)? per our Version Support policies?

@zhangskz zhangskz added c++ wait for user action and removed untriaged auto added to all issues by default when created. labels Jul 28, 2023
@rong-lai
Copy link
Author

rong-lai commented Aug 1, 2023

@zhangskz
Thanks for your reply.
The protos we used is not very large, it only has a few maps.
We will try updating protobuf.

Copy link

github-actions bot commented Nov 7, 2023

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 github-actions bot added the inactive Denotes the issue/PR has not seen activity in the last 90 days. label Nov 7, 2023
Copy link

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.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ inactive Denotes the issue/PR has not seen activity in the last 90 days. wait for user action
Projects
None yet
Development

No branches or pull requests

2 participants