delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 13980385700A |
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
s=default; t=1599623322; | |
bh=2wRmBwL+nVRKYsFwKgmg+Kv6Z2xTEUjndsmgMHK+kjE=; | |
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: | |
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: | |
From; | |
b=FATkum0+1Tnf3u6mK53X7Kvocsbs0OME1K2YRK083xSsD9ZTVmi5p4mnLJcSNcAe3 | |
Xt9VPo50kyqVMBPtDqVJ8v7cLunJw55ingJkDBNdgeXEHsvlErfw8GW7DoDs4uxQIF | |
v1FOqcsEXx0WthrGQxfpfUT5k9FFw203QcPnNV9g= | |
X-Original-To: | cygwin AT cygwin DOT com |
Delivered-To: | cygwin AT cygwin DOT com |
DMARC-Filter: | OpenDMARC Filter v1.3.2 sourceware.org 28E163857C43 |
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=1e100.net; s=20161025; | |
h=x-gm-message-state:mime-version:references:in-reply-to:from:date | |
:message-id:subject:to:cc; | |
bh=QFs1oR5PBpYatGaHg6bseT8hcY5i6JRH1mFMJgdV0Lw=; | |
b=rXmUgYPo6km2ABAIpEZelB84p2urZyHaPWEY8y9f0LULH5q2Aii5LKtjdrhyy77Z48 | |
T8DRqiGZH5Xanc1bVKjBd5UmoT9a+sLoob8S6d0FpXtjW3wnb8R+3DGG6kMOciDbDsvk | |
2m/t0RZ7rLra44Ai9A7QqvWoO1IelpcHnreRPFkgUxGpr7BEj4DymFfK1+OMV2YsFcI6 | |
Trm2GM48FOzhGSI3wTszI2AdXda/YNGlHl2GCHn1+NKcgrCLnNj6+GVc7XZJ9z0x9RGG | |
E0HJgsfiC4TriDNAvDgJ3mHMrN4sWNtYOiuz8ez/yfCcUQ2MAbYBABPvDFFJafgokHb/ | |
8czA== | |
X-Gm-Message-State: | AOAM533n0FwWOSx+NdBihK7jEmKf3V9ilfq7P07JUt5LhE8qlxw2KR6R |
ozgD6WBwFunG6h3agCJ2fhp6NaS/+S9o/0M0Vk8= | |
X-Google-Smtp-Source: | ABdhPJzcYvvIySv1nBWJsZKbeiCIFq7i9u23untbPkiK4yvRS0vZaQnZD5rHLwsCCPSv7+YEMjG7A7kXoie2W09Ly8I= |
X-Received: | by 2002:a17:906:a00c:: with SMTP id |
p12mr1640368ejy.10.1599623317111; | |
Tue, 08 Sep 2020 20:48:37 -0700 (PDT) | |
MIME-Version: | 1.0 |
References: | <CAJtSMgtgAvB3Fin-gtmU5qr3xYnq4_53S2UD3yqAVDVMkAfMSQ AT mail DOT gmail DOT com> |
<26aedc53-30f2-d1a2-f9e8-c8a5dfa548c1 AT cornell DOT edu> | |
<6c7185c9-f0a5-2b73-974f-04b55f8e6508 AT cornell DOT edu> | |
<e0744a67-33e7-57cc-3ebc-a0e812dbb83f AT cornell DOT edu> | |
<0ed7b3f0-7e2b-eb28-596b-6dcba9ee51dd AT cornell DOT edu> | |
<76a478c7-fabe-b8e9-581e-9ffcc08f53ed AT cornell DOT edu> | |
In-Reply-To: | <76a478c7-fabe-b8e9-581e-9ffcc08f53ed@cornell.edu> |
Date: | Tue, 8 Sep 2020 20:48:28 -0700 |
Message-ID: | <CAJtSMgvAyB6PgJFsjzUX9fmYX7Tqm17OJgUOy+kFb5TSSt05rQ@mail.gmail.com> |
Subject: | Re: ag 2 <(echo 2) gets assertion "p >= path" failed: .. |
/cygwin-3.1.7 ... /cygwin/path.cc", line 3065, | |
function: int symlink_info::check | |
To: | Ken Brown <kbrown AT cornell DOT edu> |
X-Spam-Status: | No, score=-2.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, |
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, | |
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, | |
TXREP autolearn=ham autolearn_force=no version=3.4.2 | |
X-Spam-Checker-Version: | SpamAssassin 3.4.2 (2018-09-13) on |
server2.sourceware.org | |
X-Content-Filtered-By: | Mailman/MimeDel 2.1.29 |
X-BeenThere: | cygwin AT cygwin DOT com |
X-Mailman-Version: | 2.1.29 |
List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
List-Subscribe: | <https://cygwin.com/mailman/listinfo/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
From: | David Dyck via Cygwin <cygwin AT cygwin DOT com> |
Reply-To: | David Dyck <david DOT dyck AT gmail DOT com> |
Cc: | cygwin AT cygwin DOT com |
Sender: | "Cygwin" <cygwin-bounces AT cygwin DOT com> |
Thank you Ken, Corinna, and list members On Tue, Sep 8, 2020 at 12:32 PM Ken Brown <kbrown AT cornell DOT edu> wrote: > On 9/8/2020 3:26 PM, Ken Brown via Cygwin wrote: > > On 9/7/2020 4:35 PM, Ken Brown via Cygwin wrote: > >> On 9/6/2020 4:28 PM, Ken Brown via Cygwin wrote: > >>> On 9/6/2020 3:47 PM, Ken Brown via Cygwin wrote: > >>>> On 9/6/2020 2:43 PM, David Dyck via Cygwin wrote: > >>>>> This command triggers an assertion failure > >>>>> "ag" is from the_silver_searcher > >>>>> > >>>>> $ ag 2 <(echo 2) > >>>>> assertion "p >= path" failed: file > >>>>> > "/home/corinna/src/cygwin/cygwin-3.1.7/cygwin-3.1.7-1.x86_64/src/newlib-cygwin/winsup/cygwin/path.cc", > > >>>>> > >>>>> line 3065, function: int symlink_info::check(char*, const > >>>>> suffix_info*, fs_info&, path_conv_handle&) > >>>>> Aborted (core dumped) > >>>>> > >>>>> 3473k 2020/08/22 C:\cygwin64\bin\cygwin1.dll > >>>>> Cygwin DLL version info: > >>>>> DLL version: 3.1.7 > >>>>> bash > 4.4.12-3 OK > >>>>> the_silver_searcher > 2.2.0-1 OK > >>>> [...] > >>>>> assertion "p >= path" failed: file > >>>>> > "/home/corinna/src/cygwin/cygwin-3.1.7/cygwin-3.1.7-1.x86_64/src/newlib-cygwin/winsup/cygwin/path.cc", > > >>>>> > >>>>> line 3065, function: int symlink_info::check(char*, const > >>>>> suffix_info*, fs_info&, path_conv_handle&) > >>>>> Aborted (core dumped) > >>>> [...] > >>>>> I've reported this on github as an "ag" bug, but I think it is a bug > in cygwin > >>>> > >>>> An assertion failure in Cygwin code is a Cygwin bug. I'll take a > look. > >>> > >>> Running > >>> > >>> bash -c '/usr/bin/ag 2 <(echo 2)' > >>> > >>> under strace yields the following: > >>> > >>> 242 191767 [main] ag 33659 open: open(/dev/fd/63/.ignore, 0x0) > >>> [...] > >>> 30 192584 [main] ag 33659 mount_info::conv_to_win32_path: > src_path > >>> /proc/self/fd/63/.ignore, dst /proc/self/fd/63/.ignore, flags 0x0, rc 0 > >>> [...] > >>> 31 193366 [main] ag 33659 mount_info::conv_to_win32_path: > >>> conv_to_win32_path (pipe:[4295036184]/.ignore) > >>> [...] > >>> 31 193550 [main] ag 33659 mount_info::conv_to_win32_path: > >>> conv_to_win32_path (pipe:[4295036184]) > >>> [...] > >>> 34 193615 [main] ag 33659 symlink_info::check: 0xC0000034 = > NtCreateFile > >>> (\??\C:pipe:[4295036184]) > >>> > >>> The assertion fails because the path 'C:pipe:[4295036184]' doesn't > contain a > >>> backslash. But probably we should never have allowed ourselves to get > to the > >>> point of considering that path. > >> > >> I've made some progress but haven't figured out the fix yet. First, > for > >> easier debugging, here's a simpler way to reproduce the problem: > >> > >> $ cat proc_bug.c > >> #include <unistd.h> > >> #include <stdio.h> > >> #include <stdlib.h> > >> #include <fcntl.h> > >> > >> int > >> main () > >> { > >> int fd[2]; > >> char fname[100]; > >> > >> if (pipe (fd) < 0) > >> { > >> perror ("pipe"); > >> exit (1); > >> } > >> sprintf (fname, "/dev/fd/%d/foo", fd[0]); > >> if (open (fname, O_RDONLY) < 0) > >> { > >> perror ("open"); > >> exit (1); > >> } > >> } > >> > >> $ gcc -o proc_bug proc_bug.c > >> > >> $ ./proc_bug.exe > >> assertion "p >= path" failed: file > >> "../../../../newlib-cygwin/winsup/cygwin/path.cc", line 3065, function: > int > >> symlink_info::check(char*, const suffix_info*, fs_info&, > path_conv_handle&) > >> Aborted (core dumped) > >> > >> Here's what happens. The program is trying to open /dev/fd/3/foo, > where file > >> descriptor 3 is the read end of a pipe. path_conv check resolves this > to > >> /proc/<pid>/fd/3/foo, creates an fhandler_process for this path, and > calls (at > >> path.cc:782) fhandler_process::exists. The latter fills the filebuf > with > >> "pipe:[xxxxxxxxxx]/foo" and returns virt_fsdir. We're now at > path.cc:808, and > >> everything is set up for the assertion failure. > > > > This is now fixed. David, you can test it as soon as Corinna has a > chance to > > make a new Cygwin snapshot. > > That's now done: > > https://cygwin.com/snapshots/ > > Ken > Thank you! My first time through https://cygwin.com/snapshots/ and https://cygwin.com/faq.html#faq.setup.snapshots Installed the dll alone ( https://cygwin.com/snapshots/x86_64/cygwin1-20200908.dll.xz ) and the tests I performed were successful $ ack 2 <(echo 2) 2 -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |