Bug 597835 - rpmbuild: double free or corruption
rpmbuild: double free or corruption
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-30 13:20 EDT by Pavel Alexeev
Modified: 2010-08-10 08:25 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-10 08:25:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test.spec (451 bytes, text/plain)
2010-05-30 13:20 EDT, Pavel Alexeev
no flags Details

  None (edit)
Description Pavel Alexeev 2010-05-30 13:20:01 EDT
Created attachment 418069 [details]
test.spec

Description of problem:
rpmbuild encountered "double free or corruption" error on %include directive in spec file.
I ask about it in devel list and receive answer what it should work ( http://www.mail-archive.com/devel@lists.fedoraproject.org/msg08187.html ).

Now I try it:
$ rpmbuild -ba test.spec 
*** glibc detected *** rpmbuild: double free or corruption (top): 0x09f34b08 ***
======= Backtrace: =========
/lib/libc.so.6[0x901261]
/usr/lib/librpmbuild.so.0(readLine+0xf3)[0xaf3763]
/usr/lib/librpmbuild.so.0(parsePrep+0x111)[0xaf13a1]
/usr/lib/librpmbuild.so.0(parseSpec+0x380)[0xaf32c0]
/usr/lib/librpmbuild.so.0(parseSpec+0x4d9)[0xaf3419]
rpmbuild[0x804a4ea]
rpmbuild[0x804ab29]
rpmbuild[0x804b851]
/lib/libc.so.6(__libc_start_main+0xe6)[0x8a9bb6]
rpmbuild[0x8049c41]
======= Memory map: ========
00110000-00148000 r-xp 00000000 08:12 327083     /lib/libsoftokn3.so
00148000-00149000 rw-p 00038000 08:12 327083     /lib/libsoftokn3.so
00149000-0018c000 r-xp 00000000 08:12 326861     /lib/libfreebl3.so
0018c000-0018d000 rw-p 00042000 08:12 326861     /lib/libfreebl3.so
0018d000-00191000 rw-p 00000000 00:00 0 
00351000-004bc000 r-xp 00000000 08:12 327568     /lib/libdb-4.7.so
004bc000-004bf000 rw-p 0016b000 08:12 327568     /lib/libdb-4.7.so
006ab000-006e2000 r-xp 00000000 08:12 327103     /lib/libnspr4.so
006e2000-006e3000 rw-p 00037000 08:12 327103     /lib/libnspr4.so
006e3000-006e5000 rw-p 00000000 00:00 0 
006e8000-0070a000 r-xp 00000000 08:12 309637     /usr/lib/liblzma.so.0.0.0
0070a000-0070b000 rw-p 00021000 08:12 309637     /usr/lib/liblzma.so.0.0.0
0070d000-0070f000 r-xp 00000000 08:12 327104     /lib/libplds4.so
0070f000-00710000 rw-p 00002000 08:12 327104     /lib/libplds4.so
00712000-00727000 r-xp 00000000 08:12 309866     /usr/lib/libelf-0.145.so
00727000-00728000 r--p 00014000 08:12 309866     /usr/lib/libelf-0.145.so
00728000-00729000 rw-p 00015000 08:12 309866     /usr/lib/libelf-0.145.so
0072b000-00753000 r-xp 00000000 08:12 847212     /usr/lib/librpmio.so.0.0.0
00753000-00755000 rw-p 00028000 08:12 847212     /usr/lib/librpmio.so.0.0.0
00755000-00757000 rw-p 00000000 00:00 0 
007e2000-007e6000 r-xp 00000000 08:12 327105     /lib/libplc4.so
007e6000-007e7000 rw-p 00003000 08:12 327105     /lib/libplc4.so
0083e000-00842000 r-xp 00000000 08:12 326854     /lib/libattr.so.1.1.0
00842000-00843000 rw-p 00003000 08:12 326854     /lib/libattr.so.1.1.0
00852000-00856000 r-xp 00000000 08:12 1075078    /lib/libcap.so.2.16
00856000-00857000 rw-p 00003000 08:12 1075078    /lib/libcap.so.2.16
0086d000-0088b000 r-xp 00000000 08:12 325921     /lib/ld-2.11.so
0088b000-0088c000 r--p 0001d000 08:12 325921     /lib/ld-2.11.so
0088c000-0088d000 rw-p 0001e000 08:12 325921     /lib/ld-2.11.so
00893000-00a01000 r-xp 00000000 08:12 325934     /lib/libc-2.11.so
00a01000-00a02000 ---p 0016e000 08:12 325934     /lib/libc-2.11.so
00a02000-00a04000 r--p 0016e000 08:12 325934     /lib/libc-2.11.so
00a04000-00a05000 rw-p 00170000 08:12 325934     /lib/libc-2.11.so
00a05000-00a08000 rw-p 00000000 00:00 0 
00a0a000-00a32000 r-xp 00000000 08:12 1075069    /lib/libm-2.11.so
00a32000-00a33000 r--p 00027000 08:12 1075069    /lib/libm-2.11.so
00a33000-00a34000 rw-p 00028000 08:12 1075069    /lib/libm-2.11.so
00a36000-00a39000 r-xp 00000000 08:12 326060     /lib/libdl-2.11.so
00a39000-00a3a000 r--p 00002000 08:12 326060     /lib/libdl-2.11.so
00a3a000-00a3b000 rw-p 00003000 08:12 326060     /lib/libdl-2.11.so
00a3d000-00a53000 r-xp 00000000 08:12 326152     /lib/libpthread-2.11.so
00a53000-00a54000 r--p 00015000 08:12 326152     /lib/libpthread-2.11.so
00a54000-00a55000 rw-p 00016000 08:12 326152     /lib/libpthread-2.11.so
00a55000-00a57000 rw-p 00000000 00:00 0 
00a59000-00a6b000 r-xp 00000000 08:12 1075068    /lib/libz.so.1.2.3
00a6b000-00a6c000 rw-p 00011000 08:12 1075068    /lib/libz.so.1.2.3
00a6e000-00ad5000 r-xp 00000000 08:12 309517     /usr/lib/librpm.so.0.0.0
00ad5000-00ad9000 rw-p 00067000 08:12 309517     /usr/lib/librpm.so.0.0.0
00ad9000-00ada000 rw-p 00000000 00:00 0 
00adc000-00aff000 r-xp 00000000 08:12 312570     /usr/lib/librpmbuild.so.0.0.0
00aff000-00b02000 rw-p 00022000 08:12 312570     /usr/lib/librpmbuild.so.0.0.0
00b02000-00b06000 rw-p 00000000 00:00 0 
00b74000-00b75000 r-xp 00000000 00:00 0          [vdso]
00bd4000-00bf0000 r-xp 00000000 08:12 328768     /lib/libselinux.so.1
00bf0000-00bf1000 r--p 0001b000 08:12 328768     /lib/libselinux.so.1
00bf1000-00bf2000 rw-p 0001c000 08:12 328768     /lib/libselinux.so.1
00bf4000-00bfb000 r-xp 00000000 08:12 1075082    /lib/librt-2.11.so
00bfb000-00bfc000 r--p 00006000 08:12 1075082    /lib/librt-2.11.so
00bfc000-00bfd000 rw-p 00007000 08:12 1075082    /lib/librt-2.11.so
00bff000-00c29000 r-xp 00000000 08:12 313249     /usr/lib/liblua-5.1.so
00c29000-00c2a000 rw-p 00029000 08:12 313249     /usr/lib/liblua-5.1.so
00cd2000-00cec000 r-xp 00000000 08:12 312805     /usr/lib/libmagic.so.1.0.0
00cec000-00ced000 rw-p 0001a000 08:12 312805     /usr/lib/libmagic.so.1.0.0
00d23000-00d39000 r-xp 00000000 08:12 326086     /lib/libnssutil3.so
00d39000-00d3c000 rw-p 00016000 08:12 326086     /lib/libnssutil3.so
00d52000-00d7c000 r-xp 00000000 08:12 326321     /lib/libgcc_s-4.4.1-20090729.so.1
00d7c000-00d7d000 rw-p 00029000 08:12 326321     /lib/libgcc_s-4.4.1-20090729.so.1
00db9000-00dc0000 r-xp 00000000 08:12 327876     /lib/libacl.so.1.1.0
00dc0000-00dc1000 rw-p 00006000 08:12 327876     /lib/libacl.so.1.1.0
02000000-02089000 r-xp 00000000 08:12 310956     /usr/lib/libsqlite3.so.0.8.6
02089000-0208b000 rw-p 00089000 08:12 310956     /usr/lib/libsqlite3.so.0.8.6
04d19000-04d21000 r-xp 00000000 08:12 1075067    /lib/libpopt.so.0.0.0
04d21000-04d22000 rw-p 00007000 08:12 1075067    /lib/libpopt.so.0.0.0
04dc5000-04dd5000 r-xp 00000000 08:12 328717     /lib/libbz2.so.1.0.4
04dd5000-04dd6000 rw-p 00010000 08:12 328717     /lib/libbz2.so.1.0.4
07393000-074b9000 r-xp 00000000 08:12 327525     /lib/libnss3.so
074b9000-074bd000 rw-p 00125000 08:12 327525     /lib/libnss3.so
074bd000-074be000 rw-p 00000000 00:00 0 
08048000-0804d000 r-xp 00000000 08:12 229586     /usr/bin/rpmbuild
0804d000-0804f000 rw-p 00004000 08:12 229586     /usr/bin/rpmbuild
09edb000-09f55000 rw-p 00000000 00:00 0          [heap]
b74a9000-b74ad000 rw-p 00000000 00:00 0 
b74ad000-b7519000 r--s 00000000 08:12 1046410    /var/db/nscd/hosts
b7519000-b7719000 r--p 00000000 08:12 82383      /usr/lib/locale/locale-archive
b7719000-b7720000 rw-p 00000000 00:00 0 
b7734000-b773b000 r--s 00000000 08:12 912488     /usr/lib/gconv/gconv-modules.cache
b773b000-b773c000 rw-p 00000000 00:00 0 
bfb00000-bfb15000 rw-p 00000000 00:00 0          [stack]


Version-Release number of selected component (if applicable):
$ rpm -q rpm-build
rpm-build-4.8.0-14.fc13.i686

How reproducible:
Always

Included source file test.macros contain:
%define testmacros() %{expand:%( \
echo TEST; \
)}

test.spec also trivial as possible, I'll attach it.
Comment 1 Panu Matilainen 2010-05-31 02:17:24 EDT
Doesn't happen to crash for me but valgrind complains loudly, apparently the same issue as https://bugzilla.novell.com/show_bug.cgi?id=582599 and was already fixed upstream. Should be fixed in rawhide now, F13 update to follow.
Comment 2 Pavel Alexeev 2010-05-31 03:59:05 EDT
No, rawhide version also reproduce it:
$ rpm -q rpm-build
rpm-build-4.8.0-16.fc14.i686
Comment 3 Panu Matilainen 2010-05-31 07:20:58 EDT
"In rawhide now" means it's been built for rawhide and will be available in the next rawhide push (whenever that happens and gets synced around to mirrors is a whole another story). So to be more precise: should be fixed in rpm-4.8.0-17.fc14
Comment 4 Pavel Alexeev 2010-05-31 07:32:59 EDT
Ok, wait it to test.

It there now any workaround? How quickly it will reach the buiulders (including El-5 and El-6)? I want use %include in my packaging work for Fedora and epel.
Comment 5 Fedora Update System 2010-06-11 07:49:23 EDT
rpm-4.8.1-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/rpm-4.8.1-1.fc13
Comment 6 Pavel Alexeev 2010-06-12 11:34:55 EDT
Yes, now it is not crashed, thank you.

But still macros inclusion seams not working as well ( http://www.mail-archive.com/devel@lists.fedoraproject.org/msg09006.html )
Comment 7 Fedora Update System 2010-07-07 13:42:42 EDT
rpm-4.8.1-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.