From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35BB53B52E2 for ; Mon, 18 May 2026 07:43:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779090207; cv=none; b=S5DOHpIVMb8IlV+Tr2fE57P8k8qScDSXNYYYkPctfQRRrPxCieP6X2WEOjT6lVaOuj0I6et62MqM7OCur3EZrRPkfpEys8kt6EkBS9r4VlM/Kp7axkcbDNnwi1RrAlq6tk6n8rBNwrXu6Qo25lJ51p6vuj3ElU+TYVu0uiAL1hc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779090207; c=relaxed/simple; bh=MovC6lzwqjBIYUrOC7QBOqcc/WMNFxOnawRcJ7P2/Ik=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=C9FP7JglnUV9bXPpYVToj0sy3ccwETJTxKAz2OUsav1sY6LkG8Mjys03Hk2WjVbUc9mDhyHew2FCbhI/tL/OarJBqZJX4Dp1QfbyZnmZ9vRd+GH29GJp17yKNAkYerqLjAAazP1abXDGHYWlmMGE/mxZn2x44U58A3bRxq+aLx0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=YmCIj08V; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=YrjpdpZP; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YmCIj08V"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="YrjpdpZP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779090203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dkz4o1HCLWz8eoAHqvdPjV97uEnFp10w6ezT5caacdg=; b=YmCIj08Vvixlwtfg4EoSwgtGdGmAiAf7HGJHstCUNNBL3RvSdHKePiZ3b7DOLP+y5r/6pB 4jF79mjo5o2Q2S7PF3Vzn+EayN71s29qhbw0vJBT+fE0IIEdlb7PieZWZcZNXccxUqIFVr /ipK9YS3oHVBV5u9skiv49RwNyc0TVA= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-538-aseejD7LNESSw5kvOhdsLA-1; Mon, 18 May 2026 03:43:22 -0400 X-MC-Unique: aseejD7LNESSw5kvOhdsLA-1 X-Mimecast-MFC-AGG-ID: aseejD7LNESSw5kvOhdsLA_1779090201 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-48fd2b502e2so14481405e9.2 for ; Mon, 18 May 2026 00:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1779090201; x=1779695001; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=dkz4o1HCLWz8eoAHqvdPjV97uEnFp10w6ezT5caacdg=; b=YrjpdpZPpC5tFQjqn0D83UeDnlOFSD8D3WERvz2u0OfkH546kE4GvZCtTYgbJCMvxt bqVcWoph+GBR4i+eheXZZRGp7KhjJW0S6xKSU7hXrohu+bF9HHQ7+kXjfu9C2USEbWJz tKq1bg2y4VVfFZVhotwnco5aYNQRr+gqhpbgFKuM4nqLdGjDER5GQ08xATNpfwQVr9Bt huAsdIt8PeX1UJBgOtc/JVjdzuinE2nxU47InWwjZhrGsULn6pacPx4NNsLJ2fkeNwaB o8ZycV1CF6tYzNFNKmrehZc6oAX7Z8ABnAtGykbW6Kq5oEW9o5MEnI5NWE90PcHs+gAe MPvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779090201; x=1779695001; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dkz4o1HCLWz8eoAHqvdPjV97uEnFp10w6ezT5caacdg=; b=ZKUvcJ1VooGXQayrNyRbhhcwtOe7gPX0bweWFdh0Idx5Ib9G3i3dlSRfsHXC9JUSur 7mrrTcU8kPTkb8pL1VRKaGwBcyiyB8cMplPBUP9Z11q63lXb3RmL4aR5AUpFw4D//LoH /1/RSAUp5PBB5bJqlU6kxUZKmnXoHBAmLEnD6szszYzvkhm8psY6clyfXNWbhy+ESgMw AAbu/MCSlk5AKlbWv5/WRSIl5wy3JjSEAr/y14S3KDNb2FJC3DIpXwGLMpoG7OvbQv1g jn5UtAs/pHU/CmdpD8i8g9uvN2a7Xyy0kvMFcyIDrBJTfZp0M6Gfms4qoejmAQjQ4MgV gXNg== X-Forwarded-Encrypted: i=1; AFNElJ9vtkwS2o4OFsFFzCDvIMHDYCNaw9X/7ZoOjP64jobnXLDDol3891bvjPbv6rw829ISpuoQALZuhTMBURY=@vger.kernel.org X-Gm-Message-State: AOJu0YysuzOS1GLtQyqtBCcC2v9kSf6RTVRCSrz87ZkRosujOG5oo+Tp EmeJFqhIc84RKlQgPamm0W57IfG+PfWtBjS/yb3dJBe+4/8DZQZAlkZgvRs5NxwSA3M5eT6CG/S IGCIa3p0ssIIheXJFbImNKqfCg2eUE/m1Op9Meh2mpuJ+GLcPvt3j9esn4dyjjUDvfw== X-Gm-Gg: Acq92OHucq47laKezvbWTnwSPRnpVkn8mXvCrcHY/dneYKpibSoK5aHOHmxQpzJcgL2 Fl8zWS2XuvikMqdHsAVxM6igxFCkhjsMgYIe5i1WlnP0Hz7mRapI1zDzCh+KrbnCmB7KeJH3JP7 2ga7/dMtL+jGB4Y5uQRBOWJNTcdsGpe+1+SIwpyQ9KBn0Yu2x2WEOXinYPBh4SW81FiCBzGOswY oETk5BJ8XdAL6SpYb0kp2X/d6FaapmP6ENdmq4RkLj/P53WOlMEp7a4EPFkohybK3YgXNHcvMO4 Z8u4y+E7uErF+viEywiwUel/lcoShNjFcfc8kcKmHCYCD4Igftf26Trc2uwyn2N0t4JpjlXY5Qa Yp4DlaqkjrDSd4zUhQCVX5U7Z4/nJ16COX1iPZgl5627rYib7oHwS X-Received: by 2002:a05:600c:8189:b0:48a:9428:5522 with SMTP id 5b1f17b1804b1-48fe632249dmr217556775e9.16.1779090201293; Mon, 18 May 2026 00:43:21 -0700 (PDT) X-Received: by 2002:a05:600c:8189:b0:48a:9428:5522 with SMTP id 5b1f17b1804b1-48fe632249dmr217556445e9.16.1779090200920; Mon, 18 May 2026 00:43:20 -0700 (PDT) Received: from jlelli-thinkpadt14gen4.remote.csb ([151.29.56.132]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fe4c834besm241779275e9.3.2026.05.18.00.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 00:43:19 -0700 (PDT) Date: Mon, 18 May 2026 09:43:18 +0200 From: "juri.lelli@redhat.com" To: batcain Cc: "peterz@infradead.org" , "jstultz@google.com" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , "regressions@lists.linux.dev" Subject: Re: [REGRESSION] sched/deadline: Hard lockup during CPU offline after commit 14a857056466 Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hello, On 16/05/26 03:07, batcain wrote: > [1.] One line summary of the problem:sched/deadline: Hard lockup > during CPU offline/migration due to frozen rq_clock loop in > update_dl_revised_wakeup() > > [2.] Full description of the problem/report: A deterministic hard > lockup occurs during CPU hotplug (offlining a secondary core) on > stable kernels containing commit > 14a857056466be9d3d907a94e92a704ac1be149b. > > When a CPU core is set offline, tasks are migrated within the > stop_machine() context where local interrupts are fully disabled > (irqs_disabled()). During task migration, enqueue_task_dl() calls > update_dl_entity(). Because of the new dl_defer rule introduced for > implicit dl_servers, the code is forced into the > update_dl_revised_wakeup() branch. > > Inside update_dl_revised_wakeup(), the logic depends on rq_clock(rq) > to calculate laxity: u64 laxity = dl_se->deadline - rq_clock(rq); > > However, under the stop_machine() noirq phase, the runqueue clock is > stale/frozen. Since the clock does not progress across iterations > within the enqueue loop, the mathematical state stalls. Consequently, > dl_entity_overflow() continuously evaluates to true, trapping the > processor core in an infinite loop inside the enqueue path, resulting > in a system-wide hard lockup. I cannot immediately see how this issue can affect dl-server(s), as they cannot migrate and are de-activated on CPUs going offline. > [3.] Keywords (keywords of the affected subsystem): sched, deadline, > dl_server, cpuhp, hotplug, hard-lockup, regression > > [4.] Kernel information (output of "uname -a" or version): Linux > workstation 7.0.7-hardened2-1-hardened #1 SMP PREEMPT_DYNAMIC Fri, 15 > May 2026 00:03:13 +0000 x86_64 GNU/Linux > > [5.] Most recent kernel version which did not have the bug: Any kernel > release prior to the integration/backport of commit 14a857056466. > > [6.] Output of Oops/Panic/Bug/Objdump: No native kernel oops/panic > stack trace is written to disk/serial because the freeze occurs inside > stop_machine() with interrupts masked. NMI watchdog triggers a hard > lockup panic if aggressively armed. > > [7.] A small program which triggers the problem: # echo 0 > > /sys/devices/system/cpu/cpu1/online > > [8.] Environment description (Hardware, distribution, etc.): Hardware: > Confirmed on both AMD Zen 2 (Renoir) and AMD Zen 4 (Phoenix) > platforms. Distribution: Arch Linux (using official > extra/linux-hardened kernel package). Also cannot reproduce at my end. Thanks, Juri