libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] using libunwind in signal handler for mult-thread


From: Hui Zhang
Subject: Re: [Libunwind-devel] using libunwind in signal handler for mult-thread program
Date: Tue, 1 Mar 2016 18:27:10 -0500

Hello, Milian

Oh, so nothing to do with the attachment "signature.asc", I thought that file should be used somehow...

I tried a few times, now the "without printf in handler version" does seem to "stall" instead of infinitely calling itself. There are two cases that program stalls(I'm using PAPI to generate the signal)

1. after start PAPI:
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /export/home/hzhang86/BForChapel/Dependencies/papi_5.2/lib/libpfm.so.4...done.
Loaded symbols for /export/home/hzhang86/BForChapel/Dependencies/papi_5.2/lib/libpfm.so.4
0x00007fd0a9165390 in __sigprocmask (how=<optimized out>, set=0x7fff043fe3d0, oset=0x0) at ../sysdeps/unix/sysv/linux/ia64/sigprocmask.c:43
43    ../sysdeps/unix/sysv/linux/ia64/sigprocmask.c: No such file or directory.
(gdb) bt
#0  0x00007fd0a9165390 in __sigprocmask (how=<optimized out>, set=0x7fff043fe3d0, oset=0x0) at ../sysdeps/unix/sysv/linux/ia64/sigprocmask.c:43
#1  0x00007fd0a9c716cd in put_rs_cache (saved_maskp=0x7fff043fe3d0, cache=<optimized out>, as=<optimized out>) at dwarf/Gparser.c:525
#2  _Ux86_64_dwarf_find_save_locs (c=0x7fff043fe8e8) at dwarf/Gparser.c:856
#3  0x00007fd0a9c72789 in _Ux86_64_dwarf_step (c=0x7fff043fe8e8) at dwarf/Gstep.c:35
#4  0x00007fd0a9c75cda in _Ux86_64_step (cursor=<optimized out>) at x86_64/Gstep.c:42
#5  0x0000000000563c00 in PAPIhandler_tmp (EventSet=0, address=0x7fd0aa0ab0f5, overflow_vector=1, context=0x7fff043fee40) at tasks-fifo.c:264
#6  0x00007fd0a9a2a03f in _papi_hwi_dispatch_overflow_signal (papiContext=0x7fff043fedf0, address=0x7fd0aa0ab0f5 "H\215:H\201", <incomplete sequence \354\200>,
    isHardware=<optimized out>, overflow_bit=<optimized out>, genOverflowBit=<optimized out>, t=<optimized out>, cidx=0) at extras.c:344
#7  0x00007fd0a9a35f82 in _pe_dispatch_timer (n=<optimized out>, info=<optimized out>, uc=<optimized out>) at components/perf_event/perf_event.c:1975
#8  <signal handler called>
#9  0x00007fd0aa0ab0f5 in _L_unlock_644 () from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007fd0aa0ab104 in _L_unlock_644 () from /lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007fd0aa0ab063 in __pthread_mutex_unlock_usercnt (mutex=<optimized out>, decr=<optimized out>) at pthread_mutex_unlock.c:52
#12 __pthread_mutex_unlock (mutex=0x7b1620) at pthread_mutex_unlock.c:290
#13 0x0000000000567275 in chpl_thread_mutexUnlock (mutex=0x7b1620) at threads-pthreads.c:108
#14 0x00000000005658eb in chpl_task_processTaskList (task_list=0x260e360) at tasks-fifo.c:862
#15 0x0000000000427e1d in chpl_taskListProcess (task_list=<optimized out>, _ln=<optimized out>, _fn=<optimized out>)
    at /export/home/hzhang86/chapel/chapel/modules/internal/localeModels/flat/LocaleModel.chpl:448
#16 0x0000000000506db3 in ApplyMaterialPropertiesForElems_chpl () at lulesh-parallel.chpl:1278
#17 0x000000000045bdd8 in chpl_user_main () at lulesh-parallel.chpl:292
#18 0x000000000045ba2b in chpl_gen_main (_arg=...) at lulesh-parallel.chpl:280
#19 0x000000000055f95a in chpl_executable_init () at chpl-init.c:313
#20 0x000000000056515f in chpl_task_callMain (chpl_main=0x55f790 <chpl_executable_init>) at tasks-fifo.c:669
#21 0x000000000055a05f in main (argc=3, argv=0x7fff04400e48) at main.c:32

2. stall after
stop PAPI:
0x00007fe060eeb148 in pthread_join (threadid=140601636415232, thread_return=0x0) at pthread_join.c:89
89    pthread_join.c: No such file or directory.
(gdb) bt
#0  0x00007fe060eeb148 in pthread_join (threadid=140601636415232, thread_return=0x0) at pthread_join.c:89
#1  0x0000000000567754 in chpl_thread_exit () at threads-pthreads.c:296
#2  0x000000000056513c in chpl_task_exit () at tasks-fifo.c:663
#3  0x000000000055fc5a in chpl_exit_common (status=0, all=1) at chplexit.c:42
#4  0x000000000055fbf8 in chpl_exit_all (status=0) at chplexit.c:52
#5  0x000000000055f6f3 in chpl_rt_finalize (return_value=0) at chpl-init.c:218
#6  0x000000000055a05b in main (argc=3, argv=0x7fffb97bac08) at main.c:36


Does it look like the same cause of your case ?
Thanks

On Tue, Mar 1, 2016 at 5:34 PM, Milian Wolff <address@hidden> wrote:
On Dienstag, 1. März 2016 17:33:18 CET Hui Zhang wrote:
> ​Hello, Milian
>
> How to attach a debugger with your file ? ​

ftp://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_22.html

> On Tue, Mar 1, 2016 at 4:56 PM, Milian Wolff <address@hidden> wrote:
> > On Dienstag, 1. März 2016 16:39:23 CET Hui Zhang wrote:
> > > hello, Milian
> > >
> > > Thank you !
> >
> > > This looks like a very particular issue with libunwind. But in my case:
> > 1.
> >
> > > I don't know if dl_iterate_phdr is used in my program. 2. My crash seems
> >
> > to
> >
> > > be non-termination(or keeping signalling itself), but deaklock shall
> >
> > appear
> >
> > > as permanently "pause" , right ?
> >
> > Attach a debugger, get a backtrace. What does it tell you?
> >
> > --
> > Milian Wolff
> > address@hidden
> > http://milianw.de


--
Milian Wolff
address@hidden
http://milianw.de



--
Best regards


Hui Zhang

reply via email to

[Prev in Thread] Current Thread [Next in Thread]