Segmentation fault opensc-tool 0.14

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Segmentation fault opensc-tool 0.14

J.Witvliet
Finally managed to get opensc-bulding, openssl WAS installed however.
For a completely other project, one suggested to do "aptitude build-dep <project-name>
It resulted in a dozen additional packages getting installed, however NONE of them related to opensc, **ssl, or crypto stuff.
I presume it's one of the quirks of Ubuntu ;-(
Anyway, configure (--enable-openssl --enable-sm)  and make(s) successfully completed.

But not there yet.
The pkcs11-tool seems to be running OK, however there seems to be something strange going on with opensc-tool

With the new one I get:
# /usr/local/bin/opensc-tool -l
Segmentation fault (core dumped)

With the old one (0.13) I get:
~# /usr/bin/opensc-tool -l
# Detected readers (pcsc)
Nr.  Card  Features  Name
0    No              O2 Micro Oz776 00 00
1    Yes             SCM Microsystems Inc. SCR 355 [CCID Interface] 01 00

I did enabled debug; The trace of the 0.14 and 0.13 is included

Do I miss-out on another  option?

______________________________________________________________________
Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het electronisch verzenden van berichten.

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel

opensc-issue.txt (22K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Segmentation fault opensc-tool 0.14

Frank Morgner
Try to run opensc-tool in gdb or with valgrind. It will point you to the
place where the error occurs. You may need to compile OpenSC with
CFLAGS="-g -O0"

On Tuesday, October 07 at 04:21PM, [hidden email] wrote:

> Finally managed to get opensc-bulding, openssl WAS installed however.
> For a completely other project, one suggested to do "aptitude build-dep <project-name>
> It resulted in a dozen additional packages getting installed, however NONE of them related to opensc, **ssl, or crypto stuff.
> I presume it's one of the quirks of Ubuntu ;-(
> Anyway, configure (--enable-openssl --enable-sm)  and make(s) successfully completed.
>
> But not there yet.
> The pkcs11-tool seems to be running OK, however there seems to be something strange going on with opensc-tool
>
> With the new one I get:
> # /usr/local/bin/opensc-tool -l
> Segmentation fault (core dumped)
>
> With the old one (0.13) I get:
> ~# /usr/bin/opensc-tool -l
> # Detected readers (pcsc)
> Nr.  Card  Features  Name
> 0    No              O2 Micro Oz776 00 00
> 1    Yes             SCM Microsystems Inc. SCR 355 [CCID Interface] 01 00
>
> I did enabled debug; The trace of the 0.14 and 0.13 is included
>
> Do I miss-out on another  option?
>
> ______________________________________________________________________
> Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het electronisch verzenden van berichten.
>
> This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.
Content-Description: opensc-issue.txt

> # /usr/local/bin/opensc-tool -l
> Segmentation fault (core dumped)
> root@portege:~#
>
> Oct  7 15:47:10 portege pcscd: winscard_msg_srv.c:230:ProcessEventsServer() Common channel packet arrival
> Oct  7 15:47:10 portege pcscd: winscard_msg_srv.c:242:ProcessEventsServer() ProcessCommonChannelRequest detects: 16
> Oct  7 15:47:10 portege pcscd: pcscdaemon.c:111:SVCServiceRunLoop() A new context thread creation is requested: 16
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:301:ContextThread() Thread is started: dwClientID=16, threadContext @0x8ad7fa8
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_VERSION from client 16
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:331:ContextThread() Client is protocol version 4:3
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:351:ContextThread() CMD_VERSION rv=0x0 for client 16
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:319:ContextThread() Received command: ESTABLISH_CONTEXT from client 16
> Oct  7 15:47:10 portege pcscd: winscard.c:193:SCardEstablishContext() Establishing Context: 0xC0091DB
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:412:ContextThread() ESTABLISH_CONTEXT rv=0x0 for client 16
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_GET_READERS_STATE from client 16
> Oct  7 15:47:10 portege pcscd: message repeated 2 times: [ winscard_svc.c:319:ContextThread() Received command: CMD_GET_READERS_STATE from client 16]
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CONNECT from client 16
> Oct  7 15:47:10 portege pcscd: winscard.c:235:SCardConnect() Attempting Connect to O2 Micro Oz776 00 00 using protocol: 3
> Oct  7 15:47:10 portege pcscd: readerfactory.c:745:RFReaderInfo() RefReader() count was: 1
> Oct  7 15:47:10 portege pcscd: winscard.c:422:SCardConnect() Direct access: no protocol selected
> Oct  7 15:47:10 portege pcscd: winscard.c:429:SCardConnect() hCard Identity: 1f853a13
> Oct  7 15:47:10 portege pcscd: winscard.c:490:SCardConnect() UnrefReader() count was: 2
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:453:ContextThread() CONNECT rv=0x0 for client 16
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CONTROL from client 16
> Oct  7 15:47:10 portege pcscd: readerfactory.c:772:RFReaderInfoById() RefReader() count was: 1
> Oct  7 15:47:10 portege pcscd: ifdhandler.c:1360:IFDHControl() ControlCode: 0x42000D48, usb:0b97/7772:libudev:0:/dev/bus/usb/002/008 (lun: 0)
> Oct  7 15:47:10 portege pcscd: Control TxBuffer:
> Oct  7 15:47:10 portege pcscd: Control RxBuffer: 12 04 42 33 00 12
> Oct  7 15:47:10 portege pcscd: winscard.c:1350:SCardControl() UnrefReader() count was: 2
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:652:ContextThread() CONTROL rv=0x0 for client 16
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:319:ContextThread() Received command: DISCONNECT from client 16
> Oct  7 15:47:10 portege pcscd: readerfactory.c:772:RFReaderInfoById() RefReader() count was: 1
> Oct  7 15:47:10 portege pcscd: winscard.c:850:SCardDisconnect() Active Contexts: 1
> Oct  7 15:47:10 portege pcscd: winscard.c:851:SCardDisconnect() dwDisposition: 0
> Oct  7 15:47:10 portege pcscd: ifdhandler.c:362:IFDHGetCapabilities() tag: 0xFB2, usb:0b97/7772:libudev:0:/dev/bus/usb/002/008 (lun: 0)
> Oct  7 15:47:10 portege pcscd: winscard.c:1030:SCardDisconnect() Stopping polling thread
> Oct  7 15:47:10 portege pcscd: ifdhandler.c:327:IFDHStopPolling() usb:0b97/7772:libudev:0:/dev/bus/usb/002/008 (lun: 0)
> Oct  7 15:47:10 portege pcscd: winscard.c:1043:SCardDisconnect() UnrefReader() count was: 2
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:490:ContextThread() DISCONNECT rv=0x0 for client 16
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_GET_READERS_STATE from client 16
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CONNECT from client 16
> Oct  7 15:47:10 portege pcscd: winscard.c:235:SCardConnect() Attempting Connect to SCM Microsystems Inc. SCR 355 [CCID Interface] 01 00 using protocol: 3
> Oct  7 15:47:10 portege pcscd: readerfactory.c:745:RFReaderInfo() RefReader() count was: 1
> Oct  7 15:47:10 portege pcscd: ifdhandler.c:1122:IFDHPowerICC() action: PowerUp, usb:04e6/5410:libudev:0:/dev/bus/usb/002/012 (lun: 10000)
> Oct  7 15:47:10 portege pcscd: winscard.c:310:SCardConnect() power up complete.
> Oct  7 15:47:10 portege pcscd: Card ATR: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
> Oct  7 15:47:10 portege pcscd: winscard.c:330:SCardConnect() powerState: POWER_STATE_INUSE
> Oct  7 15:47:10 portege pcscd: prothandler.c:87:PHSetProtocol() Attempting PTS to T=1
> Oct  7 15:47:10 portege pcscd: ifdhandler.c:668:IFDHSetProtocolParameters() protocol T=1, usb:04e6/5410:libudev:0:/dev/bus/usb/002/012 (lun: 10000)
> Oct  7 15:47:10 portege pcscd: ifdhandler.c:2047:extra_egt() Extra EGT patch applied
> Oct  7 15:47:10 portege kernel: [ 2738.164197] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 11 ep 8 with no TDs queued?
> Oct  7 15:47:10 portege pcscd: winscard.c:409:SCardConnect() Active Protocol: T=1
> Oct  7 15:47:10 portege pcscd: winscard.c:429:SCardConnect() hCard Identity: 6ff106a0
> Oct  7 15:47:10 portege pcscd: winscard.c:490:SCardConnect() UnrefReader() count was: 2
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:453:ContextThread() CONNECT rv=0x0 for client 16
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CONTROL from client 16
> Oct  7 15:47:10 portege pcscd: readerfactory.c:772:RFReaderInfoById() RefReader() count was: 1
> Oct  7 15:47:10 portege pcscd: ifdhandler.c:1360:IFDHControl() ControlCode: 0x42000D48, usb:04e6/5410:libudev:0:/dev/bus/usb/002/012 (lun: 10000)
> Oct  7 15:47:10 portege pcscd: Control TxBuffer:
> Oct  7 15:47:10 portege pcscd: Control RxBuffer: 12 04 42 33 00 12
> Oct  7 15:47:10 portege pcscd: winscard.c:1350:SCardControl() UnrefReader() count was: 2
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:652:ContextThread() CONTROL rv=0x0 for client 16
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:319:ContextThread() Received command: DISCONNECT from client 16
> Oct  7 15:47:10 portege pcscd: readerfactory.c:772:RFReaderInfoById() RefReader() count was: 1
> Oct  7 15:47:10 portege pcscd: winscard.c:850:SCardDisconnect() Active Contexts: 1
> Oct  7 15:47:10 portege pcscd: winscard.c:851:SCardDisconnect() dwDisposition: 0
> Oct  7 15:47:10 portege pcscd: winscard.c:1016:SCardDisconnect() powerState: POWER_STATE_GRACE_PERIOD
> Oct  7 15:47:10 portege pcscd: ifdhandler.c:362:IFDHGetCapabilities() tag: 0xFB2, usb:04e6/5410:libudev:0:/dev/bus/usb/002/012 (lun: 10000)
> Oct  7 15:47:10 portege pcscd: winscard.c:1030:SCardDisconnect() Stopping polling thread
> Oct  7 15:47:10 portege pcscd: ifdhandler.c:327:IFDHStopPolling() usb:04e6/5410:libudev:0:/dev/bus/usb/002/012 (lun: 10000)
> Oct  7 15:47:10 portege pcscd: winscard.c:1043:SCardDisconnect() UnrefReader() count was: 2
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:490:ContextThread() DISCONNECT rv=0x0 for client 16
> Oct  7 15:47:10 portege kernel: [ 2738.164749] opensc-tool[7441]: segfault at ffffffff ip b73faf5f sp bf9de150 error 5 in libc-2.19.so[b73b3000+1a9000]
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:311:ContextThread() Client die: 16
> Oct  7 15:47:10 portege pcscd: winscard.c:204:SCardReleaseContext() Releasing Context: 0xC0091DB
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:933:MSGCleanupClient() Thread is stopping: dwClientID=16, threadContext @0x8ad7fa8
> Oct  7 15:47:10 portege pcscd: winscard_svc.c:939:MSGCleanupClient() Freeing SCONTEXT @0x8ad7fa8
> Oct  7 15:47:11 portege pcscd: eventhandler.c:467:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
> Oct  7 15:47:16 portege pcscd: ifdhandler.c:1122:IFDHPowerICC() action: PowerDown, usb:04e6/5410:libudev:0:/dev/bus/usb/002/012 (lun: 10000)
> Oct  7 15:47:16 portege pcscd: eventhandler.c:455:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED
>
>
>
>
>
> ~# /usr/bin/opensc-tool -l
> # Detected readers (pcsc)
> Nr.  Card  Features  Name
> 0    No              O2 Micro Oz776 00 00
> 1    Yes             SCM Microsystems Inc. SCR 355 [CCID Interface] 01 00
> root@portege:~#
>
>
> Oct  7 15:44:39 portege pcscd: winscard_msg_srv.c:230:ProcessEventsServer() Common channel packet arrival
> Oct  7 15:44:39 portege pcscd: winscard_msg_srv.c:242:ProcessEventsServer() ProcessCommonChannelRequest detects: 16
> Oct  7 15:44:39 portege pcscd: pcscdaemon.c:111:SVCServiceRunLoop() A new context thread creation is requested: 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:301:ContextThread() Thread is started: dwClientID=16, threadContext @0x8ad8150
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_VERSION from client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:331:ContextThread() Client is protocol version 4:3
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:351:ContextThread() CMD_VERSION rv=0x0 for client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: ESTABLISH_CONTEXT from client 16
> Oct  7 15:44:39 portege pcscd: winscard.c:193:SCardEstablishContext() Establishing Context: 0x733BC157
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:412:ContextThread() ESTABLISH_CONTEXT rv=0x0 for client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_GET_READERS_STATE from client 16
> Oct  7 15:44:39 portege pcscd: message repeated 2 times: [ winscard_svc.c:319:ContextThread() Received command: CMD_GET_READERS_STATE from client 16]
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CONNECT from client 16
> Oct  7 15:44:39 portege pcscd: winscard.c:235:SCardConnect() Attempting Connect to O2 Micro Oz776 00 00 using protocol: 3
> Oct  7 15:44:39 portege pcscd: readerfactory.c:745:RFReaderInfo() RefReader() count was: 1
> Oct  7 15:44:39 portege pcscd: winscard.c:422:SCardConnect() Direct access: no protocol selected
> Oct  7 15:44:39 portege pcscd: winscard.c:429:SCardConnect() hCard Identity: 2d479ea5
> Oct  7 15:44:39 portege pcscd: winscard.c:490:SCardConnect() UnrefReader() count was: 2
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:453:ContextThread() CONNECT rv=0x0 for client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CONTROL from client 16
> Oct  7 15:44:39 portege pcscd: readerfactory.c:772:RFReaderInfoById() RefReader() count was: 1
> Oct  7 15:44:39 portege pcscd: ifdhandler.c:1360:IFDHControl() ControlCode: 0x42000D48, usb:0b97/7772:libudev:0:/dev/bus/usb/002/008 (lun: 0)
> Oct  7 15:44:39 portege pcscd: Control TxBuffer:
> Oct  7 15:44:39 portege pcscd: Control RxBuffer: 12 04 42 33 00 12
> Oct  7 15:44:39 portege pcscd: winscard.c:1350:SCardControl() UnrefReader() count was: 2
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:652:ContextThread() CONTROL rv=0x0 for client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: DISCONNECT from client 16
> Oct  7 15:44:39 portege pcscd: readerfactory.c:772:RFReaderInfoById() RefReader() count was: 1
> Oct  7 15:44:39 portege pcscd: winscard.c:850:SCardDisconnect() Active Contexts: 1
> Oct  7 15:44:39 portege pcscd: winscard.c:851:SCardDisconnect() dwDisposition: 0
> Oct  7 15:44:39 portege pcscd: ifdhandler.c:362:IFDHGetCapabilities() tag: 0xFB2, usb:0b97/7772:libudev:0:/dev/bus/usb/002/008 (lun: 0)
> Oct  7 15:44:39 portege pcscd: winscard.c:1030:SCardDisconnect() Stopping polling thread
> Oct  7 15:44:39 portege pcscd: ifdhandler.c:327:IFDHStopPolling() usb:0b97/7772:libudev:0:/dev/bus/usb/002/008 (lun: 0)
> Oct  7 15:44:39 portege pcscd: winscard.c:1043:SCardDisconnect() UnrefReader() count was: 2
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:490:ContextThread() DISCONNECT rv=0x0 for client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_GET_READERS_STATE from client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CONNECT from client 16
> Oct  7 15:44:39 portege pcscd: winscard.c:235:SCardConnect() Attempting Connect to SCM Microsystems Inc. SCR 355 [CCID Interface] 01 00 using protocol: 3
> Oct  7 15:44:39 portege pcscd: readerfactory.c:745:RFReaderInfo() RefReader() count was: 1
> Oct  7 15:44:39 portege pcscd: ifdhandler.c:1122:IFDHPowerICC() action: PowerUp, usb:04e6/5410:libudev:0:/dev/bus/usb/002/012 (lun: 10000)
> Oct  7 15:44:39 portege pcscd: winscard.c:310:SCardConnect() power up complete.
> Oct  7 15:44:39 portege pcscd: Card ATR: xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
> Oct  7 15:44:39 portege pcscd: winscard.c:330:SCardConnect() powerState: POWER_STATE_INUSE
> Oct  7 15:44:39 portege pcscd: prothandler.c:87:PHSetProtocol() Attempting PTS to T=1
> Oct  7 15:44:39 portege pcscd: ifdhandler.c:668:IFDHSetProtocolParameters() protocol T=1, usb:04e6/5410:libudev:0:/dev/bus/usb/002/012 (lun: 10000)
> Oct  7 15:44:39 portege pcscd: ifdhandler.c:2047:extra_egt() Extra EGT patch applied
> Oct  7 15:44:39 portege pcscd: winscard.c:409:SCardConnect() Active Protocol: T=1
> Oct  7 15:44:39 portege pcscd: winscard.c:429:SCardConnect() hCard Identity: 318c41f5
> Oct  7 15:44:39 portege pcscd: winscard.c:490:SCardConnect() UnrefReader() count was: 2
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:453:ContextThread() CONNECT rv=0x0 for client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CONTROL from client 16
> Oct  7 15:44:39 portege pcscd: readerfactory.c:772:RFReaderInfoById() RefReader() count was: 1
> Oct  7 15:44:39 portege pcscd: ifdhandler.c:1360:IFDHControl() ControlCode: 0x42000D48, usb:04e6/5410:libudev:0:/dev/bus/usb/002/012 (lun: 10000)
> Oct  7 15:44:39 portege pcscd: Control TxBuffer:
> Oct  7 15:44:39 portege pcscd: Control RxBuffer: 12 04 42 33 00 12
> Oct  7 15:44:39 portege pcscd: winscard.c:1350:SCardControl() UnrefReader() count was: 2
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:652:ContextThread() CONTROL rv=0x0 for client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: DISCONNECT from client 16
> Oct  7 15:44:39 portege pcscd: readerfactory.c:772:RFReaderInfoById() RefReader() count was: 1
> Oct  7 15:44:39 portege pcscd: winscard.c:850:SCardDisconnect() Active Contexts: 1
> Oct  7 15:44:39 portege pcscd: winscard.c:851:SCardDisconnect() dwDisposition: 0
> Oct  7 15:44:39 portege pcscd: winscard.c:1016:SCardDisconnect() powerState: POWER_STATE_GRACE_PERIOD
> Oct  7 15:44:39 portege pcscd: ifdhandler.c:362:IFDHGetCapabilities() tag: 0xFB2, usb:04e6/5410:libudev:0:/dev/bus/usb/002/012 (lun: 10000)
> Oct  7 15:44:39 portege pcscd: winscard.c:1030:SCardDisconnect() Stopping polling thread
> Oct  7 15:44:39 portege pcscd: ifdhandler.c:327:IFDHStopPolling() usb:04e6/5410:libudev:0:/dev/bus/usb/002/012 (lun: 10000)
> Oct  7 15:44:39 portege pcscd: winscard.c:1043:SCardDisconnect() UnrefReader() count was: 2
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:490:ContextThread() DISCONNECT rv=0x0 for client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_GET_READERS_STATE from client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:393:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE rv=0x0 for client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_GET_READERS_STATE from client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_GET_READERS_STATE from client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:393:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE rv=0x0 for client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: CMD_GET_READERS_STATE from client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:319:ContextThread() Received command: RELEASE_CONTEXT from client 16
> Oct  7 15:44:39 portege pcscd: winscard.c:204:SCardReleaseContext() Releasing Context: 0x733BC157
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:427:ContextThread() RELEASE_CONTEXT rv=0x0 for client 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:311:ContextThread() Client die: 16
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:933:MSGCleanupClient() Thread is stopping: dwClientID=16, threadContext @0x8ad8150
> Oct  7 15:44:39 portege pcscd: winscard_svc.c:939:MSGCleanupClient() Freeing SCONTEXT @0x8ad8150
> Oct  7 15:44:40 portege pcscd: eventhandler.c:467:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
> Oct  7 15:44:45 portege pcscd: ifdhandler.c:1122:IFDHPowerICC() action: PowerDown, usb:04e6/5410:libudev:0:/dev/bus/usb/002/012 (lun: 10000)
> Oct  7 15:44:45 portege pcscd: eventhandler.c:455:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED
>
>

> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Opensc-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/opensc-devel

--
Frank Morgner

Virtual Smart Card Architecture http://vsmartcard.sourceforge.net
OpenPACE                        http://openpace.sourceforge.net
IFD Handler for libnfc Devices  http://sourceforge.net/projects/ifdnfc

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel

attachment0 (985 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Segmentation fault opensc-tool 0.14

J.Witvliet
In reply to this post by J.Witvliet
From: Frank Morgner [mailto:[hidden email]]
Sent: dinsdag 7 oktober 2014 20:26
To: [hidden email]
Subject: Re: [Opensc-devel] Segmentation fault opensc-tool 0.14

Try to run opensc-tool in gdb or with valgrind. It will point you to the place where the error occurs
-----Original Message-----

OK, did so.

Build with:
./configure  --enable-openssl --enable-shared --enable-strict  --disable-assert   --enable-sm  --enable-readline --disable-optimization

GDB gave me an answer, (but no clue what I did wrong :-)

gdb opensc-tool -l
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7

Reading symbols from opensc-tool...done.
(gdb) run -l
Starting program: /usr/local/bin/opensc-tool -l
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0xb7cc2f5f in _IO_vfprintf_internal (s=0xbfffcc88, format=<optimized out>, ap=0xbffff2ac "\300\311\004\b$\363\377\277") at vfprintf.c:1661
1661    vfprintf.c: No such file or directory.
(gdb)

 vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Valgrind tell me:
valgrind opensc-tool -l
==13454== Memcheck, a memory error detector
==13454== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==13454== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==13454== Command: opensc-tool -l
==13454==
==13454== Syscall param socketcall.send(msg) points to uninitialised byte(s)
==13454==    at 0x41D9281: send (socket.S:63)
==13454==    by 0x496ACB4: ??? (in /lib/i386-linux-gnu/libpcsclite.so.1.0.0)
==13454==    by 0x496AE3B: ??? (in /lib/i386-linux-gnu/libpcsclite.so.1.0.0)
==13454==    by 0x4966566: SCardConnect (in /lib/i386-linux-gnu/libpcsclite.so.1.0.0)
==13454==    by 0x408F06C: ??? (in /usr/lib/i386-linux-gnu/libopensc.so.3.0.0)
==13454==    by 0x405C9DA: sc_ctx_detect_readers (in /usr/lib/i386-linux-gnu/libopensc.so.3.0.0)
==13454==    by 0x405D5CA: sc_context_create (in /usr/lib/i386-linux-gnu/libopensc.so.3.0.0)
==13454==    by 0x804B003: main (opensc-tool.c:755)
==13454==  Address 0xbef4a1cd is on thread 1's stack
==13454==
==13454== Invalid read of size 1
==13454==    at 0x422EF5F: vfprintf (vfprintf.c:1661)
==13454==    by 0x422F48A: buffered_vfprintf (vfprintf.c:2356)
==13454==    by 0x422A7E4: vfprintf (vfprintf.c:1313)
==13454==    by 0x423421E: printf (printf.c:33)
==13454==    by 0x8049828: list_readers (opensc-tool.c:268)
==13454==    by 0x804B0D3: main (opensc-tool.c:779)
==13454==  Address 0xffffffff is not stack'd, malloc'd or (recently) free'd
==13454==
==13454==
==13454== Process terminating with default action of signal 11 (SIGSEGV)
==13454==  Access not within mapped region at address 0xFFFFFFFF
==13454==    at 0x422EF5F: vfprintf (vfprintf.c:1661)
==13454==    by 0x422F48A: buffered_vfprintf (vfprintf.c:2356)
==13454==    by 0x422A7E4: vfprintf (vfprintf.c:1313)
==13454==    by 0x423421E: printf (printf.c:33)
==13454==    by 0x8049828: list_readers (opensc-tool.c:268)
==13454==    by 0x804B0D3: main (opensc-tool.c:779)
==13454==  If you believe this happened as a result of a stack
==13454==  overflow in your program's main thread (unlikely but
==13454==  possible), you can try to increase the size of the
==13454==  main thread stack using the --main-stacksize= flag.
==13454==  The main thread stack size used in this run was 8388608.
==13454==
==13454== HEAP SUMMARY:
==13454==     in use at exit: 34,382 bytes in 1,492 blocks==13454==   total heap usage: 1,824 allocs, 332 frees, 42,970 bytes allocated
==13454==
==13454== LEAK SUMMARY:
==13454==    definitely lost: 0 bytes in 0 blocks
==13454==    indirectly lost: 0 bytes in 0 blocks
==13454==      possibly lost: 0 bytes in 0 blocks
==13454==    still reachable: 34,382 bytes in 1,492 blocks
==13454==         suppressed: 0 bytes in 0 blocks
==13454== Rerun with --leak-check=full to see details of leaked memory
==13454==
==13454== For counts of detected and suppressed errors, rerun with: -v
==13454== Use --track-origins=yes to see where uninitialised values come from
==13454== ERROR SUMMARY: 3 errors from 2 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped)

______________________________________________________________________
Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het electronisch verzenden van berichten.

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Opensc-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/opensc-devel