Bug 133978

Summary: libusb: invalid or incomplete multibyte or wide character
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Simon Eisenmann <simon>
Component: BasesystemAssignee: Olaf Hering <ohering>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: x86   
OS: SuSE Linux 10.0   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: spec file to build a libusb 0.10.a rpm without resmgr patch
strace output of idhandler when running pkcs15-tool -c

Description Simon Eisenmann 2005-11-16 12:05:31 UTC
Then trying to use an CCID compatible USB card reader with openct or pkcs-lite on suse linux 10.0 or 9.3 one only gets this error then trying to read from the card.

usb_bulk failed: Invalid or incomplete multibyte or wide character

This can be fixed by replacing the shipped libusb version with a self compiled one (latest version) .. at least when skipping the resmgr patch. I did not had the time to port that patch to the latest version, so i could not test with it.
Comment 1 Olaf Hering 2005-11-16 13:54:37 UTC
you mean libusb-1.0 will fix it? or did you compile libusb-0.1.10a without additional patches?
Comment 2 Simon Eisenmann 2005-11-16 14:04:34 UTC
Well i updated to a self compiled (unpatched) libusb 0.1.10a on my 9.3 system. As 10.0 already ships with libusb 0.1.10a it seems like something inside the resmgr patch breaks this. 

I am going to attach the spec file i used to build a new libusb rpm for my 9.3 system. When installing that one, it works (though no resmgr support inside).
Comment 3 Simon Eisenmann 2005-11-16 14:06:16 UTC
Created attachment 57501 [details]
spec file to build a libusb 0.10.a rpm without resmgr patch
Comment 4 Olaf Hering 2005-11-16 16:08:50 UTC
so you are seeing the error on 9.3 and 10.0 with the provided libusb.

a selfcompiled version 0.1.10a without patches works always.

can you try without the libusb-pointer-signedness.patch? and leave all others applied? I somehow doubt resmgr changes anything.
Comment 5 Olaf Hering 2005-11-17 10:40:51 UTC
I also do not find this message in the sources:

'Invalid or incomplete multibyte or wide character'
Comment 6 Simon Eisenmann 2005-11-17 12:00:42 UTC
Well all i can tell you is that when i am using pcscd driver to read certificates from a smartcard and having installed the shipped libusb version (either in 9.3 or 10.0) i get that error logged to syslog.

When replacing the shipped libusb with a selfcompiled one (without patches) it works (going to check what happens when only skipping the signedness patch on 10.0 now). 

Though i was not able to get rid of this error when using openct instead of pcsc-lite no matter if i replace libusb or not.
Comment 7 Simon Eisenmann 2005-11-17 12:05:36 UTC
Correction: pcsc-lite usb access seems to work on 10.0 with alle the libusb patches inside. At least it does now. On 10.0 only the problem with openct ist left. 
Comment 8 Olaf Hering 2005-11-18 13:27:55 UTC
'Invalid or incomplete multibyte or wide character' comes directly from glibc.
Comment 9 Olaf Hering 2005-11-18 13:48:25 UTC
openct-0.6.2/src/ifd/sys-linux.c:ifd_sysdep_usb_bulk prints this message. The ioctl gets -EILSEQ from the kernel.

can you attach the strace -fs 999 -o trace.txt openct output?
Comment 10 Simon Eisenmann 2005-11-21 18:13:38 UTC
lsusb output:
Bus 001 Device 005: ID 04e6:e003 SCM Microsystems, Inc. SPR532 PinPad SmartCard Reader
Bus 001 Device 001: ID 0000:0000


# strace -fs 999 -o trace.txt /usr/sbin/ifdhandler -F -H ccid /proc/bus/usb/001/005
Debug: skipped 1 class/vendor specific interface descriptors
Error: usb_bulk failed: Invalid or incomplete multibyte or wide character

going to attach the strace output from the start of idhandler until i ran "pkcs15-tool -c" which results in the upper error message on the ifdhandler console.
Comment 11 Simon Eisenmann 2005-11-21 18:15:04 UTC
Created attachment 57929 [details]
strace output of idhandler when running pkcs15-tool -c
Comment 12 Olaf Hering 2005-12-09 12:47:48 UTC
Releases after 10.0 do not use resmgr anymore.