From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) by sourceware.org (Postfix) with ESMTPS id BD6FE3858414 for ; Mon, 11 Mar 2024 10:27:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD6FE3858414 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nrubsig.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BD6FE3858414 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.166.172 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 Received: by mail-il1-f172.google.com with SMTP id e9e14a558f8ab-3664c7f5a18so5180495ab.0 for ; Mon, 11 Mar 2024 03:27:29 -0700 (PDT) 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: From: Roland Mainz 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@cygwin.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 List-Id: On Mon, Mar 11, 2024 at 8:01=E2=80=AFAM Cedric Blancher via Cygwin wrote: > On Fri, 8 Mar 2024 at 03:25, Dan Shelton via Cygwin w= rote: > > 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=3D/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=3D/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 =3D 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 =3D 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 000000C= 3 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 wh= y... 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 --=20 __ . . __ (o.\ \/ /.o) roland.mainz@nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /=3D=3D\ O\ TEL +49 641 3992797 (;O/ \/ \O;)