From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B3F99158092 for ; Sun, 19 Sep 2021 11:55:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 99A7EE0977; Sun, 19 Sep 2021 11:55:27 +0000 (UTC) Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3DD49E0956 for ; Sun, 19 Sep 2021 11:55:26 +0000 (UTC) Received: by mail-oi1-x236.google.com with SMTP id y201so6092039oie.3 for ; Sun, 19 Sep 2021 04:55:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=6WGlm2pG/vdPvkhs5ab9zXcoRueSF5SXYthCQhq9ww8=; b=FTdyFsa2qqWpp612FmxNwy3AJsa2wTCDO1f8YylwkgFdcTSZLk+HKvVXm+C6Bx8BA1 RXXtHXFH55PP8Mh1a/8A20IYgPZsEN2HOsvhvX9mkBTC2PnQSk9Non8qx0dCCXrZ5CrR mbrHJf1pLzZGR2AZ/STfLwGddCMboq1Ke5MUuyH57rjRYcg2cny6dfTfjhHvkD1DO1EE D8fQ2eRJhxnZLw/2OVpD6Zu+V9g3I86gqTZTWUuW5tFI58P+iBdp/RZI7xYNH/eNnVA5 3FIyKfOHCW/KmTZfZ9fk8Nj0cmObKMC09A/fWE0GiklHPJ7mraKqOMt8m3wD5Yl/B1hU I7ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=6WGlm2pG/vdPvkhs5ab9zXcoRueSF5SXYthCQhq9ww8=; b=XpzI52dZMjpqu7NVX+rGB7nkBlkrO+5w4t7xqHN4YJQbSi4t8G5oa+AmYoIo2Y+z91 4q0Rkn/g4QM9ab7pq7v25TtQVQkOb1vg7XR6Gj3XewlvrCjb9AXXRC+nTgaIzRYpV/Ee bHdMEMv0sx+N/YpTtd3Pl4Bxqr5sa99Hv1pf4nMI27/GG0Mv3/X+4soifSlPX3ymhTTf Cz+SDbFadge02RW1aiI+euXcN3HiwcskKYLUDnDAP3JeMrloPFE0Okwl98y9dm64BbgG rnjDVrYeSR5Re6Ra2RryTZOorwPFljWyp8YfBfpd2L/9r+gMFch7VN23cq6ohQhuXXBO CwdA== X-Gm-Message-State: AOAM533fwFHKR16do4aqFYccLyJOJiJ69XglLnIL5rs4MNqpCpIqz1KX O4fyZX5CDPbgS+yQsoZLelc= X-Google-Smtp-Source: ABdhPJxapKY6J7UZa7RRswwLHps7EjvrcU5VrOSZk63Gdtn8iW1ipvpM6XBkyjxevUfF+H9DjOzOaw== X-Received: by 2002:aca:1101:: with SMTP id 1mr5182866oir.85.1632052525413; Sun, 19 Sep 2021 04:55:25 -0700 (PDT) Received: from [192.168.0.100] (adsl-074-188-245-131.sip.asm.bellsouth.net. [74.188.245.131]) by smtp.gmail.com with ESMTPSA id 99sm2864832otd.2.2021.09.19.04.55.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Sep 2021 04:55:24 -0700 (PDT) Subject: Re: [gentoo-user] cryptsetup close and device in use when it is not To: Gentoo User References: <70a1b488-c49e-6a94-a9a9-37eeb2ff4399@gmail.com> <9c9d5923-dccb-34d5-0f3b-16e07f337009@users.sourceforge.net> <649753f7-5dcd-1842-875d-d637ef754b9f@gmail.com> <3923b557-9d65-825b-e0fd-b1977c8d70c1@gmail.com> <7c279941-291a-5078-a83f-601ff58a6008@gmail.com> <9946c2eb-bb5c-a9c0-ced9-1ac269cd69a0@gmail.com> <6ecbf2d6-2c6f-3f66-5eee-f4766d5e5254@gmail.com> <24805.48814.331408.860941@tux.local> <5483630c-3cd1-bca2-0a6d-62bb85a5adc6@gmail.com> <6cb92a23-ba92-1cc6-5c9c-6d0d3e4b4349@gmail.com> From: Dale Openpgp: preference=signencrypt Autocrypt: addr=rdalek1967@gmail.com; prefer-encrypt=mutual; keydata= mQINBFxc7MgBEAC+zrgEdqJJiDe/UDAB+ScmferXWfJTVjbVT2T4DQ7jiLrgP9aNUo1HioNF mrU3JPOCR32gvZyTbY1+niO5+VSo/+pSqQ785h6ZDj1klMkrg6tEzGnf2MNBpBj4houZwxQ+ WDKKTg2M9F+lv8wTIdR/JQn+hSviktLMtrghQlyLhpapsLXWLA6gMFebpQYwxUwemvan8ddX lQvJe9FGyFYvBi0dp1gl10F2O+DVZJxvX8xkX+yImVlhVJiC31gXHRcj+Qlo7gprlU7TIieF Uow6/ZvYKJ26pztVdFCg5w0rMJkF/x8Zd4A6wnuptiAPmWaQ1+YKgYDonbDUgwqFSx5/lN5z DGZ4LlioxeUTTPVvZsqBIeDz6jNFA583OYbo1/S26dqrvTFf2DKlsvoDpVfAhNlwJPjoixs0 X3FNqPv+M10n4kq5Iz7Q9E3O4s/nfFIYGocEslVka7zZPkXSaHbsn+KJlY8XV6qxtCEdh0/V XX1+1aU2J74M0JikWhpwxTZ1dP5aOyWSPPEgFFIRW6xwwC02SoRH9a7mggfGYp/YjPlONNaT SCL8sgRfvmq3D0XTbLyTjSbExxkfKDmbePQagawDE3TlI/oivHf1JaAcbwMb3LZuU4TGcOIl 5D+x7q0MUIeCop0ZFOwAnqW3AVVNvsBkv2KN+IHJryWAf0/iMQARAQABtBtEYWxlIDxyZGFs ZWsxOTY3QGdtYWlsLmNvbT6JAk4EEwEIADgW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q6IpqL+Fk7iWV8Kjbz0wQOId6N9+JdQh3LrLaS7a1PowUm1z9DK5/O0 Yg+gpDnEOOFI7WM5u7a7FSM2Z/LXGVwel/0eWvLk9tN6 Message-ID: Date: Sun, 19 Sep 2021 06:55:20 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.9 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 39b0a47c-2345-41d1-8b64-98c463343e23 X-Archives-Hash: d69be2cd11cba56469af725b97e07300 Ramon Fischer wrote: > Hi Dale, > >>   So, something says it is busy but eventually >> releases it if left alone for a while.  I'd like to know what it is and >> if it is really in use or not.  Thing is, I can't find a way to know >> what it is that is using it.  The dmsetup command shows it is in use but >> no way to know what is using it. > I could reproduce this issue by killing my desktop process, unmounting > the home partition and playing some "kill process" bingo. I could > backtrace it to one unkillable process "kcryptd": > >    1. Kill "awesomewm": + Backspace >    2. Kill other processes accessing "/home/" >    3. umount /home >    4. cryptsetup close crypthome >    Device crypthome is still in use >    5. dmsetup info /dev/mapper/crypthome >    Name:              crypthome >    State:             ACTIVE >    Read Ahead:        256 >    Tables present:    LIVE >    Open count:        1 >    Event number:      0 >    Major, minor:      253, 1 >    Number of targets: 1 >    UUID: CRYPT-LUKS2--crypthome >    6. Kill any unnecessary process and try "cryptsetup close crypthome" >    7. Search for major, minor: ps aux | grep "253:1" >    root       150  0.2  0.0      0     0 ?        I    15:21   0:02 >    [kworker/u16:5-kcryptd/253:1] >    8. Does not work: kill 150 >    9. Does not work and could be dangerous: kill -9 150 > > So, there was still one "kcryptd" process left, accessing the hard > drive, but I found no way to kill it. > > Maybe this could be helpful? > > -Ramon > Well, it still does it but there is no rhyme or reason to when it says in use and when it closes when asked too.  I to saw a process kcryptd but not sure what triggers it. I didn't try to kill it since I'm pretty sure it is a kernel process.  I build everything into my kernel, no modules.  Sort of scared to mess with it.  So, sometimes it works as it should, sometimes not.  When it doesn't, if I leave it alone for a while then try again, it works.  I also checked to be sure SMART wasn't doing something but if it is, I couldn't see it.  Since it is a removable drive, I don't have it set to do anything either.  I guess I'll just have to wait on it to finish whatever it is doing to close it when it gets stubborn.  Maybe this is a bug, maybe it has a really good reason for not closing.  Who knows.  :/ Thanks to all for the help.  We gave it a good try. Dale :-)  :-)