Received: by 10.223.176.46 with SMTP id f43csp2142198wra; Thu, 25 Jan 2018 05:39:53 -0800 (PST) X-Google-Smtp-Source: AH8x227ajfaoK4MCs+Xr5aISXyEr0W1C44Ixeq6HPudJ1ANsF+GLZ65hkpnb6WePtSnu39uT8vS9 X-Received: by 10.98.178.133 with SMTP id z5mr16112587pfl.88.1516887592907; Thu, 25 Jan 2018 05:39:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516887592; cv=none; d=google.com; s=arc-20160816; b=gY076xRUV2dcyQ+NbYXC3AfoNtzMAIoyoSFuzA8e5HlYK2JGyLe1zdHOI/Njyj6y/9 LVGQ5DqBb7XOFeva9Kq9BOZMwhfZhSvXbkszkPoVAsWQoKkQpKQyfeB40hhT3IAijyFk JWntP1gf/nhD4qpPOhAAQERZzCZgmJsnNIhjmPVBZLLHcKHXKHoWWu6hgnhPi2M6Pkvy DiWSPgi7d82/6AhdO3yEyH2tPeUWK7vN7wReP5BtcjMMEqjyiU6+y2q1lx9lzPP0pUdn 12cOSyY+qoVGvtsVgEgxEskHRrMCt6C33ehyJAQ2ox4bkBeqzkuArn3PjPVAPwQ5E8Zm +FIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature:arc-authentication-results; bh=gFvOKc16dX2kjrJSE7G142mLPXtch8XnUmCPxIFOe2U=; b=NBgw98FqMnCjrs/Dt+BSbjdxCT9WumJaTSdHzguz4QOBkaTP/vWwFdkMMMiy/CW6cx W8f+6bgcdcq7zYLHWmtAQU3JqmCm4eXK9G6pqG6SXYBhYxtYwIPw384rpTdT1jcKKlhV 1iS90SiUhae3qEipNvZD4B/C6n4omTN7O38+ZqjdiTqwlr7K123mdFaJCEH1a3JpoCLP M4bISubqs4WUaFemUP+3R43AJNg/HT07yGMCVOeZj4DRXyEBf3CwnqnTLp7AUg0bSI6S LoDiM1Dsua9kqV5lRKlRGQlFxCqV/DZL2FHTrwg/nwRp6F9vjrhIli7T9nRKNiwutuHg xS8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AQQZM/gO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t2si4615660pfg.94.2018.01.25.05.39.38; Thu, 25 Jan 2018 05:39:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AQQZM/gO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751174AbeAYNjN (ORCPT + 99 others); Thu, 25 Jan 2018 08:39:13 -0500 Received: from mail-vk0-f67.google.com ([209.85.213.67]:37383 "EHLO mail-vk0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750994AbeAYNjL (ORCPT ); Thu, 25 Jan 2018 08:39:11 -0500 Received: by mail-vk0-f67.google.com with SMTP id g83so4824321vki.4 for ; Thu, 25 Jan 2018 05:39:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=gFvOKc16dX2kjrJSE7G142mLPXtch8XnUmCPxIFOe2U=; b=AQQZM/gOdT7v/8P57JqFBaJQ9XHsl1hXm5mxRWOasVtVfPDlMojGJLpwDmH6iqAQP4 +ufMyqJoJkNan2PRJJ/SpUa0KiqhaQUqktglaZAU59PhhWAuw7nWA5VRJi9GFouNSAVK 55ZcFyJvu1HZE1E6sdH48cefPL9/J9Ttwh8nk1jaQKf6Kby1SQSboAEDVkfGhTKvHoQM 2GlJlVjG5LIU3PiBdzeQE/dNA6SSV+Zm3yc0OUF6pYMDNDe5q8CK4UgViqgN7FsGRsxR XrS2wNlmUcHQ14yNuNc2gcsjt73T3Rb7O5F12m3c5z78UKFh5Zovx65KCLeGf+OO5fDt FqKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=gFvOKc16dX2kjrJSE7G142mLPXtch8XnUmCPxIFOe2U=; b=l+ulTFpI3NLGGf8KmbJvxPKf+7uqcHzj35jlEJ3CVJ7qn1Axge+Uos/Ln63+4OD6F1 dWmbHq5NFlsHSkmvHD/uEu+eYWaTFQI6oYJHooluAru/H92GtGxcFZ3H/IP3sYzo0fMq MnWcyfzlk8bXv2FWtZ9QwqxRCfWsSXMGPKX8FUj4Xtn/OIeNTICxBa5+9YOZ+M4aELy0 jUS6DhMaDg0G2qe+UlYpLpRaPiOPlzndvPkKTyhuMzKDwjGyElm0gP/RPjgyRAKU69HF eQBvvGxwwFrTG1alWxPiodYOyLoetEgaWBKqaUFBhX93BdxuBfjfdfoX4zEOUcy1TJ0A yFaQ== X-Gm-Message-State: AKwxyteC5ELln6R85esKzIEhKT1jIGnGZdgh5UoxD4cBZcwZT/58+Y0i ArK+oPIaE4owAzjZ/6mFlVohMtLa8r6dgQxrnqc= X-Received: by 10.31.33.22 with SMTP id h22mr7125142vkh.195.1516887550449; Thu, 25 Jan 2018 05:39:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.85.216 with HTTP; Thu, 25 Jan 2018 05:39:10 -0800 (PST) From: Pintu Kumar Date: Thu, 25 Jan 2018 19:09:10 +0530 Message-ID: Subject: Re: [perf] perf test and probe fails sometimes on 4.9 To: "Wangnan (F)" , Pintu Kumar Cc: linux-kernel@vger.kernel.org, kernelnewbies@kernelnewbies.org, quentin.monnet@netronome.com, daniel@iogearbox.net, davem@davemloft.net, acme@redhat.com, alexander.shishkin@linux.intel.com, mingo@redhat.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, ** Changed the subject now, since these issues are related to general perf commands. Following are the issues: 1) perf probe --add schedule - FAILED output: schedule is out of .text, skip it. Error: Failed to add events. what is the issue here? Sometimes it pass and sometimes it fails... Similar is the case of 'perf inject' as well. 2) perf test - 1 FAILURE 37.1: Test basic BPF filtering : FAILED! 37.2: Test BPF prologue generation : Skip 37.3: Test BPF relocation checker : Skip bpf: config program 'func=SyS_epoll_wait' symbol:SyS_epoll_wait file:(null) line:0 offset:0 return:0 lazy:(null) bpf: config 'func=SyS_epoll_wait' is ok Looking at the vmlinux_path (8 entries long) Using /boot/vmlinux for symbols Could not open debuginfo. Try to use symbols. SyS_epoll_wait is out of .text, skip it. bpf_probe: failed to convert perf probe eventsFailed to add events selected by BPF test child finished with -1 ---- end ---- Test BPF filter subtest 0: FAILED! Looks like both 1,2 are related. Since, CONFIG_DEBUG_INFO is not enabled, I manually copied the vmlinux to /boot/ folder. ------- Some more info: Kernel build dir is set to /lib/modules/4.9.20-sc-amd-x86-64/build set env: KBUILD_DIR=/lib/modules/4.9.20-sc-amd-x86-64/build unset env: KBUILD_OPTS include option is set to -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/5/include -I./arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h set env: NR_CPUS=8 set env: LINUX_VERSION_CODE=0x40914 set env: CLANG_EXEC=/usr/bin/clang set env: CLANG_OPTIONS=-xc set env: KERNEL_INC_OPTIONS= -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/5/include -I./arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h set env: WORKING_DIR=/lib/modules/4.9.20-sc-amd-x86-64/build If you have any clue about these failure please help me. Thanks, Pintu On Wed, Jan 24, 2018 at 8:23 PM, Pintu Kumar wrote: > Hi, > > Thanks for your help. > Yes it was a sub version issue. > > Earlier, while building the kernel I left the SUBLEVEL as blank. > > make -j8 bindeb-pkg SUBLEVEL=20 > > After passing the correct sublevel now the test is working. > > But still following are failing: > > 16: Try 'import perf' in python, checking link problems : FAILED! > 37.2: Test BPF prologue generation : FAILED! > > > This is the error I get: > > 16: Try 'import perf' in python, checking link problems : > --- start --- > test child forked, pid 7637 > Traceback (most recent call last): > File "", line 1, in > ImportError: No module named perf > test child finished with -1 > ---- end ---- > Try 'import perf' in python, checking link problems: FAILED! > > > Looking at the vmlinux_path (8 entries long) > symsrc__init: cannot get elf header. > Failed to find the path for kernel: Invalid ELF file > bpf_probe: failed to convert perf probe eventsFailed to add events > selected by BPF > test child finished with -1 > ---- end ---- > Test BPF filter subtest 1: FAILED! > > > > Thanks, > Pintu > > > On Wed, Jan 24, 2018 at 6:39 AM, Wangnan (F) wrote: >> >> >> On 2018/1/23 20:37, Pintu Kumar wrote: >>> >>> Hi All, >>> >>> I am verifying all perf tests on Ubuntu-16 x86-64 platform using the >>> kernel version 4.9.20. >>> I have installed several others packages including: clang, llvm >>> >>> But, when I run 'perf test' I get some FAILURE. >>> Specially, 'perf test LLVM' is failing. >>> >>> Please check the below error logs: >>> >>> ---------------------------------------------------- >>> # perf test LLVM >>> 35: Test LLVM searching and compiling : >>> 35.1: Basic BPF llvm compiling test : FAILED! >>> 35.2: Test kbuild searching : Skip >>> 35.3: Compile source for BPF prologue generation test : Skip >>> 35.4: Compile source for BPF relocation test : Skip >>> ---------------------------------------------------- >>> >>> When I run with -v I get this: >>> >>> ----------------------------------------------------- >>> # perf test -v LLVM >>> 35: Test LLVM searching and compiling : >>> 35.1: Basic BPF llvm compiling test : >>> --- start --- >>> test child forked, pid 3304 >>> Unablt to get kernel version from uname '4.9-xxxx-amd-x86-64' >>> WARNING: unable to get correct kernel building directory. >>> Hint: Set correct kbuild directory using 'kbuild-dir' option in [llvm] >>> section of ~/.perfconfig or set it to "" to suppress kbuild >>> detection. >>> >>> Unablt to get kernel version from uname '4.9-xxxx-amd-x86-64' >>> >>> >>> int _version SEC("version") = LINUX_VERSION_CODE; >>> ' | $CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS >>> -DLINUX_VERSION_CODE=$LINUX_VERSION_CODE $CLANG_OPTIONS >>> $KERNEL_INC_OPTIONS -Wno-unused-value -Wno-pointer-sign >>> -working-directory $WORKING_DIR -c "$CLANG_SOURCE" -target bpf -O2 -o >>> - >>> libbpf: 2129190-4a0 doesn't provide kernel version >>> Failed to parse test case 'Basic BPF llvm compiling test' >>> test child finished with -1 >>> ---- end ---- >>> Test LLVM searching and compiling subtest 0: FAILED! >>> ----------------------------------------------------- >>> >>> >>> Basic BPF LLVM compiling test is failing. >>> It reports that bpf could not able to read the kernel version from uname. >>> Is it because of this that 'perf test LLVM' is failing ? >>> >>> My uname says: >>> 4.9-xxxx-amd-x86-64 >> >> >> 'perf test LLVM' requires a well formed uname string (%d.%d.%d). Please see >> tools/perf/fetch_kernel_version . If your distro uses another method to >> report >> kernel version number (from your uname string, sublevel can't be >> determined), >> please help us improve that function like what we have done for ubuntu >> (checking /proc/version_signature). >> >> >> >>> My kernel version is: 4.9.20 (from Makefile) >>> >>> So, I dont think there is any problem with kernel version. >>> >>> If any body have come across this problem please let me know how to >>> resolve this issue. >>> >>> >>> >>> Thank You! >>> >>> Regards, >>> Pintu >> >> >>