From owner-freebsd-arm@freebsd.org Mon Dec 14 15:24:42 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CF1FA4440D for ; Mon, 14 Dec 2015 15:24:42 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: from mail-lb0-x22c.google.com (mail-lb0-x22c.google.com [IPv6:2a00:1450:4010:c04::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 924651F20 for ; Mon, 14 Dec 2015 15:24:41 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: by lbblt2 with SMTP id lt2so109151177lbb.3 for ; Mon, 14 Dec 2015 07:24:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=OuZPpA5j42GDviqWIFdLYYE6lwCCThhoClHgB4FQZSU=; b=1VC9TH2ySes0cUbuL8UEM06jRtaZ03MZHmSwL0pmMBEJmWKGUZmOPGez7riI+nKsR7 s4cdnd4xktKAVTP3bZrszW0Z/TC12tZhBWPfcgcnKhpFChLGa01ADObg5jZ0Frr0rLIw w6rtDGQ1nnTPEm/KNLNxIc6+L0493TjPHMed9R8gvjYJXI49BgyZ/C+o7s18j/dRD1Bm HUwzgdfX1KWTJ4Qw15dfwy75ADq7Qq+ohsUUKATscEGTHTIQYtDQJLjKUZkt3HQ7qUsR JeU7tsRLfIpTKDjOgqtnxtL9bPQcHb5aMk8YkrlqJzIpEZfQd6qds9nj13KXLTBz2HB8 h+ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=OuZPpA5j42GDviqWIFdLYYE6lwCCThhoClHgB4FQZSU=; b=P5ObL6piGv+yrpbZHdzl0W79oT2krObG4lB9OD+716CDrtmbiAE4ZH+vIiQpU5we16 Xghppiwe7kcK4coTJTs5C9t6ZPwkfZI6nKsztKYui1Mv/GQx7WFGPgRCcoVls4eTrjWQ /K62shmJVnDUKoQN4ZdKlrzbnutrfJpuezmK1VZ8h6ZhM+NkuZBF3FB8RMlZZZ1Yb4Dw QmpkS+F74b/qg9Iqbpy5m2qmzLG+lK/wD7bnzj94Nkm0il34z1j6lKO+7hoBC51Eqs9t i7hHvy09FT9lqYahz2rePLDfmhJVFqckFjgd+XzBmX1X+xPWK6okbuh6zZjPgDYg6ZAn hKhQ== X-Gm-Message-State: ALoCoQkAF2me3OamM6JBP2KdrNxmR1KW7rPPkhabO+W+hbFbNloPDopB7n/p/u4TUm5yDMALN7RjNsko+uqD9pf1lseK0h3lKw== X-Received: by 10.112.55.38 with SMTP id o6mr11019987lbp.38.1450106678439; Mon, 14 Dec 2015 07:24:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.139.194 with HTTP; Mon, 14 Dec 2015 07:24:18 -0800 (PST) In-Reply-To: References: From: Zbigniew Bodek Date: Mon, 14 Dec 2015 16:24:18 +0100 Message-ID: Subject: Re: Various panics while using HWPMC on ARM64 To: Ruslan Bukin Cc: Andrew Turner , "freebsd-arm@freebsd.org" , Ed Maste Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2015 15:24:42 -0000 Hello, Did you have time to look into that? Do you have any clues what could be wrong here? We would like to use hwpmc for profiling so your help will be very much appreciated. Best regards zbb 2015-12-09 13:06 GMT+01:00 Zbigniew Bodek : > Hello Ed, > > Done. I also check what happens when SMP is disabled and the kassert > is triggered: > > root@thunderx_crb4:~ # pmcstat -S CPU_CYCLES -O cpu_cycles.pmc > ^Cpanic: [pmc,4256] cpu 0 didn't find a sample to collect > KDB: stack backtrace: > db_trace_self() at db_trace_self_wrapper+0x28 > pc = 0xffffff80004e9aac lr = 0xffffff800006d8b4 > sp = 0xffffff87cba976e0 fp = 0xffffff87cba97800 > > db_trace_self_wrapper() at vpanic+0x9c > pc = 0xffffff800006d8b4 lr = 0xffffff800027136c > sp = 0xffffff87cba97810 fp = 0xffffff87cba97880 > > vpanic() at kassert_panic+0x160 > pc = 0xffffff800027136c lr = 0xffffff80002712cc > sp = 0xffffff87cba97890 fp = 0xffffff87cba97950 > > kassert_panic() at pmc_capture_user_callchain+0x1a4 > pc = 0xffffff80002712cc lr = 0xffffff80000e1444 > sp = 0xffffff87cba97960 fp = 0xffffff87cba979c0 > > pmc_capture_user_callchain() at pmc_hook_handler+0x7c0 > pc = 0xffffff80000e1444 lr = 0xffffff80000dfb78 > sp = 0xffffff87cba979d0 fp = 0xffffff87cba97a50 > > pmc_hook_handler() at ast+0x14c > pc = 0xffffff80000dfb78 lr = 0xffffff80002b976c > sp = 0xffffff87cba97a60 fp = 0xffffff87cba97a90 > > ast() at handle_el0_sync+0x90 > pc = 0xffffff80002b976c lr = 0xffffff80004eb224 > sp = 0xffffff87cba97aa0 fp = 0xffffff87cba97bb0 > > handle_el0_sync() at 0x406d60 > pc = 0xffffff80004eb224 lr = 0x0000000000406d60 > sp = 0xffffff87cba97bc0 fp = 0x0000007ffffff540 > > KDB: enter: panic > [ thread pid 679 tid 100061 ] > Stopped at kdb_enter+0x40: > db> > > > when invariants options is disabled I only get: > > root@thunderx_crb4:~ # pmcstat -S CPU_CYCLES -O cpu_cycles.pmc > ^Cpmcstat: WARNING: sampling was paused at least 1 time. > Please consider tuning the "kern.hwpmc.nsamples" tunable. > > > Best regards > zbb > > 2015-12-08 20:59 GMT+01:00 Ed Maste : >> On 8 December 2015 at 14:34, Zbigniew Bodek wrote: >>> Hello, >>> >>> I encountered some problems with FreeBSD on ARM64 while using hwpmc. >>> Some of the errors that I found are listed below: >>> >>> * panic: Unknown kernel exception 0 esr_el1 2000000 >>> * panic: data abort in critical section or under mutex >>> * panic: VFP exception in the kernel >>> * panic: Unknown kernel exception 21 esr_el1 86000006 >> >> Can you add these notes to PR 204686? I think there are SMP issues in >> arm64 hwpmc that need to be resolved.