Bug 2485653

Summary: valgrind reports memory leaks in protobuf after update to version 6.33.5
Product: [Fedora] Fedora Reporter: Mattias Ellert <mattias.ellert>
Component: protobufAssignee: Michel Lind <michel>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 45CC: adrian, code, igor.raits, jonathan, michel, mizdebsk, orion, sander
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2341815    

Description Mattias Ellert 2026-06-06 07:38:31 UTC
Empty main program:

$ cat main.cxx 
int main() {}

On fedora 44:

$ rpm -q protobuf-devel
protobuf-devel-3.19.6-20.fc44.x86_64

$ g++ -o main-44 main.cxx -lprotobuf

$ valgrind --leak-check=full --error-exitcode=1 ./main-44 
==85529== Memcheck, a memory error detector
==85529== Copyright (C) 2002-2026, and GNU GPL'd, by Julian Seward et al.
==85529== Using Valgrind-3.27.1 and LibVEX; rerun with -h for copyright info
==85529== Command: ./main-44
==85529== 
==85529== 
==85529== HEAP SUMMARY:
==85529==     in use at exit: 6,780 bytes in 101 blocks
==85529==   total heap usage: 1,459 allocs, 1,358 frees, 155,741 bytes allocated
==85529== 
==85529== LEAK SUMMARY:
==85529==    definitely lost: 0 bytes in 0 blocks
==85529==    indirectly lost: 0 bytes in 0 blocks
==85529==      possibly lost: 0 bytes in 0 blocks
==85529==    still reachable: 6,780 bytes in 101 blocks
==85529==         suppressed: 0 bytes in 0 blocks
==85529== Reachable blocks (those to which a pointer was found) are not shown.
==85529== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==85529== 
==85529== For lists of detected and suppressed errors, rerun with: -s
==85529== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

$ echo $?
0

On fedora 45 (rawhide):

# rpm -q protobuf-devel
protobuf-devel-6.33.5-4.fc45.x86_64

# g++ -o main-45 main.cxx -lprotobuf

# valgrind --leak-check=full --error-exitcode=1 ./main-45 
==225== Memcheck, a memory error detector
==225== Copyright (C) 2002-2026, and GNU GPL'd, by Julian Seward et al.
==225== Using Valgrind-3.27.1 and LibVEX; rerun with -h for copyright info
==225== Command: ./main-45
==225== 
==225== 
==225== HEAP SUMMARY:
==225==     in use at exit: 6,402 bytes in 47 blocks
==225==   total heap usage: 665 allocs, 618 frees, 115,811 bytes allocated
==225== 
==225== 414 bytes in 16 blocks are possibly lost in loss record 28 of 31
==225==    at 0x484CFAC: operator new(unsigned long) (vg_replace_malloc.c:501)
==225==    by 0x4A77F5E: ??? (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x4AB30AE: google::protobuf::DescriptorPool::Tables::Tables() (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x4ABA907: google::protobuf::DescriptorPool::DescriptorPool(google::protobuf::DescriptorDatabase*, google::protobuf::DescriptorPool::ErrorCollector*) (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x4ABB6AA: google::protobuf::DescriptorPool::internal_generated_pool() (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x4ABB768: google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const*, int) (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x4B86BBE: google::protobuf::internal::AddDescriptors(google::protobuf::internal::DescriptorTable const*) (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x4A75413: ??? (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x401222E: call_init (dl-init.c:74)
==225==    by 0x401222E: call_init (dl-init.c:26)
==225==    by 0x401230C: _dl_init (dl-init.c:121)
==225==    by 0x402D09F: ??? (in /usr/lib64/ld-linux-x86-64.so.2)
==225== 
==225== 1,296 bytes in 1 blocks are possibly lost in loss record 31 of 31
==225==    at 0x484CFAC: operator new(unsigned long) (vg_replace_malloc.c:501)
==225==    by 0x52F7407: ??? (in /usr/lib64/libabsl_raw_hash_set.so.2601.0.0)
==225==    by 0x52F7593: ??? (in /usr/lib64/libabsl_raw_hash_set.so.2601.0.0)
==225==    by 0x4AB3604: google::protobuf::DescriptorPool::Tables::Tables() (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x4ABA907: google::protobuf::DescriptorPool::DescriptorPool(google::protobuf::DescriptorDatabase*, google::protobuf::DescriptorPool::ErrorCollector*) (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x4ABB6AA: google::protobuf::DescriptorPool::internal_generated_pool() (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x4ABB768: google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const*, int) (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x4B86BBE: google::protobuf::internal::AddDescriptors(google::protobuf::internal::DescriptorTable const*) (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x4A75413: ??? (in /usr/lib64/libprotobuf.so.33.5.0)
==225==    by 0x401222E: call_init (dl-init.c:74)
==225==    by 0x401222E: call_init (dl-init.c:26)
==225==    by 0x401230C: _dl_init (dl-init.c:121)
==225==    by 0x402D09F: ??? (in /usr/lib64/ld-linux-x86-64.so.2)
==225== 
==225== LEAK SUMMARY:
==225==    definitely lost: 0 bytes in 0 blocks
==225==    indirectly lost: 0 bytes in 0 blocks
==225==      possibly lost: 1,710 bytes in 17 blocks
==225==    still reachable: 4,692 bytes in 30 blocks
==225==                       of which reachable via heuristic:
==225==                         newarray           : 160 bytes in 1 blocks
==225==         suppressed: 0 bytes in 0 blocks
==225== Reachable blocks (those to which a pointer was found) are not shown.
==225== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==225== 
==225== For lists of detected and suppressed errors, rerun with: -s
==225== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)

# echo $?
1


Reproducible: Always

Steps to Reproduce:
1. See above
Actual Results:
valgrind reports memory leaks.

Expected Results:
valgrind reports no memory leaks.

Additional Information:
This causes FTBFS failures for the HepMC3 package because the memory leak check fails.
https://koschei.fedoraproject.org/package/HepMC3?collection=f45

Comment 1 Aoife Moloney 2026-08-17 14:46:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 45 development cycle.
Changing version to 45.