libunwind-devel
[Top][All Lists]
Advanced

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

Re: [Libunwind-devel] UNW_EINVAL stepping past _L_lock_686 in pthread_mu


From: Arun Sharma
Subject: Re: [Libunwind-devel] UNW_EINVAL stepping past _L_lock_686 in pthread_mutex_lock
Date: Sat, 20 Sep 2014 19:51:28 +0530

[ Cc'ing a few more people who may be more familiar than me with
what's going on ]

On Wed, Sep 17, 2014 at 10:05 AM, Masatake YAMATO <address@hidden> wrote:

> To decode the stack when the pc in vdso, kernel must prepare information
> how the vdso code uses the stack and libunwind has ability to use the
> information.
>

Previous threads on this topic:
http://lists.nongnu.org/archive/html/libunwind-devel/2010-04/msg00051.html

If dl_iterate_phdr() returned vDSO, I think libunwind will just work.
However, a recent commit linked to:

https://sourceware.org/bugzilla/show_bug.cgi?id=16046

removed the vdso from user visible API. Try running the test program
in the bug above to verify.

We'll need a special code such as:
https://lkml.org/lkml/2012/9/10/422

to discover the vDSO and find the unwind info.

I ran Jared's test program on git head as of today and it passes for
me 100% of the time (I ran it 10 times). This was on ubuntu 13.10.

If you want to debug this further:

1. Turn off address space randomization
2 . $ ldd you-binary # write down the address of linux-vdso.so.1
3. Run with UNW_DEBUG_LEVEL=xx

Look for "checking <path> base=address" Debug(15, ..) from
dwarf_callback. If you see an IP that falls in the vdso range, but
don't see a corresponding debug message in dwarf_callback, libunwind
couldn't find vDSO unwind info.

 -Arun



reply via email to

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