[Pkg-clamav-devel] [mt at debian.org: [ia64] __gconv_find_shlib called with invalid arguments]

Michael Tautschnig mt at debian.org
Sat Mar 28 13:23:35 UTC 2009


Err, sorry, wrong list name.

----- Forwarded message from Michael Tautschnig <mt at debian.org> -----

Date: Sat, 28 Mar 2009 14:18:47 +0100
From: Michael Tautschnig <mt at debian.org>
To: bugs at debian.org
Cc: pkg-clamav-devel at lists.debian.org
Subject: [ia64] __gconv_find_shlib called with invalid arguments
User-Agent: Mutt/1.5.19 (2009-01-05)

Package: libc6.1
Version: 2.9-6

In clamav 0.95+dfsg-1 we enabled the test suite to be run at build time. This
includes tests using electric-fence, which showed a segmentation fault:

/home/mt/clamav-0.95+dfsg/unit_tests/check_clamscan.sh: line 25: 26553 Bus error               ../libtool --mode=execute $CLAMSCAN_WRAPPER ../clamscan/clamscan --quiet -dtest-db/test.hdb ../test/clam* --log=clamscan.log

Debugging this one on merulo.d.o yields:

======================== GDB snippet 1 BEGIN ===================================

(sid)mt at merulo:~/clamav-0.95+dfsg/unit_tests$ LD_LIBRARY_PATH=/usr/lib/debug/:../libclamav/.libs/ gdb --args ../clamscan/.libs/clamscan --quiet -dtest-db/test.hdb ../test/clam* --log=clamscan.log
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "ia64-linux-gnu"...
(gdb) set environment LD_PRELOAD /usr/lib/libefence.so
(gdb) run
Starting program: /home/mt/clamav-0.95+dfsg/clamscan/.libs/clamscan --quiet -dtest-db/test.hdb ../test/clam.arj ../test/clam-aspack.exe ../test/clam.bz2.zip ../test/clam.cab ../test/clam.chm ../test/clam.d64.zip ../test/clam.ea05.exe ../test/clam.ea06.exe ../test/clam.exe ../test/clam.exe.binhex ../test/clam.exe.bz2 ../test/clam.exe.html ../test/clam.exe.mbox.base64 ../test/clam.exe.mbox.uu ../test/clam.exe.rtf ../test/clam.exe.szdd ../test/clam-fsg.exe ../test/clam.impl.zip ../test/clam.mail ../test/clam-mew.exe ../test/clam-nsis.exe ../test/clam.ole.doc ../test/clam.pdf ../test/clam-pespin.exe ../test/clam-petite.exe ../test/clam.ppt ../test/clam.sis ../test/clam.tar.gz ../test/clam.tnef ../test/clam-upack.exe ../test/clam-upx.exe ../test/clam-v2.rar ../test/clam-v3.rar ../test/clam-wwpack.exe ../test/clam.zip --log=clamscan.log
[Thread debugging using libthread_db enabled]

  Electric Fence 2.1 Copyright (C) 1987-1998 Bruce Perens.
clamscan(27181): unaligned access to 0x2000000000ff3fb4, ip=0x200000000035a6c0
clamscan(27181): unaligned access to 0x2000000000ff3fc4, ip=0x200000000035a6c1
clamscan(27181): unaligned access to 0x2000000000ff3fc4, ip=0x200000000035a401
clamscan(27181): unaligned access to 0x2000000000ff3fb4, ip=0x200000000035a450
[New Thread 0x200000000058c000 (LWP 27181)]
clamscan(27181): unaligned access to 0x2000000000d73b84, ip=0x2000000000016a71

Program received signal SIGBUS, Bus error.
[Switching to Thread 0x200000000058c000 (LWP 27181)]
0x200000000002e390 in _dl_make_fptr (map=0x2000000000d73b5c, sym=0x2000000001508240, ip=2305843009235748800) at dl-fptr.c:194
194 dl-fptr.c: No such file or directory.
  in dl-fptr.c
(gdb) where
#0  0x200000000002e390 in _dl_make_fptr (map=0x2000000000d73b5c, sym=0x2000000001508240, ip=2305843009235748800) at dl-fptr.c:194
#1  0x20000000000188a0 in _dl_relocate_object (scope=0x2000000000d73ebc, lazy=<value optimized out>, consider_profiling=0) at ../sysdeps/ia64/dl-machine.h:432
#2  0x20000000000274f0 in dl_open_worker (a=0x60000fffff89acc8) at dl-open.c:404
#3  0x200000000001d160 in _dl_catch_error (objname=0xa023381e008811, errstring=Cannot access memory at address 0x47f
) at dl-error.c:178
#4  0x2000000000026050 in _dl_open (file=0x2000000000ff3fe4 "/usr/lib/gconv/UTF-16.so", mode=-2147483647, caller_dlopen=0x0, nsid=-2, argc=39, argv=0x60000fffff89f278, 
    env=0x60000fffff89f3b8) at dl-open.c:596
#5  0x200000000052e480 in do_dlopen (ptr=<value optimized out>) at dl-libc.c:86
#6  0x200000000001d160 in _dl_catch_error (objname=0xa023381e008811, errstring=Cannot access memory at address 0x47f
) at dl-error.c:178
#7  0x200000000052e640 in dlerror_run (operate=0x2000000000049f40 <local+6376>, args=0x60000fffff89b060) at dl-libc.c:47
#8  0x200000000052e810 in *__GI___libc_dlopen_mode (name=0x2000000000ff3fe4 "/usr/lib/gconv/UTF-16.so", mode=-2147483647) at dl-libc.c:160
#9  0x200000000035a470 in __gconv_find_shlib (name=0xa023381e008811 <Address 0xa023381e008811 out of bounds>) at gconv_dl.c:118
#10 0x20000000003590a0 in find_module (directory=0x2000000001502d56 "/usr/lib/gconv/", filename=0x2000000001503334 "UTF-16.so", result=0x2000000000febf30) at gconv_cache.c:196
#11 0x2000000000359550 in __gconv_lookup_cache (toset=<value optimized out>, fromset=<value optimized out>, handle=0x60000fffff89b0e0, nsteps=0x60000fffff89b0e8, flags=0)
    at gconv_cache.c:395
#12 0x2000000000348fb0 in __gconv_find_transform (toset=0x60000fffff89b120 "UTF-16BE//", fromset=0x60000fffff89b100 "UTF-16LE//", handle=0x60000fffff89b0e0, nsteps=0x60000fffff89b0e8, 
    flags=0) at gconv_db.c:729
#13 0x2000000000345b60 in __gconv_open (toset=0x60000fffff89b120 "UTF-16BE//", fromset=0x60000fffff89b100 "UTF-16LE//", handle=0x60000fffff89b140, flags=0) at gconv_open.c:174
#14 0x2000000000345090 in iconv_open (tocode=0x200000000019b5d0 "UTF-16BE", fromcode=0x2000000000db3ff4 "UTF-16LE") at iconv_open.c:72
#15 0x2000000000169c10 in encoding_normalize_toascii (in_m_area=0x60000fffff89b248, initial_encoding=0x200000000019b5e0 "UTF-16LE", out_m_area=0x60000fffff89b260) at entconv.c:680
#16 0x20000000000b1a70 in cli_filetype2 (desc=7, engine=0x2000000000d43f40) at filetypes.c:211
#17 0x20000000000a62b0 in cli_magic_scandesc (desc=7, ctx=0x60000fffff89c990) at scanners.c:1895
#18 0x2000000000124200 in ea05 (desc=6, ctx=0x60000fffff89c990, tmpd=0x2000000000dabfd0 "/tmp/clamav-8c75bd636466d470f366b5dbc17f0fd2") at autoit.c:375
#19 0x2000000000127d20 in cli_scanautoit (desc=6, ctx=0x60000fffff89c990, offset=<value optimized out>) at autoit.c:927
#20 0x20000000000affd0 in cli_scanraw (desc=6, ctx=0x60000fffff89c990, type=CL_TYPE_MSEXE, typercg=<value optimized out>, dettype=0x60000fffff89c6e0) at scanners.c:1773
#21 0x20000000000a68a0 in cli_magic_scandesc (desc=6, ctx=0x60000fffff89c990) at scanners.c:2083
#22 0x20000000000a9d30 in cl_scandesc (desc=6, virname=0x60000fffff89c9d0, scanned=0x600000000000cfa8, engine=0x2000000000d43f40, scanoptions=25143) at scanners.c:2135
#23 0x400000000000cc40 in scanfile (filename=0x2000000000d5bfe8 "../test/clam.ea05.exe", engine=0x2000000000d43f40, opts=0x20000000005bffb8, options=25143) at manager.c:150
#24 0x400000000000f340 in scanmanager (opts=0x20000000005bffb8) at manager.c:620
#25 0x400000000000b680 in main (argc=<value optimized out>, argv=0x60000fffff89f278) at clamscan.c:172
(gdb) quit

======================== GDB snippet 1 END =====================================

To track down those unaligned memory accesses, I did prctl --unaligned=signal
and got (not that unexpected, because the listing above already shows
out-of-bounds warnings):

======================== GDB snippet 2 BEGIN ===================================

(sid)mt at merulo:~/clamav-0.95+dfsg/unit_tests$ LD_LIBRARY_PATH=/usr/lib/debug/:../libclamav/.libs/ gdb --args ../clamscan/.libs/clamscan --quiet -dtest-db/test.hdb ../test/clam* --log=clamscan.log
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "ia64-linux-gnu"...
(gdb) 
(gdb) set environment LD_PRELOAD /usr/lib/libefence.so
(gdb) run
Starting program: /home/mt/clamav-0.95+dfsg/clamscan/.libs/clamscan --quiet -dtest-db/test.hdb ../test/clam.arj ../test/clam-aspack.exe ../test/clam.bz2.zip ../test/clam.cab ../test/clam.chm ../test/clam.d64.zip ../test/clam.ea05.exe ../test/clam.ea06.exe ../test/clam.exe ../test/clam.exe.binhex ../test/clam.exe.bz2 ../test/clam.exe.html ../test/clam.exe.mbox.base64 ../test/clam.exe.mbox.uu ../test/clam.exe.rtf ../test/clam.exe.szdd ../test/clam-fsg.exe ../test/clam.impl.zip ../test/clam.mail ../test/clam-mew.exe ../test/clam-nsis.exe ../test/clam.ole.doc ../test/clam.pdf ../test/clam-pespin.exe ../test/clam-petite.exe ../test/clam.ppt ../test/clam.sis ../test/clam.tar.gz ../test/clam.tnef ../test/clam-upack.exe ../test/clam-upx.exe ../test/clam-v2.rar ../test/clam-v3.rar ../test/clam-wwpack.exe ../test/clam.zip --log=clamscan.log
[Thread debugging using libthread_db enabled]

  Electric Fence 2.1 Copyright (C) 1987-1998 Bruce Perens.
[New Thread 0x200000000058c000 (LWP 27583)]

Program received signal SIGBUS, Bus error.
[Switching to Thread 0x200000000058c000 (LWP 27583)]
__gconv_find_shlib (name=0xffffffffffffffff <Address 0xffffffffffffffff out of bounds>) at gconv_dl.c:94
94  gconv_dl.c: No such file or directory.
  in gconv_dl.c
(gdb) where
#0  __gconv_find_shlib (name=0xffffffffffffffff <Address 0xffffffffffffffff out of bounds>) at gconv_dl.c:94
#1  0x20000000003590a0 in find_module (directory=0x2000000001502d56 "/usr/lib/gconv/", filename=0x2000000001503334 "UTF-16.so", result=0x2000000000febf30) at gconv_cache.c:196
#2  0x2000000000359550 in __gconv_lookup_cache (toset=<value optimized out>, fromset=<value optimized out>, handle=0x60000fffffc3f0e0, nsteps=0x60000fffffc3f0e8, flags=0)
    at gconv_cache.c:395
#3  0x2000000000348fb0 in __gconv_find_transform (toset=0x60000fffffc3f120 "UTF-16BE//", fromset=0x60000fffffc3f100 "UTF-16LE//", handle=0x60000fffffc3f0e0, nsteps=0x60000fffffc3f0e8, 
    flags=0) at gconv_db.c:729
#4  0x2000000000345b60 in __gconv_open (toset=0x60000fffffc3f120 "UTF-16BE//", fromset=0x60000fffffc3f100 "UTF-16LE//", handle=0x60000fffffc3f140, flags=0) at gconv_open.c:174
#5  0x2000000000345090 in iconv_open (tocode=0x200000000019b5d0 "UTF-16BE", fromcode=0x2000000000db3ff4 "UTF-16LE") at iconv_open.c:72
#6  0x2000000000169c10 in encoding_normalize_toascii (in_m_area=0x60000fffffc3f248, initial_encoding=0x200000000019b5e0 "UTF-16LE", out_m_area=0x60000fffffc3f260) at entconv.c:680
#7  0x20000000000b1a70 in cli_filetype2 (desc=7, engine=0x2000000000d43f40) at filetypes.c:211
#8  0x20000000000a62b0 in cli_magic_scandesc (desc=7, ctx=0x60000fffffc40990) at scanners.c:1895
#9  0x2000000000124200 in ea05 (desc=6, ctx=0x60000fffffc40990, tmpd=0x2000000000dabfd0 "/tmp/clamav-fae3a83598f48147db2f1d0b619fff38") at autoit.c:375
#10 0x2000000000127d20 in cli_scanautoit (desc=6, ctx=0x60000fffffc40990, offset=<value optimized out>) at autoit.c:927
#11 0x20000000000affd0 in cli_scanraw (desc=6, ctx=0x60000fffffc40990, type=CL_TYPE_MSEXE, typercg=<value optimized out>, dettype=0x60000fffffc406e0) at scanners.c:1773
#12 0x20000000000a68a0 in cli_magic_scandesc (desc=6, ctx=0x60000fffffc40990) at scanners.c:2083
#13 0x20000000000a9d30 in cl_scandesc (desc=6, virname=0x60000fffffc409d0, scanned=0x600000000000cfa8, engine=0x2000000000d43f40, scanoptions=25143) at scanners.c:2135
#14 0x400000000000cc40 in scanfile (filename=0x2000000000d5bfe8 "../test/clam.ea05.exe", engine=0x2000000000d43f40, opts=0x20000000005bffb8, options=25143) at manager.c:150
#15 0x400000000000f340 in scanmanager (opts=0x20000000005bffb8) at manager.c:620
#16 0x400000000000b680 in main (argc=<value optimized out>, argv=0x60000fffffc43278) at clamscan.c:172
(gdb) quit

======================== GDB snippet 2 END =====================================

It seems there is some problem in computing the name parameter passed to
__gconv_find_shlib.

Please let me know if there is any further information that I could provide to
help debugging this issue. The environment is still available on merulo.d.o, so
should be reproducible at any time.

Best,
Michael




----- End forwarded message -----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-clamav-devel/attachments/20090328/d7c28516/attachment.pgp 


More information about the Pkg-clamav-devel mailing list