Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp222612rwb; Mon, 28 Nov 2022 19:43:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf4mGPJp7u3WEYHYEFaAdQk8cPnUFIO8rx0L1shbde02HZ1VMDQ3NEDEM8sTeUPjlfH7Bpsn X-Received: by 2002:a17:902:d4cf:b0:186:80e7:1e1 with SMTP id o15-20020a170902d4cf00b0018680e701e1mr35290760plg.135.1669693413427; Mon, 28 Nov 2022 19:43:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669693413; cv=none; d=google.com; s=arc-20160816; b=UbpGcIkG3LTKgZGc8WgF6RvcGlCmwGgs5LZ5TEwEA02YqnH6rYqWMnhj1jTqaPpqCQ if0PJQGhCXXE13BHqx2lyyXiGUTqmcewVcG6zoQpvWviP3Y4X9zJ5JvkO/TFwe7cXnY0 O9272lfxJOogx5mPi5sTJW7qOdkFcBMHiRIFoYhjm7NbWzI/nSoY7kst7YkoSTCOaTM9 NmePEUNrKfkhin60FK4/elsGsuLFRLi9zPOIrfYNp7vmaD9CChT4HMTL1OabAQBMxp9L N7iyqB58u9Z4rs04ZlyN0OYTm43TMCCMEYD3NnBmELJ3ivUktA+aT/CnNBR2LqEacFiw RukA== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-signature; bh=MBGXD6MyWsX7OdHQlVEVfF8SLLx/QXGm8ng+Hj3QeKA=; b=RmEU50PbgD4g1brSA/GvrPlVS70YOxitZAI4IZBA0KdsbXz7I+JFs/iRyyym6HdoMy ORybFKqaCNphCnwCMUlYt4wG4taFrDQR7bswjNh/M/0x2kDTVBrVlGwc8aRYJ+VLKxAv 6U1BJd4f+3qbV+1tVOzufhZ2AuzWITubjN91XfwKlMPfnL1j+o35CaGhI9wTd0LCsNDl IHBVlkDsceELwaGDqFTHDQSidPdLgx2vxZc2L9myLHUuvf9yfg+1lAdBfAlbw7znXbTN tSiRV9bFaDFulfgIxaGZvkk/JC4CA9Bot7KwW68OyAf3M6tu87etP+lC6q7N8YfAFV55 V9QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@alu.unizg.hr header.s=mail header.b=CDnKe2YD; dkim=fail header.i=@alu.unizg.hr header.s=mail header.b=d8YTjRiq; 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=NONE sp=NONE dis=NONE) header.from=alu.unizg.hr Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id me16-20020a17090b17d000b00218d3ce2332si596917pjb.163.2022.11.28.19.43.20; Mon, 28 Nov 2022 19:43:33 -0800 (PST) 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; dkim=fail header.i=@alu.unizg.hr header.s=mail header.b=CDnKe2YD; dkim=fail header.i=@alu.unizg.hr header.s=mail header.b=d8YTjRiq; 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=NONE sp=NONE dis=NONE) header.from=alu.unizg.hr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235319AbiK2Df3 (ORCPT + 82 others); Mon, 28 Nov 2022 22:35:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235384AbiK2Df0 (ORCPT ); Mon, 28 Nov 2022 22:35:26 -0500 Received: from domac.alu.hr (domac.alu.hr [IPv6:2001:b68:2:2800::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 799C84B778 for ; Mon, 28 Nov 2022 19:35:19 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by domac.alu.hr (Postfix) with ESMTP id ED263604EC; Tue, 29 Nov 2022 04:35:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1669692916; bh=uUI8w5NXzmiAM3HB3vbKX+QlxjW7xNYUYJIS56mXovk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=CDnKe2YDo7pkSaQCfUK/Klz81OXOLA3p0niwnNSIx6Xd8lIz2CJTxuORh9YIQIOrT rmpKZtPfqh105+7/+KDwL1lTtJgTm9daaQ5KEyL89YH7Xwnns73GA883g1DV/DQPSA k2i9kKIu5Z+egT+QydOZ2Nu255pzAbkdlGWfJrFJRQKty4kWf1x37EkcdZwiUd6IbX ILQ5qqSkmQ4lf5ds4O62j28gxfX7zXIi4yGAQgGpXFjs1+cNqNgcCJnyEIaqYGEeSq PyPQUpjzugNbxJLXBKWmtc0JfhYF2fdAj86a3U2Xk10wfT3wnXw5a2nK7a5eAgj6Vn 1Xa36jKei9J+Q== X-Virus-Scanned: Debian amavisd-new at domac.alu.hr Received: from domac.alu.hr ([127.0.0.1]) by localhost (domac.alu.hr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f_NLcEwlqxMI; Tue, 29 Nov 2022 04:35:13 +0100 (CET) Received: from [192.168.0.12] (unknown [188.252.197.255]) by domac.alu.hr (Postfix) with ESMTPSA id DAD9C604E7; Tue, 29 Nov 2022 04:35:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alu.unizg.hr; s=mail; t=1669692913; bh=uUI8w5NXzmiAM3HB3vbKX+QlxjW7xNYUYJIS56mXovk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=d8YTjRiqwXT+hoxSWAkEMKV8UCrnffe6eFENItJp7fafCrrezzNfp9+ZdulmVM0c/ 6M/PQe6WViH7jplRYfArD585xcSvzduc9Vkwdr+VnYk1zHkLfEVEk5JFkk8uVul+F+ ZTAVhTCGIQ/6hgcib4uL6OCb8EN8zHTRIcfzEjHNvohzD5LfeJxDx9vF/CyaJQeo3y 9P5EMDARMD7j6Dok1pbWcUcvdFniRUiIoi8TpP25ThU0uKgp8dBt1U2qHxtWW1i/XF kQqBJ6x8Vpne7LLBE0TCadcCSTtS0J/CIno8mHRsMKw+DvDOcfPSjd/eRqFLd8X0xQ zJqPckunVPT3A== Message-ID: Date: Tue, 29 Nov 2022 04:35:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: BUG: kworker + systemd-udevd memory leaks found in 6.1.0-rc4 To: Greg KH Cc: linux-kernel@vger.kernel.org, "regressions@lists.linux.dev" , Tejun Heo , Florian Mickler , Thorsten Leemhuis , systemd-devel@lists.freedesktop.org References: <0d9c3f6c-3948-d5d1-bcc1-baf31141beaa@alu.unizg.hr> Content-Language: en-US From: Mirsad Goran Todorovac In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,DEAR_SOMETHING, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=no 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 10. 11. 2022. 10:20, Greg KH wrote: > On Thu, Nov 10, 2022 at 05:57:57AM +0100, Mirsad Goran Todorovac wrote: >> On 04. 11. 2022. 11:40, Mirsad Goran Todorovac wrote: >> >>> Dear Sirs, >>> >>> When building a RPM 6.1.0-rc3 for AlmaLinux 8.6, I have enabled >>> CONFIG_DEBUG_KMEMLEAK=y >>> and the result showed an unreferenced object in kworker process: >>> >>> # cat /sys/kernel/debug/kmemleak >>> unreferenced object 0xffffa01dabff6100 (size 16): >>>   comm "kworker/u12:4", pid 400, jiffies 4294894771 (age 5284.956s) >>>   hex dump (first 16 bytes): >>>     6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0....... >>>   backtrace: >>>     [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0 >>>     [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150 >>>     [<0000000005472512>] kstrdup+0x36/0x70 >>>     [<000000002f797ac4>] kstrdup_const+0x28/0x30 >>>     [<00000000e3f86581>] kvasprintf_const+0x78/0xa0 >>>     [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0 >>>     [<000000004158a6c0>] dev_set_name+0x53/0x70 >>>     [<000000001a120541>] memstick_check+0xff/0x384 [memstick] >>>     [<00000000122bb894>] process_one_work+0x214/0x3f0 >>>     [<00000000fcf282cc>] worker_thread+0x34/0x3d0 >>>     [<0000000002409855>] kthread+0xed/0x120 >>>     [<000000007b02b4a3>] ret_from_fork+0x1f/0x30 >>> unreferenced object 0xffffa01dabff6ec0 (size 16): >>>   comm "kworker/u12:4", pid 400, jiffies 4294894774 (age 5284.944s) >>>   hex dump (first 16 bytes): >>>     6d 65 6d 73 74 69 63 6b 30 00 00 00 00 00 00 00 memstick0....... >>>   backtrace: >>>     [<000000009ff951f6>] __kmem_cache_alloc_node+0x380/0x4e0 >>>     [<00000000451f4268>] __kmalloc_node_track_caller+0x55/0x150 >>>     [<0000000005472512>] kstrdup+0x36/0x70 >>>     [<000000002f797ac4>] kstrdup_const+0x28/0x30 >>>     [<00000000e3f86581>] kvasprintf_const+0x78/0xa0 >>>     [<00000000e15920f7>] kobject_set_name_vargs+0x23/0xa0 >>>     [<000000004158a6c0>] dev_set_name+0x53/0x70 >>>     [<000000001a120541>] memstick_check+0xff/0x384 [memstick] >>>     [<00000000122bb894>] process_one_work+0x214/0x3f0 >>>     [<00000000fcf282cc>] worker_thread+0x34/0x3d0 >>>     [<0000000002409855>] kthread+0xed/0x120 >>>     [<000000007b02b4a3>] ret_from_fork+0x1f/0x30 >>> # >>> >>> Please fing the build config and lshw output attached. >>> >>> dmesg is useless, as it is filled with events like: >>> >>> [ 6068.996120] evbug: Event. Dev: input4, Type: 1, Code: 31, Value: 0 >>> [ 6068.996121] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0 >>> [ 6069.124145] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762 >>> [ 6069.124149] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 1 >>> [ 6069.124150] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0 >>> [ 6069.196003] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458762 >>> [ 6069.196007] evbug: Event. Dev: input4, Type: 1, Code: 34, Value: 0 >>> [ 6069.196009] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0 >>> [ 6069.788129] evbug: Event. Dev: input4, Type: 4, Code: 4, Value: 458792 >>> [ 6069.788133] evbug: Event. Dev: input4, Type: 1, Code: 28, Value: 1 >>> [ 6069.788135] evbug: Event. Dev: input4, Type: 0, Code: 0, Value: 0 >> >> This bug is confirmed in 6.1-rc4, among the "thermald" and "systemd-dev" >> kernel memory leaks, potentially exposing race conditions or other more >> serious bug. > > How is a memory leak a race condition? > >> The bug is now also confirmed and now manifested also in the Ubuntu 22.04 >> LTS jammy 6.1-rc4 build. >> >> Here is the kmemleak output: >> >> unreferenced object 0xffff9242b13b3980 (size 64): >>   comm "kworker/5:3", pid 43106, jiffies 4305052439 (age 71828.792s) >>   hex dump (first 32 bytes): >>     80 8b a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ....B........... >>     20 86 a0 f0 42 92 ff ff 00 00 00 00 00 00 00 00 ...B........... >>   backtrace: >>     [<00000000c5dea4db>] __kmem_cache_alloc_node+0x380/0x4e0 >>     [<000000002b17af47>] kmalloc_node_trace+0x27/0xa0 >>     [<000000004c09eee5>] xhci_alloc_command+0x6e/0x180 > > This is a totally different backtrace from above, how are they related? > > This looks like a potential xhci issue. Can you use 'git bisect' to > track down the offending change that caused this? > > thanks, > > greg k-h Hello, Greg, Thorsten! After multiple attempts, my box's UEFI refuses to run pre-4.17 kernels. The bisect shows the problem appeared before 4.17, so unless I find what is causing black screen when booting pre-4.17 kernels, it's a no-go ... :( Thanks, Mirsad -- Mirsad Goran Todorovac Sistem inženjer Grafički fakultet | Akademija likovnih umjetnosti Sveučilište u Zagrebu -- System engineer Faculty of Graphic Arts | Academy of Fine Arts University of Zagreb, Republic of Croatia The European Union