librfid-tool works only sometimes / glibc error

Julian Schütte julian.schuette at sit.fraunhofer.de
Mon Jan 21 19:36:32 UTC 2008


Hello,

I'm running into obscure problems using mifare-tool and librfid-tool:

The commands "librfid-tool -l iso14443a -p mifare-classic" and 
"mifare-tool --read 1" work only once in a while. Most of the times the 
output stops after "opening reader handle" for a while. Then the program 
crashes with a glibc error. I can avoid the glibc error by setting 
"MALLOC_CHECK_=0" but this just results in the programs looping endlessly...

What's strange is that from time to time without making any changes, the 
program works fine and communicates with the card.

I'm using an Omnikey CardMan 5321 and Mifare Classic cards and I built 
librfid from the current svn trunk using --enable-ccid and 
--enable-reader-cm5x21. My platform is a PPC 64, both tools show the 
same error.

This is what I get in case the error occurs:

[root at localhost librfid]# librfid-tool -l iso14443a -p mifare-classic
librfid-tool - (C) 2006 by Harald Welte
This program is Free Software and has ABSOLUTELY NO WARRANTY

initializing librfid
opening reader handle
No Omnikey Cardman 5121 found
*** glibc detected *** librfid-tool: corrupted double-linked list: 
0xf7ff04b8 ***
======= Backtrace: =========
/lib/libc.so.6[0xf7efca40]
/lib/libc.so.6[0xf7efe860]
/lib/libc.so.6(__libc_free+0xc8)[0xf7f02098]
/usr/lib/libusb-0.1.so.4(usb_free_dev+0x34)[0xfde2814]
/usr/lib/libusb-0.1.so.4(usb_find_devices+0x108)[0xfde2d58]
/usr/lib/librfid.so.0[0xff974bc]
/usr/lib/librfid.so.0(rfid_reader_open+0x64)[0xff92b44]
librfid-tool[0x10002ae4]
librfid-tool[0x10002154]
/lib/libc.so.6[0xf7e9d320]
/lib/libc.so.6(__libc_start_main+0x144)[0xf7e9d544]
======= Memory map: ========
00100000-00103000 r-xp 00100000 00:00 0
0fde0000-0fde8000 r-xp 00000000 08:01 474167                             
/usr/lib/libusb-0.1.so.4.4.3
0fde8000-0fdf8000 ---p 00008000 08:01 474167                             
/usr/lib/libusb-0.1.so.4.4.3
0fdf8000-0fdfa000 rw-p 00008000 08:01 474167                             
/usr/lib/libusb-0.1.so.4.4.3
0ff90000-0ff9f000 r-xp 00000000 08:01 473737                             
/usr/lib/librfid.so.0.0.0
0ff9f000-0ffaf000 ---p 0000f000 08:01 473737                             
/usr/lib/librfid.so.0.0.0
0ffaf000-0ffb0000 rw-p 0000f000 08:01 473737                             
/usr/lib/librfid.so.0.0.0
0ffc0000-0ffdd000 r-xp 00000000 08:01 489015                             
/lib/ld-2.4.so
0ffed000-0ffee000 r--p 0001d000 08:01 489015                             
/lib/ld-2.4.so
0ffee000-0ffef000 rw-p 0001e000 08:01 489015                             
/lib/ld-2.4.so
10000000-10004000 r-xp 00000000 08:01 473855                             
/usr/bin/librfid-tool
10013000-10014000 rw-p 00003000 08:01 473855                             
/usr/bin/librfid-tool
10014000-10035000 rwxp 10014000 00:00 0                                  
[heap]
f7e7f000-f7e80000 rw-p f7e7f000 00:00 0
f7e80000-f7fdc000 r-xp 00000000 08:01 872642                             
/lib/libc-2.4.so
f7fdc000-f7feb000 ---p 0015c000 08:01 872642                             
/lib/libc-2.4.so
f7feb000-f7fef000 r--p 0015b000 08:01 872642                             
/lib/libc-2.4.so
f7fef000-f7ff0000 rw-p 0015f000 08:01 872642                             
/lib/libc-2.4.so
f7ff0000-f7ff3000 rw-p f7ff0000 00:00 0
f7ffd000-f7fff000 rw-p f7ffd000 00:00 0
fffaf000-fffc4000 rw-p fffaf000 00:00 0                                  
[stack]
Aborted
[root at localhost librfid]#

Thanks a lot for helping me with that problem!
Julian




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3603 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.openpcd.org/pipermail/openpcd-devel/attachments/20080121/7281eeb6/smime.bin


More information about the openpcd-devel mailing list