apache / apache/brpc

brpc静态链接的so库,可执行程序调用没有问题,别的so调用会出现googleutexLock::MutexLock崩溃

Open
#3,052 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

**Describe the bug**
gdb)bt
8x8880088008880088
?? ()
0x00007fffe37449df/lib/libpgc sdf svs.soin othreag mutex0x00007fffe3a2fa8t/home/ns5000/lib/libpgc sdf svs.sogthreao mutns5000/lib/libpgc sdf_svs.so3x000日71Px::lock()/home/ns5000/lib/libpgc sdf svs.so()from /home/ns5000/lib/libpgc sdf svs.so3x666日7fffe3a5a22googleutexLock::MutexLock(google::protobuf::internal::WrappedMutex*)n/home/ns5000/lib/libpgc sdf svs.sox00007f599fgooglevoid const*)()fromconst*)9x00007ff5Ooy:"0rOTO:royString(std::string const*)()from /home/ns5000/lib/libpgc sdf svs.so0x00007fffe3a4f854google::protobuf/home/ns5000/lib/libpgc sdf svs.sofrom/home/ns5000/lib/libpgc sdf svs.so3x00007fffgoogle:::protobuffrom0x00007fffe3a506static initializat:/ns5000/lib/libpgc sdf svs.so0x00007fffe3a500bainGLOBAL sub I.00101 generated message util.cc/home/ns5000/lib/libpgc sdf svs.soentry=0x7fffffffdd38,env=env@entry=0x7fffffffdd48)at dl-init.c:780X0日日日7FFFf70call init (l=(env=0x7fffffffdd480x00007ffff7deacd3in.call initrgv=x7fffffffdd38I=)at dl-init.c:36dl init (main map=0x7ffff7ffe1b0, argc=1, argv=0x7fffffffdd38, env=0x7fffffffdd48) at dl-init.c:1260x00007ffff7ddd16aindl start user()from /lib64/1d-linux-x86-64.so.20x8000000000080001i0??C.”00x00007fffffffe17cin#18 0x000000000000800
#2
#1G
#11
#12
#13
#14
#15
#16
#17

**To Reproduce**

**Expected behavior**

**Versions**
OS:
Compiler:
brpc:
protobuf:

**Additional context/screenshots**

Contributor guide

Open the contributing guide

Research direction

The report only provides a gdb backtrace involving lib/libpgc_sdf_svs.so, google::protobuf::internal::WrappedMutex, and generated_message_util.cc during shared-library initialization. Start by reproducing the difference between calling the statically linked brpc library from an executable and from another shared object, then inspect the initialization path shown in the trace. Done means the crash is reproducible, its linkage or initialization cause is identified, and the affected shared-library case no longer crashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend, build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.