Bug#428323: libgempc430: Causes pcscd to segfault on startup

2007-06-27 Thread Mark Brown
On Sat, Jun 23, 2007 at 10:07:18PM +0200, Ludovic Rousseau wrote:

 Can you give me the package versions of your build tools so I can try to
 reproduce the bug on my PowerPC machine?

ii  binutils   2.17cvs2007042 The GNU assembler, linker and binary utiliti
ii  gcc-4.14.1.2-12   The GNU C compiler
ii  libc6-dev  2.5-11 GNU C Library: Development Libraries and Hea

-- 
You grabbed my hand and we fell into it, like a daydream - or a fever.


signature.asc
Description: Digital signature


Bug#428323: libgempc430: Causes pcscd to segfault on startup

2007-06-23 Thread Ludovic Rousseau
Le 23.06.2007, à 20:59:38, Mark Brown a écrit:
 On Mon, Jun 11, 2007 at 04:07:28PM +0200, [EMAIL PROTECTED] wrote:
 
  frame #0 is corrupted so not very helpful :-(
 
  I don't really know what to suggest next. You can try to execute the 
  function
  OpenGemPC430ByName() from GemPC430/GemPC430Utils.c step by step.
 
 I've got a horrible feeling that this is a compiler bug.  Apart from
 anything else, compiling with -fstack-protector-all, -O1 or -O0
 (independently of each other) allows things to start up quite happily.
 
 I'm not sure how much longer I'll have access to the card reader to
 investigate this.

Can you give me the package versions of your build tools so I can try to
reproduce the bug on my PowerPC machine?

Are you using lenny or sid?
My PowerPC machine is using Ubuntu Feisty. But I can convert it to
lenny.

Thanks for your time.

-- 
 Dr. Ludovic Rousseau[EMAIL PROTECTED]
 -- Normaliser Unix c'est comme pasteuriser le camembert, L.R. --



Bug#428323: libgempc430: Causes pcscd to segfault on startup

2007-06-23 Thread Mark Brown
On Mon, Jun 11, 2007 at 04:07:28PM +0200, [EMAIL PROTECTED] wrote:

 frame #0 is corrupted so not very helpful :-(

 I don't really know what to suggest next. You can try to execute the function
 OpenGemPC430ByName() from GemPC430/GemPC430Utils.c step by step.

I've got a horrible feeling that this is a compiler bug.  Apart from
anything else, compiling with -fstack-protector-all, -O1 or -O0
(independently of each other) allows things to start up quite happily.

I'm not sure how much longer I'll have access to the card reader to
investigate this.

-- 
You grabbed my hand and we fell into it, like a daydream - or a fever.


signature.asc
Description: Digital signature


Bug#428323: libgempc430: Causes pcscd to segfault on startup

2007-06-23 Thread Mark Brown
On Sat, Jun 23, 2007 at 10:07:18PM +0200, Ludovic Rousseau wrote:

 Can you give me the package versions of your build tools so I can try to
 reproduce the bug on my PowerPC machine?

It's sid as of today.  I can dig out the actual versions tomorrow
hopefully.

-- 
You grabbed my hand and we fell into it, like a daydream - or a fever.


signature.asc
Description: Digital signature


Bug#428323: libgempc430: Causes pcscd to segfault on startup

2007-06-11 Thread ludovic . rousseau
Selon Mark Brown [EMAIL PROTECTED]:

 Package: libgempc430
 Version: 1.0.1-5
 Severity: grave
 Justification: renders package unusable

 When a Gemplus smart card reader is connected and this package is installed
 libgempc430 segfaults on startup on my PowerPC based system:

I tried to reproduce the problem on a PowerPC iMac with Ubuntu. I can use the
reader without problem.

I also compiled and installed pcsc-lite 1.4.2 (Ubuntu has an older version) and
I can't reproduce the problem.

 Please note that I've only got access to this device as a result of being
 at Debconf and may therefore be unable to reproduce in future.

I do not have Debian installed on this machine and do not plan to install it.
So I would need your help and some more debug info.

Can you rebuild the libgempc430 package and install the driver directly so the
debug info is not stripped?

When you start pcscd inside gdb use the pcscd arguments --foreground --debug

Thanks



Bug#428323: libgempc430: Causes pcscd to segfault on startup

2007-06-11 Thread Mark Brown
On Mon, Jun 11, 2007 at 01:18:32PM +0200, [EMAIL PROTECTED] wrote:

 Can you rebuild the libgempc430 package and install the driver directly so the
 debug info is not stripped?

Done that.  Note that when doing this you need to patch the Makefiles to avoid
stripping the binary.

Console output:

pcscdaemon.c:297:main() pcscd set to foreground with debug send to stderr
debuglog.c:213:DebugLogSetLevel() debug level=debug
pcscdaemon.c:500:main() pcsc-lite 1.4.2 daemon ready.
[New Thread 813900992 (LWP 30547)]
hotplug_libusb.c:454:HPAddHotPluggable() Adding USB device: 002:003
readerfactory.c:1113:RFInitializeReader() Attempting startup of GemPC430 00 00 
using 
/usr/lib/pcsc/drivers/ifd-GemPC430.bundle/Contents/Linux/libGemPC430.so.1.0.1
readerfactory.c:980:RFBindFunctions() Loading IFD Handler 3.0
ifdhandler.c:51:IFDHCreateChannelByName() lun: 0, device: 
usb:08e6/0430:libusb:002:003
libusb_wrap.c:93:OpenUSB() Lun: 0, Device: usb:08e6/0430:libusb:002:003
libusb_wrap.c:183:OpenUSB() Trying to open USB device: 002/003
libusb_wrap.c:210:OpenUSB() Using USB device: 002/003
GCCmds.c:406:GCCmdSetMode() 
- 00 03 01 00 01 
- 00 02 00 01 
GCCmds.c:415 GCCmdSetMode (null)
GCCmds.c:328:GCCmdGetOSVersion() 
- 00 05 22 05 3F E0 10 
- 00 11 00 47 65 6D 55 73 62 2D 52 31 2E 30 34 2D 47 4D 20 
GCCmds.c:340 GCCmdGetOSVersion (null)

Program received signal SIGSEGV, Segmentation fault.

Backtrace:

#0  0x0010 in ?? ()
#1  0x0fdde2e8 in IFDHCreateChannelByName (Lun=0, lpcDevice=0x0)
at ifdhandler.c:63
#2  0x100077f0 in IFDOpenIFD (rContext=0x100b0008) at ifdwrapper.c:158
#3  0x1000a9fc in RFInitializeReader (rContext=0x0) at readerfactory.c:1147
#4  0x1000b3f8 in RFAddReader (lpcReader=0x100b6cf0 GemPC430, 
dwPort=2097152, 
lpcLibrary=0x100b7a08 
/usr/lib/pcsc/drivers/ifd-GemPC430.bundle/Contents/Linux/libGemPC430.so.1.0.1,
 lpcDevice=0x30831b10 usb:08e6/0430:libusb:002:003)
at readerfactory.c:243
#5  0x10006a44 in HPAddHotPluggable (dev=0x100c6878, 
bus_device=0x30831c4c 002:003, driver=0x100bdfa0) at hotplug_libusb.c:498
#6  0x10006bd0 in HPRescanUsbBus () at hotplug_libusb.c:303
#7  0x10006da8 in HPEstablishUSBNotifications () at hotplug_libusb.c:391
#8  0x0ffcc7b4 in start_thread () from /lib/libpthread.so.0
#9  0x0fee29e4 in clone () from /lib/libc.so.6

Looks rather like something trampled over the stack...  I'll try to
investigate further.

-- 
You grabbed my hand and we fell into it, like a daydream - or a fever.


signature.asc
Description: Digital signature


Bug#428323: libgempc430: Causes pcscd to segfault on startup

2007-06-11 Thread ludovic . rousseau
Selon Mark Brown [EMAIL PROTECTED]:
 Console output:

 pcscdaemon.c:297:main() pcscd set to foreground with debug send to stderr
 debuglog.c:213:DebugLogSetLevel() debug level=debug
 pcscdaemon.c:500:main() pcsc-lite 1.4.2 daemon ready.
 [New Thread 813900992 (LWP 30547)]
 hotplug_libusb.c:454:HPAddHotPluggable() Adding USB device: 002:003
 readerfactory.c:1113:RFInitializeReader() Attempting startup of GemPC430 00
 00 using
 /usr/lib/pcsc/drivers/ifd-GemPC430.bundle/Contents/Linux/libGemPC430.so.1.0.1
 readerfactory.c:980:RFBindFunctions() Loading IFD Handler 3.0
 ifdhandler.c:51:IFDHCreateChannelByName() lun: 0, device:
 usb:08e6/0430:libusb:002:003
 libusb_wrap.c:93:OpenUSB() Lun: 0, Device: usb:08e6/0430:libusb:002:003
 libusb_wrap.c:183:OpenUSB() Trying to open USB device: 002/003
 libusb_wrap.c:210:OpenUSB() Using USB device: 002/003
 GCCmds.c:406:GCCmdSetMode()
 - 00 03 01 00 01
 - 00 02 00 01
 GCCmds.c:415 GCCmdSetMode (null)
 GCCmds.c:328:GCCmdGetOSVersion()
 - 00 05 22 05 3F E0 10
 - 00 11 00 47 65 6D 55 73 62 2D 52 31 2E 30 34 2D 47 4D 20
 GCCmds.c:340 GCCmdGetOSVersion (null)

The last 16 bytes are the firmware version string. So the reader is working
correctly.

 Program received signal SIGSEGV, Segmentation fault.

But the program do not execute the line 53 of GemPC430/GemPC430Utils.c

DEBUG_CRITICAL2(OS string: %s, os_version);

And I have no idea why.

 Backtrace:

 #0  0x0010 in ?? ()
 #1  0x0fdde2e8 in IFDHCreateChannelByName (Lun=0, lpcDevice=0x0)
 at ifdhandler.c:63
 #2  0x100077f0 in IFDOpenIFD (rContext=0x100b0008) at ifdwrapper.c:158
 #3  0x1000a9fc in RFInitializeReader (rContext=0x0) at readerfactory.c:1147
 #4  0x1000b3f8 in RFAddReader (lpcReader=0x100b6cf0 GemPC430,
 dwPort=2097152,
 lpcLibrary=0x100b7a08

/usr/lib/pcsc/drivers/ifd-GemPC430.bundle/Contents/Linux/libGemPC430.so.1.0.1,
 lpcDevice=0x30831b10 usb:08e6/0430:libusb:002:003)
 at readerfactory.c:243
 #5  0x10006a44 in HPAddHotPluggable (dev=0x100c6878,
 bus_device=0x30831c4c 002:003, driver=0x100bdfa0) at
 hotplug_libusb.c:498
 #6  0x10006bd0 in HPRescanUsbBus () at hotplug_libusb.c:303
 #7  0x10006da8 in HPEstablishUSBNotifications () at hotplug_libusb.c:391
 #8  0x0ffcc7b4 in start_thread () from /lib/libpthread.so.0
 #9  0x0fee29e4 in clone () from /lib/libc.so.6

 Looks rather like something trampled over the stack...  I'll try to
 investigate further.

frame #0 is corrupted so not very helpful :-(

I don't really know what to suggest next. You can try to execute the function
OpenGemPC430ByName() from GemPC430/GemPC430Utils.c step by step.

thanks

PS: I am the Debian maintainer and also the upstream author.

--
Ludovic Rousseau   [EMAIL PROTECTED]
-- Normaliser Unix c'est comme pasteuriser le Camembert, L.R. --



Bug#428323: libgempc430: Causes pcscd to segfault on startup

2007-06-11 Thread Mark Brown
On Mon, Jun 11, 2007 at 04:07:28PM +0200, [EMAIL PROTECTED] wrote:

 But the program do not execute the line 53 of GemPC430/GemPC430Utils.c
 
 DEBUG_CRITICAL2(OS string: %s, os_version);
 
 And I have no idea why.

 frame #0 is corrupted so not very helpful :-(

Yup, that's about as far as I got.  As you say, it looks like something
dumped all over the stack :(

 I don't really know what to suggest next. You can try to execute the function
 OpenGemPC430ByName() from GemPC430/GemPC430Utils.c step by step.

Tried that, I'm managing to get gdb to fall over (due to stepping into
libc functions).  I'm trying to drill down by instrumenting the code
currently but it's a bit slow.

-- 
You grabbed my hand and we fell into it, like a daydream - or a fever.


signature.asc
Description: Digital signature


Bug#428323: libgempc430: Causes pcscd to segfault on startup

2007-06-10 Thread Mark Brown
Package: libgempc430
Version: 1.0.1-5
Severity: grave
Justification: renders package unusable

When a Gemplus smart card reader is connected and this package is installed
libgempc430 segfaults on startup on my PowerPC based system:

#0  0x0010 in ?? ()
#1  0x0fddeee8 in IFDHCreateChannelByName ()
   from 
/usr/lib/pcsc/drivers/ifd-GemPC430.bundle/Contents/Linux/libGemPC430.so.1.0.1
#2  0x100077f0 in IFDOpenIFD (rContext=0x100b0008) at ifdwrapper.c:158
#3  0x1000a9fc in RFInitializeReader (rContext=0x0) at readerfactory.c:1147
#4  0x1000b3f8 in RFAddReader (lpcReader=0x100b6cf0 GemPC430, 
dwPort=2097152, 
lpcLibrary=0x100b7a08 
/usr/lib/pcsc/drivers/ifd-GemPC430.bundle/Contents/Linux/libGemPC430.so.1.0.1,
 lpcDevice=0x30831b10 usb:08e6/0430:libusb:002:003)
at readerfactory.c:243
#5  0x10006a44 in HPAddHotPluggable (dev=0x100c6878, 
bus_device=0x30831c4c 002:003, driver=0x100bdfa0) at hotplug_libusb.c:498
#6  0x10006bd0 in HPRescanUsbBus () at hotplug_libusb.c:303
#7  0x10006da8 in HPEstablishUSBNotifications () at hotplug_libusb.c:391
#8  0x0ffcc7b4 in start_thread () from /lib/libpthread.so.0
#9  0x0fee29e4 in clone () from /lib/libc.so.6

ID of device:

Bus 002 Device 003: ID 08e6:0430 Gemplus GemPC430 SmartCard Reader

Please note that I've only got access to this device as a result of being
at Debconf and may therefore be unable to reproduce in future.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.21-1-powerpc
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libgempc430 depends on:
ii  libc6 2.5-10 GNU C Library: Shared libraries
ii  libusb-0.1-4  2:0.1.12-7 userspace USB programming library
ii  pcscd 1.4.2-1Middleware to access a smart card 

libgempc430 recommends no packages.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]