public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "russell at shotover dot com" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug debuginfod/30589] New: debuginfod can't find sources even though they exist on disk
Date: Tue, 27 Jun 2023 00:21:18 +0000	[thread overview]
Message-ID: <bug-30589-10460@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 30589
           Summary: debuginfod can't find sources even though they exist
                    on disk
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: debuginfod
          Assignee: unassigned at sourceware dot org
          Reporter: russell at shotover dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

I'm trying to create a debuginfod server for our internal codebase, and would
like it to be able to serve correct sources, even for arbitrary old versions of
our software. We package as .deb, but the docs are pretty clear that that
doesn't support serving sources. So, I'm passing -ffile-prefix-map to where I
will eventually copy the sources, but debuginfod doesn't seem to want anything
to do with it:

```
echo 'int main() {}' > test.c
gcc -g -O0 test.c -Wl,--build-id=0xaaaaaaaaaabbbbbbbbbbccccccccccdddddddddd
-ffile-prefix-map=`pwd`=`pwd`/servefrom
mkdir servefrom
mv test.c a.out servefrom
rm ~/.debuginfod.sqlite
DEBUGINFOD_URLS="" debuginfod -F . -vvv
...
rm -rf ~/.cache/debuginfod_client
DEBUGINFOD_URLS="http://localhost:8002" debuginfod-find source
aaaaaaaaaabbbbbbbbbbccccccccccdddddddddd `pwd`/test.c
```
fails. Fetching the executable or debuginfo succeeds. 


The debuginfod log shows:

```
[Tue 27 Jun 2023 12:13:24 AM GMT] (496432/496443): 127.0.0.1:49688
UA:elfutils/0.189,Linux/x86_64,arch/ XFF: GET
/buildid/aaaaaaaaaabbbbbbbbbbccccccccccdddddddddd/source/tmp/asdf/servefrom/test.c
404 9 0+0ms
```


However, the same thing without the map works:

```
echo 'int main() {}' > test.c
gcc -g -O0 test.c -Wl,--build-id=0xaaaaaaaaaabbbbbbbbbbccccccccccdddddddddd
rm ~/.debuginfod.sqlite
DEBUGINFOD_URLS="" debuginfod -F . -vvv
...
rm -rf ~/.cache/debuginfod_client
DEBUGINFOD_URLS="http://localhost:8002" debuginfod-find source
aaaaaaaaaabbbbbbbbbbccccccccccdddddddddd `pwd`/test.c
```

I must have some incorrect assumption about how -F mode finds source
files....it seems like what I'm doing should be supported

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

             reply	other threads:[~2023-06-27  0:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27  0:21 russell at shotover dot com [this message]
2023-06-27  0:23 ` [Bug debuginfod/30589] " russell at shotover dot com
2023-06-27  0:52 ` fche at redhat dot com
2023-06-27  2:20 ` russell at shotover dot com
2023-06-27  4:33 ` russell at shotover dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-30589-10460@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).