From nobody Fri Jun 7 17:00:19 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VwnWR6y1mz5LMMh for ; Fri, 07 Jun 2024 17:00:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VwnWR5dCBz4vMZ for ; Fri, 7 Jun 2024 17:00:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717779619; a=rsa-sha256; cv=none; b=Xl8XVsbBQC/XVA0G9q6yFU5HidyQVQ81pfSBqYPVgtr6Np36Pet/CHopH9b00XWP0vYC8F Z69KUsBonxoYMjPYi9HZek42Xk4HBONWbz4RDz9vwMDvE3jaA8/f9T2yyPklgjhiq4gN/3 fhSQZw0k7hoRlb7Y3tDD+BEprBLZGgu0uPziVHFZ7yp74yJbPwvknt8FRs4tW3fPnEaw3F 23pydo64EKLC44ACKZ41XBJ+GIGHN/2dalq1RpxoLrrdr17ooTBdxlSIzb5rc/ElNqhVuh Z93UAvsOjd7el2Z1MHFXytOIQrprMI6+dxEYRYCcLug3CG7o0DPSEnVTB643ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717779619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U7MKeshmqm8si6FKK9q2RIZ3r9WT+aiBbUp3Lgi+aKM=; b=Y7/hU9iQlYDw7l3LKCEgi+qNO2YwIjPwdEEHr7+h8cAGlOp4iWMN8STaDGpsbv0eGhmrMj 0k4wco+VBlmvThn9J7OH6TzLLCGRji8q7/tT2dspcSIr899M95CxzBGiyH0dbpNNLRkpS1 vRm3PVJTGxML/lky4oVzjUfh2uMx4HaHLvrQ9wBDa4PA1zqwZDqQr8Ev5gSKyOdumeZC4l mnxKiuQoqYeO4mdt6+YTJ5kzURSQAMR8irlmUE769WxsanUeCbpRpd8s/k4AbAVN0sLW6/ 5JRUK00gEWCuBMwp4LuSgI7xIh1TEVERHTve01M7eHfaJ9HXRhyR2AV9CV+cKg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VwnWR57HtzMwq for ; Fri, 7 Jun 2024 17:00:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 457H0JkN092212 for ; Fri, 7 Jun 2024 17:00:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 457H0J4l092211 for bugs@FreeBSD.org; Fri, 7 Jun 2024 17:00:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 277060] pax(1) hangs in copy mode under certain conditions Date: Fri, 07 Jun 2024 17:00:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: martymac@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277060 Ganael LAPLANCHE changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martymac@FreeBSD.org Status|New |In Progress --- Comment #1 from Ganael LAPLANCHE --- Hello, I am facing the same bug too : $ mkdir -p /tmp/src/foo/bar $ rm -rf /tmp/dst ; mkdir -p /tmp/dst $ cd /tmp/src $ echo 'foo/bar/' | /bin/pax -r -w -d -pe "/tmp/dst" Here, pax(1) infinitely deletes and re-creates /tmp/dst/foo/bar/. The problem is that chk_path() (bin/pax/file_subs.c), called from node_crea= t() also creates the leaf directory when a trailing '/' appears in the directory name to create. When the execution goes back from chk_path() to node_creat(= ), the function still cannot create the leaf directory (it has been created by chk_path()), so it unlinks it and calls node_creat() again. The function re-creates it, and so on... A possible fix is to make node_creat() detect trailing slashes so it does N= OT create a leaf directory but only intermediate ones. I've added a simple che= ck in that way in the attached patch. Best regards, Ganael. --=20 You are receiving this mail because: You are the assignee for the bug.=