This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with vfs probe on Proxmox kernel


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.

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]