Received: by 2002:a05:7412:f584:b0:e2:908c:2ebd with SMTP id eh4csp2942106rdb; Wed, 6 Sep 2023 22:27:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH2WBiAoxIoMd41Zm37rpkExXoNHSbz7/jgJz04PulEPLj9mmwvPinPSvBYFmNnjaxoP+40 X-Received: by 2002:aa7:d70a:0:b0:52b:daff:f6f2 with SMTP id t10-20020aa7d70a000000b0052bdafff6f2mr3635142edq.3.1694064450296; Wed, 06 Sep 2023 22:27:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694064450; cv=none; d=google.com; s=arc-20160816; b=fHetqQBl6ERbmmlfvwuqqal+TUafRGlpeglX8AI3cbKYxNOk/fVoHTxk6dGrKlzCQ3 agbRGwuLtJ3I3/g8n/x99zi8lbPEFkFr7yM44HgMQRV8qMhz3C2saCF3O1NbVGHp99no g57E9cENMoykdZvTwsuPje0lxCwB5hVAnaIkmM4DYiWEO/6RthmY8ndFTQK35E0tXOyG aqzM4vp/gdmjwo1OT7A30H/s19kAUFdbUfZpacS+EOOMq4dPjKzYxHHAbTReunD75I+0 TdYHyyZo0fsHZAjya2q05eJ0LwRLoWZkJMjuOTZc4IuhEeEFRBSBifGpbFL7BbPK3qHR 7Y6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=F82e2ZJn6QwYoGyiDPLCz6VWdA4MBE7BV1IxnqWODrE=; fh=gzVeje+yDuSaHA82YMlfw1Z757hsz9RDwIWyamhOwc8=; b=Ub7V8Echf6V1Nwy6ob5/n04FYJfEl6h8WefOonKU/nIDLPIBMOoS1XcQg/E++hHBc/ YcDZ5oBLbEXYNDI5q4K0bgMTZQ6rzQqHl3yqHaBQNNEPwdnA1wYxKadtpUQj/Cl28xwD mrI0EpySu+xtPkH28VGinumV41c9e/LYzRriPHwpY5K61QwstTdd3+bCVvqPFua9bSlc FX2e07o2/boeGTzCbgUkwOTAOILcYqu2kKYsWtOPdKXqXGU1q301uu0B+GsWmNW+WP1b 9RaMv4QdofMPVoxhgWn96DP1FnQDoLcTnEKZw3L13wOGTESLkVatltRhhjsvAGbV5mhH lwyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m26-20020aa7c2da000000b0052eb4c3fdd6si1230061edp.152.2023.09.06.22.27.14; Wed, 06 Sep 2023 22:27:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235762AbjIGBBj (ORCPT + 57 others); Wed, 6 Sep 2023 21:01:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229563AbjIGBBh (ORCPT ); Wed, 6 Sep 2023 21:01:37 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AE4EE8; Wed, 6 Sep 2023 18:01:33 -0700 (PDT) Received: from dggpeml500012.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Rh19V427qz1M8v6; Thu, 7 Sep 2023 08:59:42 +0800 (CST) Received: from [10.67.110.218] (10.67.110.218) by dggpeml500012.china.huawei.com (7.185.36.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Thu, 7 Sep 2023 09:01:30 +0800 Message-ID: Date: Thu, 7 Sep 2023 09:01:30 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: "[PATCH] selftests/ftrace: Correctly enable event in instance-event.tc" Content-Language: en-US To: Steven Rostedt , Naresh Kamboju CC: , , , , , , , References: <20230906142652.191866-1-naresh.kamboju@linaro.org> <20230906103718.0405ccb4@gandalf.local.home> <20230906173706.7aeb8716@gandalf.local.home> From: Zheng Yejian In-Reply-To: <20230906173706.7aeb8716@gandalf.local.home> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.110.218] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500012.china.huawei.com (7.185.36.15) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/9/7 05:37, Steven Rostedt wrote: > On Wed, 6 Sep 2023 10:37:18 -0400 > Steven Rostedt wrote: > >>> Log details, >>> ------------- >>> # ok 45 ftrace - test tracing error log support >>> <47>[ 1373.662292] systemd-journald[90]: Sent WATCHDOG=1 notification. >>> # ok 46 Test creation and deletion of trace instances while setting an event >> >> It's definitely a race with the creation and deletion of instances. >> >> I'm going to run it on my laptop VM and see if that reproduces it. My other >> VM is on a pretty powerful machine, and perhaps that's keeping it from >> hitting the race. > > Putting in a while loop of: > > # while :; do ./ftracetest test.d/instances/instance-event.tc ; done > In test.d/instances/instance-event.tc, concurrently create/delete/access intances just about 1 second and then killed them, it may cause missing the race. No longer sleep and kill, following testcase can also reproduce: ``` #!/bin/bash cd /sys/kernel/tracing/instances instance_slam() { while :; do mkdir foo 2> /dev/null rmdir foo 2> /dev/null done } instance_set() { while :; do echo 1 > foo/events/sched/sched_switch/enable done 2> /dev/null } instance_slam & p1=$! echo $p1 instance_set & p2=$! echo $p2 ``` -- Thanks, Zheng Yejian > eventually triggered the bug. Looks like this is really an existing bug not > related to the eventfs, but the eventfs code actually opened up the window > of this race. > > Hopefully I'll have a fix shortly. > > -- Steve >