public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug backends/21541] New: eu-readelf --notes fails to dump PRSTATUS data?
@ 2017-06-02 12:43 myocytebd at sina dot com
  2017-06-02 13:09 ` [Bug backends/21541] " mark at klomp dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: myocytebd at sina dot com @ 2017-06-02 12:43 UTC (permalink / raw)
  To: elfutils-devel

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

            Bug ID: 21541
           Summary: eu-readelf --notes fails to dump PRSTATUS data?
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: backends
          Assignee: unassigned at sourceware dot org
          Reporter: myocytebd at sina dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 10081
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10081&action=edit
The core file mentioned

Version: latest master
         I built elfutils with --prefix with a non-default path.
         Native build on x64.

Problem: Run eu-readelf --notes core.dump
         The core-dump is generated from a x64 program.
         A. The one I built cannot dump details PRSTATUS data.
         B. On another machine, distribution shipped elfutils-0.158 dumps 
            details of PRSTATUS data for the same core-dump.

I have no glue where it is wrong. (Or the core file is broken?)
There seems to be no relevant configure options.
At runtime eu-readelf doesn't tell why it does not dump details of PRSTATUS.

config report:
=====================================================================
        elfutils: 0.169 (eu_version: 169)
=====================================================================

    Prefix                             : /home/xxx/ins
    Program prefix ("eu-" recommended) : eu-
    Source code location               : .
    Maintainer mode                    : 
    libebl modules subdirectory        : elfutils
    build arch                         : x86_64-unknown-linux-gnu

  RECOMMENDED FEATURES (should all be yes)
    gzip support                       : yes
    bzip2 support                      : yes
    lzma/xz support                    : yes
    libstdc++ demangle support         : yes
    File textrel check                 : yes
    Symbol versioning                  : yes

  NOT RECOMMENDED FEATURES (should all be no)
    Experimental thread safety         : no

  OTHER FEATURES
    Deterministic archives by default  : false
    Native language support            : yes

  EXTRA TEST FEATURES (used with make check)
    have bunzip2 installed (required)  : yes
    debug branch prediction            : no
    gprof support                      : no
    gcov support                       : no
    run all tests under valgrind       : no
    gcc undefined behaviour sanitizer  : no
    use rpath in tests                 : no
    test biarch                        : no

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug backends/21541] eu-readelf --notes fails to dump PRSTATUS data?
  2017-06-02 12:43 [Bug backends/21541] New: eu-readelf --notes fails to dump PRSTATUS data? myocytebd at sina dot com
@ 2017-06-02 13:09 ` mark at klomp dot org
  2017-06-02 13:18 ` myocytebd at sina dot com
  2017-06-13 16:12 ` [Bug backends/21541] No error handling for missing backends mark at klomp dot org
  2 siblings, 0 replies; 4+ messages in thread
From: mark at klomp dot org @ 2017-06-02 13:09 UTC (permalink / raw)
  To: elfutils-devel

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

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at klomp dot org

--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
Since you are installing in a non-standard location make sure PATH and
LD_LIBRARY_PATH are setup correctly so the correct version of the binaries,
libraries and backends are picked up.

In your case it should probably be
export PATH=/home/xxx/ins/bin:$PATH
export LD_LIBRARY_PATH=/home/xxx/ins/lib:/home/xxx/ins/lib/elfutils

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug backends/21541] eu-readelf --notes fails to dump PRSTATUS data?
  2017-06-02 12:43 [Bug backends/21541] New: eu-readelf --notes fails to dump PRSTATUS data? myocytebd at sina dot com
  2017-06-02 13:09 ` [Bug backends/21541] " mark at klomp dot org
@ 2017-06-02 13:18 ` myocytebd at sina dot com
  2017-06-13 16:12 ` [Bug backends/21541] No error handling for missing backends mark at klomp dot org
  2 siblings, 0 replies; 4+ messages in thread
From: myocytebd at sina dot com @ 2017-06-02 13:18 UTC (permalink / raw)
  To: elfutils-devel

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

--- Comment #2 from myocytebd at sina dot com ---
(In reply to Mark Wielaard from comment #1)
> Since you are installing in a non-standard location make sure PATH and
> LD_LIBRARY_PATH are setup correctly so the correct version of the binaries,
> libraries and backends are picked up.
> 
> In your case it should probably be
> export PATH=/home/xxx/ins/bin:$PATH
> export LD_LIBRARY_PATH=/home/xxx/ins/lib:/home/xxx/ins/lib/elfutils

I checked that it is using the correct libdw/libelf.
I patched rpath of eu-readelf(In reply to Mark Wielaard from comment #1)
> Since you are installing in a non-standard location make sure PATH and
> LD_LIBRARY_PATH are setup correctly so the correct version of the binaries,
> libraries and backends are picked up.
> 
> In your case it should probably be
> export PATH=/home/xxx/ins/bin:$PATH
> export LD_LIBRARY_PATH=/home/xxx/ins/lib:/home/xxx/ins/lib/elfutils

Thanks.
/home/xxx/ins/lib/elfutils => This is the problem.

I looked at: libebl/eblopenbackend.c,
and found openbackend() implementation surprising:
1. It doesn't try relative path from the executable.
2. It doesn't try the path from --prefix.
3. When it failed to load, it doesn't print any message.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

* [Bug backends/21541] No error handling for missing backends
  2017-06-02 12:43 [Bug backends/21541] New: eu-readelf --notes fails to dump PRSTATUS data? myocytebd at sina dot com
  2017-06-02 13:09 ` [Bug backends/21541] " mark at klomp dot org
  2017-06-02 13:18 ` myocytebd at sina dot com
@ 2017-06-13 16:12 ` mark at klomp dot org
  2 siblings, 0 replies; 4+ messages in thread
From: mark at klomp dot org @ 2017-06-13 16:12 UTC (permalink / raw)
  To: elfutils-devel

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

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|eu-readelf --notes fails to |No error handling for
                   |dump PRSTATUS data?         |missing backends

--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
(In reply to myocytebd from comment #2)
> I looked at: libebl/eblopenbackend.c,
> and found openbackend() implementation surprising:
> 1. It doesn't try relative path from the executable.
> 2. It doesn't try the path from --prefix.
> 3. When it failed to load, it doesn't print any message.

Yes, this has come up before and it is at least surprising to users.
Lets keep this bug open to add some error handling to the ebl backend loading
code so the tools can give at least a warning.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2017-06-12 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-02 12:43 [Bug backends/21541] New: eu-readelf --notes fails to dump PRSTATUS data? myocytebd at sina dot com
2017-06-02 13:09 ` [Bug backends/21541] " mark at klomp dot org
2017-06-02 13:18 ` myocytebd at sina dot com
2017-06-13 16:12 ` [Bug backends/21541] No error handling for missing backends mark at klomp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).