X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1FA2C3858429 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1710152910; bh=IEpJ7oUensAYB50y8V3iWxX//Lt2t5n7pP67fZD1AV4=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=XIjfeauMq+0ws0kYHdryu0Nrk8eZPjg25NTbt3L+/yhc83l9Whu+l2Udu9mkTC3eo 2YRJ/DEsr29OUMCCkA3pQ7UsvTAAhqWkXW4n/YhtEkG5vRM9nEK99bAnHY7KQcSB85 jNbOSHZOFpzv3gUWqNFzbgi4q+fulW5WOwB2cR04= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD6FE3858414 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BD6FE3858414 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710152852; cv=none; b=kVR8XiwRKjGJglB/7haAqwwK0Y0z1Tz9xKB836o4zSgf2gqmhlqX70RF7W8rP2l+NmRPR3clrOHGfjtFJrAZnmnPN/ZxKLnDwG3iJ6f3ycxPib5Czd6tYiPVbSYIg2ecff5KFL1qvBOGW5nMXQFp/XzAFMPwTcrFiwBgQg4jA4E= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710152852; c=relaxed/simple; bh=D7aCm1+GzFNVsFzdra2g13VBhfIZA3TvhJsQqlZnBEY=; h=MIME-Version:From:Date:Message-ID:Subject:To; b=qdExhAD7JQ5nPhRzP4vi0CRQmNsUP8bZ5Qvvhq+nyo0IqAnx2ylC3+++eeg8gv+7DcfxiaStI477woeDH0Z1eNo2IMKsFWTmfiPeeA4UpPWvDS1SIYN7gQl4qHr58dJpYGsFblE4eGSIscdaE+rTEhP6iow2nGpv/EX8un53Pv0= ARC-Authentication-Results: i=1; server2.sourceware.org X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710152848; x=1710757648; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gkJV/YnksXbxITeAFG+hAoKxKsSgc266Khf707aUX88=; b=QzexM93Oa3uu8d5i1MAyWT5/CEfQMWkbBOH1tfQ4HDN7p21+rP2p6MW5aOsnRH8jfd e0/qjU2RP0Jld6uR6mG3mQXYfQIC5wVBkAojUdSN0W+vSp0pnwV/D6nP+F062ysBwX2a drgqGWQua9uodNduoJlhtNe3pbPOdLvIX4ZKMHhlcYNnrqbBC50LvWhd83DZSgFvjt9S /XOzRlnYgHRaPgLoAm2RNuy8gZYY5/CNZwsc9C8mgW/PRM+PLYeE6pr8d5YrwdmrcVGE COsNSS/QU660L5ccIquBanmaepcD9az8OYIQtituFnAXdxmRfh+nOuLvZ5D2pfrK0AkN Tb/A== X-Gm-Message-State: AOJu0Yw8RIo4owcsagzOfwtXcTxpYq7yp5QKY1tMK1pUfDVUzoE+0XvS xP5FIUXvHKTvcCfeQZW9ziP1nBNM9Cyo4J2DbT0sA6lsWg461bPM+aElsQZeJx4IlhbLTyiXcuF cutwmM4vdrhs4jFx3TtEjaDHYb9NXrL9NYFk= X-Google-Smtp-Source: AGHT+IGJx0Zw26Kl1haWEY97kQv7TGbndYAXPKTvmNqc+ObmbuD3Gj+YjOP67F4XEIt+r0RaQEzNwSOrUthEb/1RjuE= X-Received: by 2002:a6b:4e12:0:b0:7c8:a848:4cb1 with SMTP id c18-20020a6b4e12000000b007c8a8484cb1mr5880180iob.20.1710152848429; Mon, 11 Mar 2024 03:27:28 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 11 Mar 2024 11:27:01 +0100 Message-ID: Subject: Re: Cygwin 3.5.1: unable to open output file '/cygdrive/t/tmpdir/x-01564d.o': 'Operation not permitted' To: cygwin AT cygwin DOT com X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Roland Mainz via Cygwin Reply-To: Roland Mainz Content-Type: text/plain; charset="utf-8" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 42BASWic1576897 On Mon, Mar 11, 2024 at 8:01 AM Cedric Blancher via Cygwin wrote: > On Fri, 8 Mar 2024 at 03:25, Dan Shelton via Cygwin wrote: > > I've run into a problem with clang on Cygwin 3.5.1 and 3.6. My machine > > does not have much disk space left, so I switched TMPDIR to the > > network drive. But clang then failed, like this: > > > > $ cat x.c > > #include > > int main(int ac, char *av[]) { puts("hello world"); return 0 ; } > > $ mkdir /cygdrive/t/tmpdir > > $ TMPDIR=/cygdrive/t/tmpdir clang x.c > > error: unable to open output file '/cygdrive/t/tmpdir/x-01564d.o': > > 'Operation not permitted' > > 1 error generated. > > > > /cygdrive/t/tmpdir/ is a clean dir. > > /usr/bin/touch /cygdrive/t/tmpdir/dummy works without problems > > I can confirm the bug, but only for the clang version linked to > Cygwin. clang version of MinGW does not show that error, so this looks > like a Cygwin bug. I can reproduce the bug on Cygwin "CYGWIN_NT-10.0-19045 3.6.0-0.73.gc2310061c66a.x86_64": ---- snip ---- $ cat x.c #include int main(int ac, char *av[]) { puts("hello world"); return 0 ; } $ TMPDIR=/cygdrive/t/tmpdir/ strace -o clang_tmpdir_on_nfs41fs.log "C:\cygwin64\bin\clang-8.exe" x.c error: unable to open output file '/cygdrive/t/tmpdir/x-8cb6f7.o': 'Operation not permitted' 1 error generated. ---- snip ---- Full strace log is at https://nrubsig.kpaste.net/ff6248c25 (I use the line numbers from that site below). It seems starting with line 2949 this goes wrong: ---- snip ---- 505 5069822 [main] clang-8 40295 symlink_info::check: 0x0 = NtCreateFile (\??\T:\tmpdir\x-8cb6f7.o) 3645 5073467 [main] clang-8 40295 symlink_info::check: not a symlink 266 5073733 [main] clang-8 40295 symlink_info::check: 0 = symlink.check(T:\tmpdir\x-8cb6f7.o, 0x7FFFF96E0) (mount_flags 0x4020, path_flags 0x0) 310 5074043 [main] clang-8 40295 path_conv::check: this->path(T:\tmpdir\x-8cb6f7.o), has_acls(1) 305 5074348 [main] clang-8 40295 build_fh_pc: fh 0x800027A30, dev 000000C3 1441 5075789 [main] clang-8 40295 __set_errno: int check_access(security_descriptor&, GENERIC_MAPPING&, ACCESS_MASK, int, bool):600 setting errno 13 257 5076046 [main] clang-8 40295 check_file_access: flags 0x2, ret -1 ---- snip ---- So |build_fh_pc()| somehow fails with error 13... but I don't understand why... And then there is this weird ACL: ---- snip ----- $ ls -l /cygdrive/t/tmpdir/x-8cb6f7.o -rw------- 1 Unix_User+197608 Unix_Group+197121 0 Mar 11 11:00 /cygdrive/t/tmpdir/x-8cb6f7.o $ getfacl /cygdrive/t/tmpdir/x-8cb6f7.o # file: /cygdrive/t/tmpdir/x-8cb6f7.o # owner: Unix_User+197608 # group: Unix_Group+197121 user::--- group::--- other::--- ---- snip ---- /usr/bin/file, echo&&/&/usr/bin/cat can read/write that file ---- snip ---- $ file /cygdrive/t/tmpdir/x-8cb6f7.o /cygdrive/t/tmpdir/x-8cb6f7.o: empty $ echo "foo" >>/cygdrive/t/tmpdir/x-8cb6f7.o $ cat /cygdrive/t/tmpdir/x-8cb6f7.o foo ---- snip ---- I have no idea why clang fails in this case... I need help with this one... ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland DOT mainz AT nrubsig DOT org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple