From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 10B733858D20 for ; Fri, 26 Apr 2024 01:42:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10B733858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 10B733858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1030 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714095747; cv=none; b=H0kivb7Kz6To3HyNt8iENK27nfnNItHUas3VnWAKvRCIlvAvPX0+hlKZBbO5qtj6vwEuMtNhh6dyQTDCDDjJRhYWe7qMM7IuVzGGJZR3trKlDK+wKeFwkxu2Bfixvb5NvRO2EP/Q/7e3zButMhiILIWudR8eKrx2B0+i5JuB5uc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714095747; c=relaxed/simple; bh=Ne3HbyfLnwRpK3a9xn8qBezUyyMjlmX0s7CWL+gdBzQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=V7QifK8a0G+pRGZYWxaORj82SwtqTi6bmqoSOytEB5Oke0rBI6nB56iGVAK4m5maAAxHPya22W8BCfehGqYk1bRGlbEJyo64ciwdcRaxKCVKnoFYnQhRzx3gBVg1e/IJz6kD1HGt1CwRQYb87HxNAXzDFmRUBIHJAI/9E9nToVc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2a2d82537efso1185988a91.2 for ; Thu, 25 Apr 2024 18:42:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714095744; x=1714700544; darn=sourceware.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=gHE80UcmLzAfCO7QgcLYW+KLybXiEfU8Mspx/Ls3sbE=; b=zyTXUC2pRPmoPTP79wgmzFAtEjixnDs2etaRZHLwZJzv8StUFuIibev1bYQgfpnYUV XpnqvdwJucbsfRydrsyaZnt7Z34FZLzfLZhxpDgAL24keB5xketWwNaR3/5tbPelh9uf zUrw8bkwJ2MqqPiGbBJrAzYzSUonHQtNV3Yom6qmp58cMUCa0bCbbIxRi7CT/ZoLU1Vk tenPqnol5U/GpHqhjJu4tI7rAyUsnLUGHpNk+gWDfIy9ITqiaudA5AgMiHQOrAWK9Hw5 TiTq+MmF5ZVL6YrxbnuGRqA0ZV1ZYfaIDlZjQGATxX+pNtfava6Nli6S4nP82KwZpfGj fetQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714095744; x=1714700544; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gHE80UcmLzAfCO7QgcLYW+KLybXiEfU8Mspx/Ls3sbE=; b=iS1hidy0EUVU0ZBJYoO88AqQnMsgm1KIp/gQtd1nM6MVy/0y5L72vzEiWVuvi45JuX YvcrTt48hIYrqYAEDvRMIorR2vYfeM1k8TlhxI4EsCjM/wpcx/AHdOAl0XCTKXx91om8 d981xy8u38HA7zf9QPFNf32HtElgdtRShlie6AhrYAyxJgPrdyzLmF3NjSspilNWQ6LS ihX/06MSn3h8fOtv9GyKSr+mpN9NQPeNIMN1T6LgSOhqdjMSZ9BNp+D/LP5tJITP7qzn Ky843hqEMilDRL4F8Y4w5+LNNuMs7jrSmYG9scTQoyq5uoT25CCd98XAQQWE+oKsf6FZ Zvng== X-Gm-Message-State: AOJu0YySShMK5VEwRHxSsiBzcif4euqQJ7SzkyTBJgfDvRmW4H1pbE8g o8UUbFrsxeC8kN6TDZQ0KpCP243Dgm2xQApeGSCSswc1sMuAro+6hpGQ7oqFsHo= X-Google-Smtp-Source: AGHT+IGO8709p2ewa3oxbdZyQKn9DjArmgwsbFZB1OWxLrC1FPM8R8qBhXzOp9uWxa+ZQQftet+Lfw== X-Received: by 2002:a17:90a:4e0e:b0:2a2:7992:fbf5 with SMTP id n14-20020a17090a4e0e00b002a27992fbf5mr1428114pjh.48.1714095743833; Thu, 25 Apr 2024 18:42:23 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:8e77:627f:e823:2d9f]) by smtp.gmail.com with ESMTPSA id p18-20020a17090adf9200b002aecaa2aebdsm5268696pjv.20.2024.04.25.18.42.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 18:42:23 -0700 (PDT) From: Thiago Jung Bauermann To: Kevin Buettner Cc: gdb-patches@sourceware.org, Luis Machado Subject: Re: [PATCH v3 2/2] gdb/testsuite: Add gdb.base/memops-watchpoint.exp In-Reply-To: <20240424162216.5aaa409d@f39-zbm-amd> (Kevin Buettner's message of "Wed, 24 Apr 2024 16:22:16 -0700") References: <20240422230700.1173173-1-thiago.bauermann@linaro.org> <20240422230700.1173173-3-thiago.bauermann@linaro.org> <20240423105247.798dc561@f39-zbm-amd> <87cyqe3d44.fsf@linaro.org> <20240424162216.5aaa409d@f39-zbm-amd> User-Agent: mu4e 1.12.4; emacs 29.3 Date: Thu, 25 Apr 2024 22:42:19 -0300 Message-ID: <87ttjo2938.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Kevin Buettner writes: > On Wed, 24 Apr 2024 14:05:31 -0300 > Thiago Jung Bauermann wrote: > >> > I also have Fedora 39 (Asahi Remix) running on an M1 macbook. When >> > I try this test on that machine, I see some timeouts... >> > >> > (gdb) watch -location a[28] >> > Hardware watchpoint 2: -location a[28] >> > (gdb) PASS: gdb.base/memops-watchpoint.exp: set watch on a >> > watch -location b[28] >> > Hardware watchpoint 3: -location b[28] >> > (gdb) PASS: gdb.base/memops-watchpoint.exp: set watchpoint on b >> > watch -location c[28] >> > Hardware watchpoint 4: -location c[28] >> > (gdb) PASS: gdb.base/memops-watchpoint.exp: set watchpoint on c >> > continue >> > Continuing. >> > >> > Hardware watchpoint 2: -location a[28] >> > >> > Old value = 104 'h' >> > New value = 0 '\000' >> > __GI___memset_generic () at ../sysdeps/aarch64/memset.S:67 >> > 67 tbz count, 5, 1f >> > (gdb) PASS: gdb.base/memops-watchpoint.exp: continue until memset watchpoint hits >> > continue >> > Continuing. >> > FAIL: gdb.base/memops-watchpoint.exp: continue until memcpy watchpoint hits (timeout) >> > continue >> > FAIL: gdb.base/memops-watchpoint.exp: continue until memmove watchpoint hits (timeout) >> > testcase /ironwood1/sourceware-git/macbook-review/bld/../../worktree-review/gdb/testsuite/gdb.base/memops-watchpoint.exp completed in 20 seconds >> > >> > === gdb Summary === >> > >> > # of expected passes 4 >> > # of unexpected failures 2 >> > >> > Is this demonstrating the bug (31484) ? >> >> Hm. Probably. I haven't seen this behaviour in my tests. It's hard to >> say why GDB hung. Can you try to "set debug infrun on" at that point? > > I tried running the test again on my macbook and can no longer > reproduce that failure. I'm seeing 6 passes now. (No reboots or > updates either. uptime shows that it's been up for 111 days.) Ah, interesting. I think it's unlikely to be an issue related to this testcase then. I expect problems with watchpoints triggering with memset/memcpy/memmove to be deterministic. E.g., the kernel doesn't report a close enough data address because the hand-optimized memcpy used some very specialized instruction with a very wide data access range, and thus GDB doesn't recognize why the SIGTRAP happened. As an example, this test did uncover a problem in arm-linux-gnueabihf, and it manifested as the watchpoints triggering when the inferior program is exiting: continue Continuing. b = 'This is a relatively long string...' c = 'This is a relatively long string...' Hardware watchpoint 2: -location a[28] Old value = 104 'h' New value = 128 '\200' 0xf7fc27de in _dl_fini () at dl-fini.c:51 warning: 51 dl-fini.c: No such file or directory (gdb) KFAIL: gdb.base/memops-watchpoint.exp: continue until memset watchpoint hits (PRMS: breakpoints/31665) -- Thiago