pcscd segfaults

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

pcscd segfaults

linux service

typo: second syslog file is:

http://94.75.213.142/syslog2

 

 

We are building oem pc's with *ubuntu 15.04 oem installs

We want to pre-install card service for belgian EID.

But pcscd fails to start or segfault:

Can only get to work if I add:

service pcscd restart in /etc/rc.local

 

/var/log/syslog without service pcscd in /etc/rc.local:

http://94.75.213.142/syslog1

info from pscd_scan:

no readers present

 

 

/var/log/syslog with service pcscd in /etc/rc.local:

This works, even unplug+plugin cardreader

http://94.75.213.142/syslog2

 

info:

ubu@ubu-System-Product-Name:~/Bureaublad$ pcsc_scan

PC/SC device scanner

V 1.4.23 (c) 2001-2011, Ludovic Rousseau <[hidden email]>

Compiled with PC/SC lite version: 1.8.11

Using reader plug'n play mechanism

Scanning present readers...

0: VASCO DP905v1.1 00 00

 

Fri Sep 18 13:28:17 2015

Reader 0: VASCO DP905v1.1 00 00

Card state: Card removed,


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

Ludovic Rousseau
Hello,

Can you run pcscd inside gdb to generate a backtrace of the crash?
Use something like:
 $ gdb /usr/sbin/pcscd
(gdb) set args -dfa
(gdb) run

What do you mean by "fails to start" exactly

The problem occurs only the first time after boot?

Bye

2015-09-18 13:56 GMT+02:00 linux service <[hidden email]>:

> typo: second syslog file is:
>
> http://94.75.213.142/syslog2
>
>
>
>
>
> We are building oem pc's with *ubuntu 15.04 oem installs
>
> We want to pre-install card service for belgian EID.
>
> But pcscd fails to start or segfault:
>
> Can only get to work if I add:
>
> service pcscd restart in /etc/rc.local
>
>
>
> /var/log/syslog without service pcscd in /etc/rc.local:
>
> http://94.75.213.142/syslog1
>
> info from pscd_scan:
>
> no readers present
>
>
>
>
>
> /var/log/syslog with service pcscd in /etc/rc.local:
>
> This works, even unplug+plugin cardreader
>
> http://94.75.213.142/syslog2
>
>
>
> info:
>
> ubu@ubu-System-Product-Name:~/Bureaublad$ pcsc_scan
>
> PC/SC device scanner
>
> V 1.4.23 (c) 2001-2011, Ludovic Rousseau <[hidden email]>
>
> Compiled with PC/SC lite version: 1.8.11
>
> Using reader plug'n play mechanism
>
> Scanning present readers...
>
> 0: VASCO DP905v1.1 00 00
>
>
>
> Fri Sep 18 13:28:17 2015
>
> Reader 0: VASCO DP905v1.1 00 00
>
> Card state: Card removed,
>
>
> _______________________________________________
> Pcsclite-muscle mailing list
> [hidden email]
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle



--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

linux service

Will do.

 

Here are log if I unplug and plug in the reader.

The lights on the reader lights up for 3 seconds only.

Sep 18 14:29:39 ubu-System-Product-Name kernel: [ 2710.873035] pcscd[1704]: segfault at 7f4217fb712c ip 00007f4217fb712c sp 00007f4217fa6ed0 error 14 in libgcc_s.so.1[7f42181c8000+16000]

Sep 18 14:29:39 ubu-System-Product-Name systemd[1]: pcscd.service: main process exited, code=killed, status=11/SEGV

Sep 18 14:29:39 ubu-System-Product-Name systemd[1]: Unit pcscd.service entered failed state.

Sep 18 14:29:39 ubu-System-Product-Name systemd[1]: pcscd.service failed.

 

 

Op vrijdag 18 september 2015 14:26:29 schreef Ludovic Rousseau:

> Hello,

>

> Can you run pcscd inside gdb to generate a backtrace of the crash?

> Use something like:

> $ gdb /usr/sbin/pcscd

> (gdb) set args -dfa

> (gdb) run

>

> What do you mean by "fails to start" exactly

>

> The problem occurs only the first time after boot?

>

> Bye

>

> 2015-09-18 13:56 GMT+02:00 linux service <[hidden email]>:

> > typo: second syslog file is:

> >

> > http://94.75.213.142/syslog2

> >

> >

> >

> >

> >

> > We are building oem pc's with *ubuntu 15.04 oem installs

> >

> > We want to pre-install card service for belgian EID.

> >

> > But pcscd fails to start or segfault:

> >

> > Can only get to work if I add:

> >

> > service pcscd restart in /etc/rc.local

> >

> >

> >

> > /var/log/syslog without service pcscd in /etc/rc.local:

> >

> > http://94.75.213.142/syslog1

> >

> > info from pscd_scan:

> >

> > no readers present

> >

> >

> >

> >

> >

> > /var/log/syslog with service pcscd in /etc/rc.local:

> >

> > This works, even unplug+plugin cardreader

> >

> > http://94.75.213.142/syslog2

> >

> >

> >

> > info:

> >

> > ubu@ubu-System-Product-Name:~/Bureaublad$ pcsc_scan

> >

> > PC/SC device scanner

> >

> > V 1.4.23 (c) 2001-2011, Ludovic Rousseau <[hidden email]>

> >

> > Compiled with PC/SC lite version: 1.8.11

> >

> > Using reader plug'n play mechanism

> >

> > Scanning present readers...

> >

> > 0: VASCO DP905v1.1 00 00

> >

> >

> >

> > Fri Sep 18 13:28:17 2015

> >

> > Reader 0: VASCO DP905v1.1 00 00

> >

> > Card state: Card removed,

> >

> >

> > _______________________________________________

> > Pcsclite-muscle mailing list

> > [hidden email]

> > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle

>

>

>

>

 


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

linux service
In reply to this post by Ludovic Rousseau

hopefully ok:

 

http://94.75.213.142/gdb

 

 

Op vrijdag 18 september 2015 14:26:29 schreef Ludovic Rousseau:

> Hello,

>

> Can you run pcscd inside gdb to generate a backtrace of the crash?

> Use something like:

> $ gdb /usr/sbin/pcscd

> (gdb) set args -dfa

> (gdb) run

>

> What do you mean by "fails to start" exactly

>

> The problem occurs only the first time after boot?

>

> Bye

>

> 2015-09-18 13:56 GMT+02:00 linux service <[hidden email]>:

> > typo: second syslog file is:

> >

> > http://94.75.213.142/syslog2

> >

> >

> >

> >

> >

> > We are building oem pc's with *ubuntu 15.04 oem installs

> >

> > We want to pre-install card service for belgian EID.

> >

> > But pcscd fails to start or segfault:

> >

> > Can only get to work if I add:

> >

> > service pcscd restart in /etc/rc.local

> >

> >

> >

> > /var/log/syslog without service pcscd in /etc/rc.local:

> >

> > http://94.75.213.142/syslog1

> >

> > info from pscd_scan:

> >

> > no readers present

> >

> >

> >

> >

> >

> > /var/log/syslog with service pcscd in /etc/rc.local:

> >

> > This works, even unplug+plugin cardreader

> >

> > http://94.75.213.142/syslog2

> >

> >

> >

> > info:

> >

> > ubu@ubu-System-Product-Name:~/Bureaublad$ pcsc_scan

> >

> > PC/SC device scanner

> >

> > V 1.4.23 (c) 2001-2011, Ludovic Rousseau <[hidden email]>

> >

> > Compiled with PC/SC lite version: 1.8.11

> >

> > Using reader plug'n play mechanism

> >

> > Scanning present readers...

> >

> > 0: VASCO DP905v1.1 00 00

> >

> >

> >

> > Fri Sep 18 13:28:17 2015

> >

> > Reader 0: VASCO DP905v1.1 00 00

> >

> > Card state: Card removed,

> >

> >

> > _______________________________________________

> > Pcsclite-muscle mailing list

> > [hidden email]

> > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle

>

>

>

>

 


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

Ludovic Rousseau
2015-09-18 14:46 GMT+02:00 linux service <[hidden email]>:
> hopefully ok:
>
>
>
> http://94.75.213.142/gdb

03113241 ccid_usb.c:798:ReadUSB() read failed (4/4): -7 Resource
temporarily unavailable
05000802 ccid_usb.c:759:WriteUSB() write failed (4/4): -7 Resource
temporarily unavailable
05000884 ccid_usb.c:759:WriteUSB() write failed (4/4): -7 Resource
temporarily unavailable
00000023 ifdhandler.c:171:CreateChannelByNameOrChannel() failed
00000017 readerfactory.c:1046:RFInitializeReader() Open Port 0x200000
Failed (usb:1a44/0001:libudev:0:/dev/bus/usb/004/004)
00000009 readerfactory.c:338:RFAddReader() VASCO DP905v1.1 init failed.

The reader can't be used.
Maybe another pcscd is running?

Also please follow http://pcsclite.alioth.debian.org/pcsclite.html#support

Bye

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

linux service

After boot, ps aux | grep pcscd

gives nothing,,

 

http://94.75.213.142/ps

 

maybe another program service?

 

Op vrijdag 18 september 2015 15:27:10 schreef Ludovic Rousseau:

> 2015-09-18 14:46 GMT+02:00 linux service <[hidden email]>:

> > hopefully ok:

> >

> >

> >

> > http://94.75.213.142/gdb

>

> 03113241 ccid_usb.c:798:ReadUSB() read failed (4/4): -7 Resource

> temporarily unavailable

> 05000802 ccid_usb.c:759:WriteUSB() write failed (4/4): -7 Resource

> temporarily unavailable

> 05000884 ccid_usb.c:759:WriteUSB() write failed (4/4): -7 Resource

> temporarily unavailable

> 00000023 ifdhandler.c:171:CreateChannelByNameOrChannel() failed

> 00000017 readerfactory.c:1046:RFInitializeReader() Open Port 0x200000

> Failed (usb:1a44/0001:libudev:0:/dev/bus/usb/004/004)

> 00000009 readerfactory.c:338:RFAddReader() VASCO DP905v1.1 init failed.

>

> The reader can't be used.

> Maybe another pcscd is running?

>

> Also please follow http://pcsclite.alioth.debian.org/pcsclite.html#support

>

> Bye

>

>

 


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

linux service
In reply to this post by Ludovic Rousseau

Error occurs on different( all )computers

 

 

Op vrijdag 18 september 2015 15:27:10 schreef Ludovic Rousseau:

> 2015-09-18 14:46 GMT+02:00 linux service <[hidden email]>:

> > hopefully ok:

> >

> >

> >

> > http://94.75.213.142/gdb

>

> 03113241 ccid_usb.c:798:ReadUSB() read failed (4/4): -7 Resource

> temporarily unavailable

> 05000802 ccid_usb.c:759:WriteUSB() write failed (4/4): -7 Resource

> temporarily unavailable

> 05000884 ccid_usb.c:759:WriteUSB() write failed (4/4): -7 Resource

> temporarily unavailable

> 00000023 ifdhandler.c:171:CreateChannelByNameOrChannel() failed

> 00000017 readerfactory.c:1046:RFInitializeReader() Open Port 0x200000

> Failed (usb:1a44/0001:libudev:0:/dev/bus/usb/004/004)

> 00000009 readerfactory.c:338:RFAddReader() VASCO DP905v1.1 init failed.

>

> The reader can't be used.

> Maybe another pcscd is running?

>

> Also please follow http://pcsclite.alioth.debian.org/pcsclite.html#support

>

> Bye

>

>

 


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

linux service
In reply to this post by Ludovic Rousseau

Here a syslog of an boot, than sudo pcscd restart and plug out and plugin of the reader.

After that de reader is usable

 

http://94.75.213.142/syslog3

 

 

Op vrijdag 18 september 2015 15:27:10 schreef Ludovic Rousseau:

> 2015-09-18 14:46 GMT+02:00 linux service <[hidden email]>:

> > hopefully ok:

> >

> >

> >

> > http://94.75.213.142/gdb

>

> 03113241 ccid_usb.c:798:ReadUSB() read failed (4/4): -7 Resource

> temporarily unavailable

> 05000802 ccid_usb.c:759:WriteUSB() write failed (4/4): -7 Resource

> temporarily unavailable

> 05000884 ccid_usb.c:759:WriteUSB() write failed (4/4): -7 Resource

> temporarily unavailable

> 00000023 ifdhandler.c:171:CreateChannelByNameOrChannel() failed

> 00000017 readerfactory.c:1046:RFInitializeReader() Open Port 0x200000

> Failed (usb:1a44/0001:libudev:0:/dev/bus/usb/004/004)

> 00000009 readerfactory.c:338:RFAddReader() VASCO DP905v1.1 init failed.

>

> The reader can't be used.

> Maybe another pcscd is running?

>

> Also please follow http://pcsclite.alioth.debian.org/pcsclite.html#support

>

> Bye

>

>

 


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

linux service

One step to track down the error:

if I start ubuntu with upstart (grub advanced options), all is ok.

The reader is working ok.

 

 

Op vrijdag 18 september 2015 16:10:01 schreef linux service:

> Here a syslog of an boot, than sudo pcscd restart and plug out and plugin of the reader.

> After that de reader is usable

>

> http://94.75.213.142/syslog3

>

>

> Op vrijdag 18 september 2015 15:27:10 schreef Ludovic Rousseau:

> > 2015-09-18 14:46 GMT+02:00 linux service <[hidden email]>:

> > > hopefully ok:

> > >

> > >

> > >

> > > http://94.75.213.142/gdb

> >

> > 03113241 ccid_usb.c:798:ReadUSB() read failed (4/4): -7 Resource

> > temporarily unavailable

> > 05000802 ccid_usb.c:759:WriteUSB() write failed (4/4): -7 Resource

> > temporarily unavailable

> > 05000884 ccid_usb.c:759:WriteUSB() write failed (4/4): -7 Resource

> > temporarily unavailable

> > 00000023 ifdhandler.c:171:CreateChannelByNameOrChannel() failed

> > 00000017 readerfactory.c:1046:RFInitializeReader() Open Port 0x200000

> > Failed (usb:1a44/0001:libudev:0:/dev/bus/usb/004/004)

> > 00000009 readerfactory.c:338:RFAddReader() VASCO DP905v1.1 init failed.

> >

> > The reader can't be used.

> > Maybe another pcscd is running?

> >

> > Also please follow http://pcsclite.alioth.debian.org/pcsclite.html#support

> >

> > Bye

> >

> >

>

 


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

Ludovic Rousseau
2015-09-18 16:23 GMT+02:00 linux service <[hidden email]>:
> One step to track down the error:
>
> if I start ubuntu with upstart (grub advanced options), all is ok.
>
> The reader is working ok.

So just use upstart.

Maybe the integration of pcsc-lite with systemd is bogus on Ubuntu.

Bye

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

linux service

Exact Same error in Debian Jessie.

 

 

guy

 

 

Op vrijdag 18 september 2015 16:44:57 schreef Ludovic Rousseau:

> 2015-09-18 16:23 GMT+02:00 linux service <[hidden email]>:

> > One step to track down the error:

> >

> > if I start ubuntu with upstart (grub advanced options), all is ok.

> >

> > The reader is working ok.

>

> So just use upstart.

>

> Maybe the integration of pcsc-lite with systemd is bogus on Ubuntu.

>

> Bye

>

>

 


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

Ludovic Rousseau
2015-09-18 17:16 GMT+02:00 linux service <[hidden email]>:
> Exact Same error in Debian Jessie.

This is not really helpful.
Without a debug trace I can't do much.

Edit the file /lib/systemd/system/pcscd.service and replace the line:
ExecStart=/usr/sbin/pcscd --foreground --auto-exit
by
ExecStart=/usr/sbin/pcscd --foreground --auto-exit --debug

Edit the file /etc/libccid_Info.plist and change the lines:
    <key>ifdLogLevel</key>
    <string>0x0003</string>
in
    <key>ifdLogLevel</key>
    <string>0x000f</string>

Then reboot the computer and try to use the smart card reader.
You should get some pcscd logs in /var/log/daemon.log. Send them.

Bye

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

linux service

changes applied

 

 

daemon log:

http://94.75.213.142/deamon

 

syslog, pcscd not working:

http://94.75.213.142/syslog5

 

syslog after service pcscd restart and unplu/plugin reader (working)

http://94.75.213.142/syslog6

 

 

 

 

Op vrijdag 18 september 2015 18:29:19 schreef Ludovic Rousseau:

> 2015-09-18 17:16 GMT+02:00 linux service <[hidden email]>:

> > Exact Same error in Debian Jessie.

>

> This is not really helpful.

> Without a debug trace I can't do much.

>

> Edit the file /lib/systemd/system/pcscd.service and replace the line:

> ExecStart=/usr/sbin/pcscd --foreground --auto-exit

> by

> ExecStart=/usr/sbin/pcscd --foreground --auto-exit --debug

>

> Edit the file /etc/libccid_Info.plist and change the lines:

> <key>ifdLogLevel</key>

> <string>0x0003</string>

> in

> <key>ifdLogLevel</key>

> <string>0x000f</string>

>

> Then reboot the computer and try to use the smart card reader.

> You should get some pcscd logs in /var/log/daemon.log. Send them.

>

> Bye

>

>

 


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

linux service

after boot:

systemctl status pcscd.service

is loaded but not active (dead)

 

 

Op vrijdag 18 september 2015 18:54:02 schreef linux service:

> changes applied

>

>

> daemon log:

> http://94.75.213.142/deamon

>

> syslog, pcscd not working:

> http://94.75.213.142/syslog5

>

> syslog after service pcscd restart and unplu/plugin reader (working)

> http://94.75.213.142/syslog6

>

>

>

>

> Op vrijdag 18 september 2015 18:29:19 schreef Ludovic Rousseau:

> > 2015-09-18 17:16 GMT+02:00 linux service <[hidden email]>:

> > > Exact Same error in Debian Jessie.

> >

> > This is not really helpful.

> > Without a debug trace I can't do much.

> >

> > Edit the file /lib/systemd/system/pcscd.service and replace the line:

> > ExecStart=/usr/sbin/pcscd --foreground --auto-exit

> > by

> > ExecStart=/usr/sbin/pcscd --foreground --auto-exit --debug

> >

> > Edit the file /etc/libccid_Info.plist and change the lines:

> > <key>ifdLogLevel</key>

> > <string>0x0003</string>

> > in

> > <key>ifdLogLevel</key>

> > <string>0x000f</string>

> >

> > Then reboot the computer and try to use the smart card reader.

> > You should get some pcscd logs in /var/log/daemon.log. Send them.

> >

> > Bye

> >

> >

>

 


_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: pcscd segfaults

Ludovic Rousseau
In reply to this post by linux service
2015-09-18 18:54 GMT+02:00 linux service <[hidden email]>:
> changes applied
>

> syslog after service pcscd restart and unplu/plugin reader (working)
>
> http://94.75.213.142/syslog6

Sep 18 18:48:03 debian pcscd[1356]: 00000022 -> 000000 65 00 00 00 00
00 00 00 00 00
Sep 18 18:48:06 debian pcscd[1356]: 03001955 ccid_usb.c:798:ReadUSB()
read failed (4/3): -7 Resource temporarily unavailable
Sep 18 18:48:06 debian pcscd[1356]: 00000029 -> 000000 65 00 00 00 00
00 01 00 00 00
Sep 18 18:48:06 debian kernel: [  232.949503] usb 4-2: USB disconnect,
device number 3

Your reader failed to answer to a command. -7 is LIBUSB_ERROR_TIMEOUT
The timeout occurred 3 seconds after the command was sent. You should
wait a bit more before removing the reader. The same command is tried
3 times before declaring the reader can't be used. So you should wait
at least 10 seconds before unplugging the reader.

This occurred _before_ you removed the reader.

After replug the reader worked as expected.

I suspect a problem with your reader.

Bye

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle