Received: from mx1.tetrasec.net (mx1.tetrasec.net [74.117.189.118]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 5931A782BC2 for <~alpine/users@lists.alpinelinux.org>; Fri, 24 Jan 2020 08:40:13 +0000 (UTC) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 9AB9C2DE43C0; Fri, 24 Jan 2020 08:40:11 +0000 (UTC) Received: from ncopa-desktop.copa.dup.pw (67.63.200.37.customer.cdi.no [37.200.63.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: alpine@tanael.org) by mx1.tetrasec.net (Postfix) with ESMTPSA id C92902DE42C4; Fri, 24 Jan 2020 08:40:10 +0000 (UTC) Date: Fri, 24 Jan 2020 09:40:03 +0100 From: Natanael Copa To: alpine@zxv.nl Cc: ~alpine/users@lists.alpinelinux.org Subject: Re: kernel 5.5 busybox rm: can't remove: Directory not empty Message-ID: <20200124094003.0345e3ab@ncopa-desktop.copa.dup.pw> In-Reply-To: References: X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-alpine-linux-musl) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 23 Jan 2020 23:39:17 +0100 alpine@zxv.nl wrote: > While trying the kernel 5.5 release candidate for Fedora 31 I'm > running into an issue with busybox rm where it seems unable to > recursively remove directories with specific content, leaving one > seemingly random file. > > It doesn't happen with fedora's busybox, going back to kernel 5.4 or > installing coreutils fixes the problem. I wonder if this is related the lchown problem. There was a long thread about that on musl libc mailing list: https://www.openwall.com/lists/musl/2020/01/22/7 What filesystem do you use? Does it happen on other filesystems as well? Can you reproduce it without docker? You can get the busybox-static.apk from http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/busybox-static-1.31.1-r9.apk (you can use `tar -zxf busybox-static-*.apk bin/busybox.static` to extract it) Can you reproduce it when running `strace busybox rm -rf`? Thanks! > Steps to reproduce: > > $ docker run -ti --rm alpine:3.11.3 > / # uname -a > Linux 258313de78b9 5.5.0-0.rc6.git0.1.fc32.x86_64 #1 SMP Mon Jan 13 > 18:52:03 UTC 2020 x86_64 Linux / # wget > https://github.com/michaelrsweet/htmldoc/releases/download/v1.9.7/htmldoc-1.9.7-source.tar.gz > Connecting to github.com (140.82.118.4:443) Connecting to > github-production-release-asset-2e65be.s3.amazonaws.com > (52.216.22.11:443) saving to 'htmldoc-1.9.7-source.tar.gz' > htmldoc-1.9.7-source 100% > |****************************************************************************************************************| > 4360k 0:00:00 ETA 'htmldoc-1.9.7-source.tar.gz' saved / # tar xf > htmldoc-1.9.7-source.tar.gz / # rm -rf htmldoc-1.9.7 rm: can't remove > 'htmldoc-1.9.7/fonts': Directory not empty rm: can't remove > 'htmldoc-1.9.7/jpeg': Directory not empty / # rm -rf htmldoc-1.9.7 > / # > > > Another reproducer where it breaks building docker php based images > that add the mysqli extension: > > $ docker run --rm php:alpine docker-php-ext-install mysqli > fetch > http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz > fetch > http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz > (1/25) Installing m4 (1.4.18-r1) (2/25) Installing libbz2 (1.0.8-r1) > (3/25) Installing perl (5.30.1-r0) ... > (23/25) Purging mpc1 (1.1.0-r1) > (24/25) Purging mpfr4 (4.0.2-r1) > (25/25) Purging gmp (6.1.2-r1) > Executing busybox-1.31.1-r9.trigger > OK: 19 MiB in 32 packages > rm: can't remove '/usr/src/php/sapi/phpdbg/tests': Directory not empty > rm: can't remove '/usr/src/php/ext/sockets/tests': Directory not empty > rm: can't remove '/usr/src/php/ext/ffi/tests': Directory not empty > rm: can't remove '/usr/src/php/ext/gd/libgd': Directory not empty > rm: can't remove '/usr/src/php/ext/soap/tests/soap12': Directory not > empty rm: can't remove > '/usr/src/php/ext/soap/tests/interop/Round3/GroupD': Directory not > empty rm: can't remove '/usr/src/php/ext/mysqlnd': Directory not > empty rm: can't remove '/usr/src/php/ext/ftp/tests': Directory not > empty rm: can't remove '/usr/src/php/ext/phar/tests/tar/files': > Directory not empty rm: can't remove '/usr/src/php/ext/hash/tests': > Directory not empty rm: can't remove > '/usr/src/php/ext/standard/tests/network': Directory not empty rm: > can't remove '/usr/src/php/Zend/tests/return_types': Directory not > empty $