From owner-freebsd-stable@freebsd.org Mon Dec 2 20:13:29 2019 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B71BB1B5C1F for ; Mon, 2 Dec 2019 20:13:29 +0000 (UTC) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: from uucp.dinoex.org (uucp.dinoex.sub.de [IPv6:2001:1440:5001:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "uucp.dinoex.sub.de", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47RbsN4lzcz4JVk for ; Mon, 2 Dec 2019 20:13:25 +0000 (UTC) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: from uucp.dinoex.sub.de (uucp.dinoex.org [185.220.148.12]) by uucp.dinoex.org (8.16.0.41/8.16.0.41) with ESMTPS id xB2KD4pM031648 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Mon, 2 Dec 2019 21:13:05 +0100 (CET) (envelope-from li-fbsd@citylink.dinoex.sub.org) X-MDaemon-Deliver-To: X-Authentication-Warning: uucp.dinoex.sub.de: Host uucp.dinoex.org [185.220.148.12] claimed to be uucp.dinoex.sub.de Received: from citylink.dinoex.sub.org (uucp@localhost) by uucp.dinoex.sub.de (8.16.0.41/8.16.0.41/Submit) with UUCP id xB2KD4s2031647 for freebsd-stable@FreeBSD.ORG; Mon, 2 Dec 2019 21:13:04 +0100 (CET) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by citylink.dinoex.sub.de (8.15.2/8.15.2) with ESMTP id xB2JuGUU031835 for ; Mon, 2 Dec 2019 20:56:16 +0100 (CET) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by gate.oper.dinoex.org (8.15.2/8.15.2) with ESMTP id xB2Js0Mx031351 for ; Mon, 2 Dec 2019 20:54:02 +0100 (CET) (envelope-from li-fbsd@citylink.dinoex.sub.org) Received: (from news@localhost) by gate.oper.dinoex.org (8.15.2/8.15.2/Submit) id xB2Js0B0031350 for freebsd-stable@FreeBSD.ORG; Mon, 2 Dec 2019 20:54:00 +0100 (CET) (envelope-from li-fbsd@citylink.dinoex.sub.org) X-Authentication-Warning: gate.oper.dinoex.org: news set sender to li-fbsd@citylink.dinoex.sub.org using -f From: Peter Subject: wrong value from DTRACE (uint32 for int64) Date: Mon, 02 Dec 2019 20:44:59 +0100 Organization: n/a Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Injection-Info: oper.dinoex.de; logging-data="29371"; mail-complaints-to="usenet@citylink.dinoex.sub.org" User-Agent: Opera Mail/12.16 (FreeBSD) Sender: li-fbsd@citylink.dinoex.sub.org To: freebsd-stable@FreeBSD.ORG X-Milter: Spamilter (Reciever: uucp.dinoex.sub.de; Sender-ip: 185.220.148.12; Sender-helo: uucp.dinoex.sub.de; ) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (uucp.dinoex.org [185.220.148.12]); Mon, 02 Dec 2019 21:13:07 +0100 (CET) X-Rspamd-Queue-Id: 47RbsN4lzcz4JVk X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of li-fbsd@citylink.dinoex.sub.org has no SPF policy when checking 2001:1440:5001:1::2) smtp.mailfrom=li-fbsd@citylink.dinoex.sub.org X-Spamd-Result: default: False [4.42 / 15.00]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; NEURAL_SPAM_MEDIUM(0.80)[0.796,0]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.43)[ip: (1.13), ipnet: 2001:1440::/32(0.56), asn: 8469(0.45), country: DE(-0.01)]; NEURAL_SPAM_LONG(1.00)[0.995,0]; TO_DN_NONE(0.00)[]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[peter@citylink.dinoex.sub.org,li-fbsd@citylink.dinoex.sub.org]; DMARC_NA(0.00)[sub.org]; R_DKIM_NA(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:8469, ipnet:2001:1440::/32, country:DE]; FROM_NEQ_ENVFROM(0.00)[peter@citylink.dinoex.sub.org,li-fbsd@citylink.dinoex.sub.org]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Dec 2019 20:13:29 -0000 Hi @all, I felt the need to look into my ZFS ARC, but DTRACE provided misleading (i.e., wrong) output (on i386, 11.3-RELEASE): # dtrace -Sn 'arc-available_memory { printf("%x %x", arg0, arg1); }' DIFO 0x286450a0 returns D type (integer) (size 8) OFF OPCODE INSTRUCTION 00: 29010601 ldgs DT_VAR(262), %r1 ! DT_VAR(262) = "arg0" 01: 23000001 ret %r1 NAME ID KND SCP FLAG TYPE arg0 262 scl glb r D type (integer) (size 8) DIFO 0x286450f0 returns D type (integer) (size 8) OFF OPCODE INSTRUCTION 00: 29010701 ldgs DT_VAR(263), %r1 ! DT_VAR(263) = "arg1" 01: 23000001 ret %r1 NAME ID KND SCP FLAG TYPE arg1 263 scl glb r D type (integer) (size 8) dtrace: description 'arc-available_memory ' matched 1 probe 0 14 none:arc-available_memory 2fb000 2 0 14 none:arc-available_memory 4e000 2 1 14 none:arc-available_memory ffffb000 2 1 14 none:arc-available_memory ffffb000 2 1 14 none:arc-available_memory ffffb000 2 1 14 none:arc-available_memory 19000 2 0 14 none:arc-available_memory d38000 2 # dtrace -n 'arc-available_memory { printf("%d %d", arg0, arg1); }' 1 14 none:arc-available_memory 81920 5 1 14 none:arc-available_memory 69632 5 1 14 none:arc-available_memory 4294955008 5 1 14 none:arc-available_memory 4294955008 5 The arg0 Variable is shown here obviousely as an unsigned int32 value. But in fact, the probe in the sourcecode in arc.c is a signed int64: DTRACE_PROBE2(arc__available_memory, int64_t, lowest, int, r); User @shkhin in the forum pointed me to check the bare dtrace program, unattached to the kernel code: https://forums.freebsd.org/threads/dtrace-treats-int64_t-as-uint32_t-on-i386.73223/post-446517 And there everything appears correct. So two questions: 1. can anybody check and confirm this happening? 2. any idea what could be wrong here? (The respective variable in arc.c bears the correct 64bit negative value, I checked that - and otherwise the ARC couldn't shrink.) rgds, PMc