[Ecls-list] Multi thread problem

Peter Enerccio enerccio at gmail.com
Thu Nov 1 20:31:51 UTC 2012


I tried your code with little modified makefile and I still get the same
segfault:

enerccio at G73Jh-Arch:~/tmp$ make
gcc main.c thread.c -lecl -o main -lpthread `ecl-config --ldflags`
`ecl-config --cflags`
enerccio at G73Jh-Arch:~/tmp$ ./main
Segmentation fault
enerccio at G73Jh-Arch:~/tmp$ gdb ./main
GNU gdb (GDB) 7.4.1
Copyright (C) 2012 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 "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /media/home/home/enerccio/tmp/
main...(no debugging symbols found)...done.
(gdb) start
Temporary breakpoint 1 at 0x400a1d
Starting program: /media/home/home/enerccio/tmp/main
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

Temporary breakpoint 1, 0x0000000000400a1d in main ()
(gdb) continue
Continuing.
[New Thread 0x7ffff6920700 (LWP 19100)]
[New Thread 0x7ffff611f700 (LWP 19101)]
[New Thread 0x7ffff591e700 (LWP 19102)]
[New Thread 0x7ffff511d700 (LWP 19103)]
[New Thread 0x7ffff491c700 (LWP 19104)]
[New Thread 0x7ffff411b700 (LWP 19105)]
[New Thread 0x7ffff391a700 (LWP 19106)]
[New Thread 0x7ffff3119700 (LWP 19107)]
[New Thread 0x7ffff2918700 (LWP 19108)]
[New Thread 0x7ffff2117700 (LWP 19109)]
[New Thread 0x7ffff1916700 (LWP 19110)]
[New Thread 0x7ffff1115700 (LWP 19111)]
[New Thread 0x7ffff0914700 (LWP 19112)]
[New Thread 0x7ffff0113700 (LWP 19113)]
[New Thread 0x7fffef912700 (LWP 19114)]
[New Thread 0x7fffef111700 (LWP 19115)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff3119700 (LWP 19107)]
0x00007ffff72d596a in __dcigettext () from /lib/libc.so.6
(gdb) bt -50
#99765 0x00007ffff7a02935 in ecl_alloc_object () from
/usr/lib/libecl.so.12.7
#99766 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()
   from /usr/lib/libecl.so.12.7
#99767 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7
#99768 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7
#99769 0x00007ffff7a02935 in ecl_alloc_object () from
/usr/lib/libecl.so.12.7
#99770 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()
   from /usr/lib/libecl.so.12.7
#99771 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7
#99772 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7
#99773 0x00007ffff7a02935 in ecl_alloc_object () from
/usr/lib/libecl.so.12.7
#99774 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()
   from /usr/lib/libecl.so.12.7
#99775 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7
#99776 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7
#99777 0x00007ffff7a02935 in ecl_alloc_object () from
/usr/lib/libecl.so.12.7
#99778 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()
   from /usr/lib/libecl.so.12.7
#99779 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7
#99780 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7
---Type <return> to continue, or q <return> to quit---
#99781 0x00007ffff7a02935 in ecl_alloc_object () from
/usr/lib/libecl.so.12.7
#99782 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()
   from /usr/lib/libecl.so.12.7
#99783 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7
#99784 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7
#99785 0x00007ffff7a02935 in ecl_alloc_object () from
/usr/lib/libecl.so.12.7
#99786 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()
   from /usr/lib/libecl.so.12.7
#99787 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7
#99788 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7
#99789 0x00007ffff7a02935 in ecl_alloc_object () from
/usr/lib/libecl.so.12.7
#99790 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()
   from /usr/lib/libecl.so.12.7
#99791 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7
#99792 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7
#99793 0x00007ffff7a02935 in ecl_alloc_object () from
/usr/lib/libecl.so.12.7
#99794 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()
   from /usr/lib/libecl.so.12.7
#99795 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7
#99796 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7
---Type <return> to continue, or q <return> to quit---
#99797 0x00007ffff7a02935 in ecl_alloc_object () from
/usr/lib/libecl.so.12.7
#99798 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()
   from /usr/lib/libecl.so.12.7
#99799 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7
#99800 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7
#99801 0x00007ffff7a02935 in ecl_alloc_object () from
/usr/lib/libecl.so.12.7
#99802 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()
   from /usr/lib/libecl.so.12.7
#99803 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7
#99804 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7
#99805 0x00007ffff7a02935 in ecl_alloc_object () from
/usr/lib/libecl.so.12.7
#99806 0x00007ffff79c0cd3 in ecl_make_simple_base_string ()
   from /usr/lib/libecl.so.12.7
#99807 0x00007ffff79bfed1 in FElibc_error () from /usr/lib/libecl.so.12.7
#99808 0x00007ffff79fea37 in ecl_process_env () from /usr/lib/libecl.so.12.7
#99809 0x00007ffff7a02935 in ecl_alloc_object () from
/usr/lib/libecl.so.12.7
#99810 0x00007ffff79ff088 in ?? () from /usr/lib/libecl.so.12.7
#99811 0x00007ffff79ff21a in ecl_import_current_thread ()
   from /usr/lib/libecl.so.12.7
#99812 0x00000000004009d7 in foo ()
---Type <return> to continue, or q <return> to quit---
#99813 0x00007ffff7652e0f in start_thread () from /lib/libpthread.so.0
#99814 0x00007ffff738a04d in clone () from /lib/libc.so.6
(gdb)


2012/10/31 Juan Jose Garcia-Ripoll <juanjose.garciaripoll at gmail.com>

> On Wed, Oct 3, 2012 at 2:57 PM, Stanislav Frolov <frolosofsky at gmail.com>wrote:
>
>> Hi and thanks for the fix. Previous example works fine but my problems
>> continue. Now I try use ECL with third-party thread abstraction (where gc
>> macro cant replace thread calls). The following example illustrates the
>> bug:
>
>
> Fixed in ECL. I had misunderstood how the thread registration works. The
> attached example, which is basically yours plus formatting, works great
> with 128 threads and more.
>
> Juanjo
>
> --
> Instituto de Física Fundamental, CSIC
> c/ Serrano, 113b, Madrid 28006 (Spain)
> http://juanjose.garciaripoll.googlepages.com
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
>
>


-- 
Bc. Peter Vaňušanik
http://www.bishojo.tk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20121101/cf67e37e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 141 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20121101/cf67e37e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thread.c
Type: text/x-csrc
Size: 183 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20121101/cf67e37e/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c
Type: text/x-csrc
Size: 604 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20121101/cf67e37e/attachment-0001.c>


More information about the ecl-devel mailing list