All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Issue with pthread_mutex_lock with external toolchain
@ 2011-06-22  7:00 Dwi Sasongko Supriyadi
  2011-06-22 14:09 ` Dwi Sasongko Supriyadi
  0 siblings, 1 reply; 5+ messages in thread
From: Dwi Sasongko Supriyadi @ 2011-06-22  7:00 UTC (permalink / raw)
  To: buildroot

Hello list,

I am testing pcscd of pcsc-lite and I got segmentation fault, following is
the gdb backtrace:

# gdb /usr/sbin/pcscd
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-unknown-linux-gnueabi"...
(no debugging symbols found)
(gdb) run --foreground --debug --apdu
Starting program: /usr/sbin/pcscd --foreground --debug --apdu
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
debuglog.c:277:DebugLogSetLevel() debug level=debug
debuglog.c:306:DebugLogSetCategory() Debug options: APDU
pcscdaemon.c:550:main() pcsc-lite 1.7.2 daemon ready.
[New LWP 1183]

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 1183]
0x400624e8 in pthread_mutex_lock () from /lib/libpthread.so.0
(gdb)


Has anyone faced the same issue in the past and came up with solution?

Many thanks in advance



--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110622/ca0f85fc/attachment.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] Issue with pthread_mutex_lock with external toolchain
  2011-06-22  7:00 [Buildroot] Issue with pthread_mutex_lock with external toolchain Dwi Sasongko Supriyadi
@ 2011-06-22 14:09 ` Dwi Sasongko Supriyadi
  2011-06-22 19:53   ` Daniel Nyström
  0 siblings, 1 reply; 5+ messages in thread
From: Dwi Sasongko Supriyadi @ 2011-06-22 14:09 UTC (permalink / raw)
  To: buildroot

On Wed, Jun 22, 2011 at 2:00 PM, Dwi Sasongko Supriyadi
<ruckuus@gmail.com>wrote:

> Hello list,
>
> I am testing pcscd of pcsc-lite and I got segmentation fault, following is
> the gdb backtrace:
>
> # gdb /usr/sbin/pcscd
> GNU gdb 6.8
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "arm-unknown-linux-gnueabi"...
> (no debugging symbols found)
> (gdb) run --foreground --debug --apdu
> Starting program: /usr/sbin/pcscd --foreground --debug --apdu
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> debuglog.c:277:DebugLogSetLevel() debug level=debug
> debuglog.c:306:DebugLogSetCategory() Debug options: APDU
> pcscdaemon.c:550:main() pcsc-lite 1.7.2 daemon ready.
> [New LWP 1183]
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to LWP 1183]
> 0x400624e8 in pthread_mutex_lock () from /lib/libpthread.so.0
> (gdb)
>
>
> Has anyone faced the same issue in the past and came up with solution?
>
>
I felt that my previous message doesn't have any detail info. Sorry for
that.

Herewith I came back with better info

1. PCSC-lite support patch is on the way, I will submit once the testing
completed, I would love to share with anyone who interested in
2. Buildroot version: buildroot-2011.02 from git
3. External toolchain from Code Sourcery 2010.09
4. Running kernel on the target linux-2.6.28.6

I also tried to rebuild everything using buildroot toolchain with linux
headers 2.6.37.2, but there is no change.

I suspect that the root cause is the running kernel on the target taking
into account using different toolchain (and different pthread library) there
is no difference.

I really appreciate any feedback/suggestion from all of you.

Thanks in advance,








--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110622/14a787f6/attachment.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] Issue with pthread_mutex_lock with external toolchain
  2011-06-22 14:09 ` Dwi Sasongko Supriyadi
@ 2011-06-22 19:53   ` Daniel Nyström
  2011-06-23  4:19     ` Dwi Sasongko Supriyadi
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Nyström @ 2011-06-22 19:53 UTC (permalink / raw)
  To: buildroot

2011/6/22 Dwi Sasongko Supriyadi <ruckuus@gmail.com>:
> 3. External toolchain from Code Sourcery 2010.09

pthread_mutex_lock is part of libc which itself is part of the
external toolchain package. Maybe try getting in contact with
CodeSourcery?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] Issue with pthread_mutex_lock with external toolchain
  2011-06-22 19:53   ` Daniel Nyström
@ 2011-06-23  4:19     ` Dwi Sasongko Supriyadi
  2011-07-03 16:59       ` Dwi Sasongko Supriyadi
  0 siblings, 1 reply; 5+ messages in thread
From: Dwi Sasongko Supriyadi @ 2011-06-23  4:19 UTC (permalink / raw)
  To: buildroot

2011/6/23 Daniel Nystr?m <daniel.nystrom@timeterminal.se>

> 2011/6/22 Dwi Sasongko Supriyadi <ruckuus@gmail.com>:
> > 3. External toolchain from Code Sourcery 2010.09
>
> pthread_mutex_lock is part of libc which itself is part of the
> external toolchain package. Maybe try getting in contact with
> CodeSourcery?
>

Agreed, libpthread.so and also libthread_db.so are part of the external
toolchain, I also tried to test with buildroot toolchain and there is no
difference.

Thanks for your response

--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110623/425cf400/attachment.html>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] Issue with pthread_mutex_lock with external toolchain
  2011-06-23  4:19     ` Dwi Sasongko Supriyadi
@ 2011-07-03 16:59       ` Dwi Sasongko Supriyadi
  0 siblings, 0 replies; 5+ messages in thread
From: Dwi Sasongko Supriyadi @ 2011-07-03 16:59 UTC (permalink / raw)
  To: buildroot

2011/6/23 Dwi Sasongko Supriyadi <ruckuus@gmail.com>:
>
>
> 2011/6/23 Daniel Nystr?m <daniel.nystrom@timeterminal.se>
>>
>> 2011/6/22 Dwi Sasongko Supriyadi <ruckuus@gmail.com>:
>> > 3. External toolchain from Code Sourcery 2010.09
>>
>> pthread_mutex_lock is part of libc which itself is part of the
>> external toolchain package. Maybe try getting in contact with
>> CodeSourcery?
>
> Agreed, libpthread.so and also libthread_db.so are part of the external
> toolchain, I also tried to test with buildroot toolchain and there is no
> difference.
>

I have tried to rebuild everything with debugging support and here is the log:

 gdb /usr/sbin/pcscd
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-unknown-linux-gnueabi"...
(gdb) run --foreground --debug --apdu
Starting program: /usr/sbin/pcscd --foreground --debug --apdu
[Thread debugging using libthread_db enabled]
debuglog.c:277:DebugLogSetLevel() debug level=debug
debuglog.c:306:DebugLogSetCategory() Debug options: APDU
pcscdaemon.c:550:main() pcsc-lite 1.7.2 daemon ready.
[New Thread 0x4001a000 (LWP 147)]
[New Thread 0x40a8e470 (LWP 150)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x40a8e470 (LWP 150)]
0x401304e8 in pthread_mutex_lock () from /lib/libpthread.so.0
(gdb) info threads
* 2 Thread 0x40a8e470 (LWP 150)  0x401304e8 in pthread_mutex_lock ()
  from /lib/libpthread.so.0
 1 Thread 0x4001a000 (LWP 147)  0x40136e64 in read ()
  from /lib/libpthread.so.0
(gdb) bt 20
#0  0x401304e8 in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0x40103e60 in usbi_get_device_by_session_id (ctx=0x0, session_id=257)
   at core.c:560
#2  0x4010962c in enumerate_device (ctx=0x0, _discdevs=0x40a8dcd8,
   busnum=<value optimized out>, devaddr=<value optimized out>,
   sysfs_dir=0x351ed3 "usb1") at os/linux_usbfs.c:1393
#3  0x40109930 in sysfs_scan_device (ctx=0x0, _discdevs=0x40a8dcd8,
   devname=0x351ed3 "usb1", usbfs_fallback=<value optimized out>)
   at os/linux_usbfs.c:1393
#4  0x40109ba0 in op_get_device_list (ctx=0x0, _discdevs=0x40a8dd0c)
   at os/linux_usbfs.c:1393
#5  0x401040e4 in libusb_get_device_list (ctx=0x0, list=0x40a8dd9c)
   at core.c:644
#6  0x000149b4 in HPRescanUsbBus () at hotplug_libusb.c:166
#7  0x000157a8 in HPEstablishUSBNotifications (pipefd=0xbed94b44)
   at hotplug_libusb.c:166
#8  0x4012db60 in start_thread () from /lib/libpthread.so.0
#9  0x4021fc58 in clone () from /lib/libc.so.6
(gdb)

Frankly for the moment I have no clue where to start to find the cause
of this issue because I have lack of knowledge in debugging. I would
really appreciate any comment/help.

Thanks in advance

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-03 16:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-22  7:00 [Buildroot] Issue with pthread_mutex_lock with external toolchain Dwi Sasongko Supriyadi
2011-06-22 14:09 ` Dwi Sasongko Supriyadi
2011-06-22 19:53   ` Daniel Nyström
2011-06-23  4:19     ` Dwi Sasongko Supriyadi
2011-07-03 16:59       ` Dwi Sasongko Supriyadi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.