public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Adam Guderski <a.guderski@gmail.com>
To: David Smith <dsmith@redhat.com>, systemtap@sourceware.org
Subject: Re: Problem with vfs probe on Proxmox kernel
Date: Fri, 27 Jan 2017 02:04:00 -0000	[thread overview]
Message-ID: <c7a75230-f0b1-2d6e-72f6-0ef8d3d75f7b@gmail.com> (raw)
In-Reply-To: <ce3c76c8-da30-9c17-8abd-7e5e96f6c44c@redhat.com>

On 26/01/17 23:41, David Smith wrote:
> On 01/26/2017 03:51 PM, Adam Guderski wrote:
>> On 26/01/17 22:34, David Smith wrote:
>>> On 01/26/2017 03:26 PM, Adam Guderski wrote:
>>>
>>> ... stuff deleted ...
>>>
>>>>> Based on the paths stored when compiling your kernel, systemtap is
>>>>> looking for the vmlinux file in '/lib/modules/4.4.35-2-pve/build/'.
>>>>> Obviously it isn't there. Can you search around and see if you can find
>>>>> it and link it to its proper place?
>>>>
>>>> I can't find it (find / -type f -name '*vmlinux*'). When I compiled from
>>>> source, I noticed this lines in Makefile for Proxmox VE kernel:
>>>>
>>>> # strip debug info
>>>> find tmp/lib/modules -name \*.ko -print | while read f ; do strip
>>>> --strip-debug "$$f"; done
>>>>
>>>> I thought that when I comment this out my kernel will have debug info
>>>> compiled into it.
>>>
>>> That line you commented out is stripping debuginfo from kernel modules
>>> (*.ko), not the kernel itself.
>>>
>>>> Interestingly, the config file for my kernel says that
>>>> CONFIG_DEBUG_INFO is enabled:
>>>>
>>>> # grep  DEBUG_INFO /boot/config-4.4.35-2-pve
>>>> CONFIG_DEBUG_INFO=y
>>>> # CONFIG_DEBUG_INFO_REDUCED is not set
>>>> # CONFIG_DEBUG_INFO_SPLIT is not set
>>>> CONFIG_DEBUG_INFO_DWARF4=y
> 
> I doubt this will make a difference, but CONFIG_DEBUG_INFO_DWARF4 isn't
> usually set on the kernels we use. See
> <https://sourceware.org/systemtap/wiki/SystemTapWithSelfBuiltKernel>.
> 
>>> I'd guess you missed another line in the Proxmox kernel Makefile where
>>> it strips debuginfo from the kernel itself.
>>>
>>> What does "file" say on the kernel you built?
>>
>> It says:
>>
>> # file /boot/vmlinuz-4.4.35-2-pve
>> /boot/vmlinuz-4.4.35-2-pve: Linux kernel x86 boot executable bzImage,
>> version 4.4.35-2-pve (root@pve-test) #1 SMP Sun Jan 22 00:59:19 CET 201,
>> RO-rootFS, swap_dev 0x6, Normal VGA
>>
>> While looking for the vmlinux file, I found a script that (I think)
>> uncompresses a compressed kernel, so I did some testing:
>>
>> # /usr/src/linux-headers-4.4.35-2-pve/scripts/extract-vmlinux
>> /boot/vmlinuz-4.4.35-2-pve > vmlinux
>> # file vmlinux
>> vmlinux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically
>> linked, BuildID[sha1]=c23f97de3c8765073fbecf0b529383f1305c8e81, stripped
>>
>> So yes, this appears that the kernel I compiled is still stripped, so I
>> missed something, I'll give it another look but the documentation is
>> sparse and I don't see another strip command in it. If you wonder how
>> this Makefile looks like, it's here:
>> https://git.proxmox.com/?p=pve-kernel.git;a=blob_plain;f=Makefile;hb=HEAD
>>
>> Best regards and many thanks for your help.
> 
> I looked through that Makefile and I didn't see where the kernel gets
> stripped either. You are going to have to dig deeper to find where
> vmlinux gets deleted.
> 

I have found the vmlinux file - it was in directory
ubuntu-xenial/vmlinux (relative to root directory of Proxmox kernel
sources), and the reason I haven't found it earlier is because I ran
"make clean" some time earlier. Apparently, when I linked this file to
/lib/modules/4.4.35-2-pve/build/vmlinux, stap no longer complains when I
run scripts requiring vfs kernel probles.

David, I can't express how much you helped me, I thank you one more time
and wish you very best!

      reply	other threads:[~2017-01-27  2:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 22:44 Adam Guderski
2017-01-26  4:51 ` Arkady
2017-01-26 17:38 ` David Smith
2017-01-26 18:43   ` Adam Guderski
2017-01-26 19:05     ` David Smith
2017-01-26 21:27       ` Adam Guderski
2017-01-26 21:34         ` David Smith
2017-01-26 21:52           ` Adam Guderski
2017-01-26 22:41             ` David Smith
2017-01-27  2:04               ` Adam Guderski [this message]

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=c7a75230-f0b1-2d6e-72f6-0ef8d3d75f7b@gmail.com \
    --to=a.guderski@gmail.com \
    --cc=dsmith@redhat.com \
    --cc=systemtap@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).