delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:from:to:subject:date:message-id:content-type | |
:content-transfer-encoding:mime-version; q=dns; s=default; b=kK2 | |
F2AZ3k5WnF3giEmgs1/x+PNYPgQ5HXS43VIssZ+TA/0ayjWaZJyUSjtqUX3Yn5Z8 | |
IDs4WefLjEed4xjwmhGD80VO+FC88D+IqMwGZljasZirqtHR1hUkB+wso93BBgPP | |
EcUq6fKbekQpZ1FTnlF0KSrFzerTHti+DchlXnEY= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:from:to:subject:date:message-id:content-type | |
:content-transfer-encoding:mime-version; s=default; bh=Xl5uBB0js | |
uHoGcJO7km7zmg8MiY=; b=xioFc3coqRQq9HFrNWhJ6sBh/GNmvyHbMq0BQkMj0 | |
xSzhXoJQqb2A2GSoTsqo/L1TGsiTfha1awspucI/EKASTFJKPRoPH6u51oZjbz9k | |
A4D0wqeNfuFylbKbXz2PxuuyFLROcaJfZJGlku2wh4Srya6kcUnWZXKfp3bHf72u | |
hI= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=2.9 required=5.0 tests=AWL,BAYES_20,KAM_LAZY_DOMAIN_SECURITY,MIME_BASE64_BLANKS autolearn=no version=3.3.2 |
X-HELO: | mx-relay33-dus.antispameurope.com |
From: | Vermessung AVT - Wolfgang Rieger <w DOT rieger AT avt DOT at> |
To: | "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com> |
Subject: | Re: gawk: Bad File Descriptor error with concurrent readonly access to a network file |
Date: | Tue, 27 Oct 2015 23:30:49 +0000 |
Message-ID: | <AB495CE313664A489959F8DEF45069A90188AA3118@EXSRV01.avt-imst.local> |
MIME-Version: | 1.0 |
X-cloud-security-sender:w DOT rieger AT avt DOT at : | |
X-cloud-security-recipient:cygwin AT cygwin DOT com : | |
X-cloud-security-Virusscan:CLEAN : | |
X-cloud-security-disclaimer: | This E-Mail was scanned by E-Mailservice on mx-gate33-dus with 2780C2018005 |
X-cloud-security-connect: | 46-243-105-14.cni.at[46.243.105.14], TLS=1, IP=46.243.105.14 |
X-cloud-security:scantime:.1238 : | |
X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id t9RNVAaa027518 |
From: Corinna Vinschen [mailto:corinna-cygwin AT cygwin DOT com] Sent: Tuesday, October 27, 2015 10:53 To: cygwin AT cygwin DOT com Subject: Re: gawk: Bad File Descriptor error with concurrent readonly access to a network file (Snip) > Cygwin uses full sharing for all files it opens, unless the file is opened in very specific circumstances (e.g, creating a symlink, > deleting a file). "Bad file descriptor" doesn't point to a sharing problem. > It seems the handle is unusable or something. > > I tried your testcase and I can't reproduce the problem in my environment. > Have you tried catching a trace of the problem via strace? > It would be helpful to see where the EBADF occurs. Here is the portion of strace output where IMHO the error occurs. The behaviour is quite different when running with strace, so I hope it is the same error situation, but at least the message given is "Bad file descriptor". I changed the paths to ???. This is strace --mask=syscall. If you need further info I would appreciate to send it directly to you since there is a lot of info in strace I do not want to put into the www: 197 70416 [main] gawk 3844 open: 3 = open(???\datafile.txt, 0x8000) 327 70743 [main] gawk 3844 fcntl64: 0 = fcntl(3, 1, 0x0) 265 71008 [main] gawk 3844 fcntl64: 0 = fcntl(3, 2, 0x1) 3298 74306 [main] gawk 3844 fhandler_base::fstat_helper: 0 = fstat (\??\???\datafile.txt, 0x8004AEF8) st_size=135, st_mode=0100644, st_ino=281474976912276st_atim=551A9D6D.BD48F54 st_ctim=5603C3F5.26F49798 st_mtim=54E1ECAE.B2A66C8 st_birthtim=551A9D6D.BD48F54 206 74512 [main] gawk 3844 fstat64: 0 = fstat(3, 0x8004AEF8) 216 74728 [main] gawk 3844 isatty: 0 = isatty(3) 1887 76615 [main] gawk 3844 fhandler_base::fstat_helper: 0 = fstat (\??\???\datafile.txt, 0x8004AEF8) st_size=135, st_mode=0100644, st_ino=281474976912276st_atim=551A9D6D.BD48F54 st_ctim=5603C3F5.26F49798 st_mtim=54E1ECAE.B2A66C8 st_birthtim=551A9D6D.BD48F54 241 76856 [main] gawk 3844 fstat64: 0 = fstat(3, 0x8004AEF8) 304 77160 [main] gawk 3844 read: read(3, 0x8004AF90, 135) blocking 1722 78882 [main] gawk 3844 seterrno_from_nt_status: /home/corinna/src/cygwin/cygwin-1.7.33/cygwin-1.7.33-1.i686/src/src/winsup/cygwin/fhandler.cc:276 status 0xC0000128 -> windows error 6 210 79092 [main] gawk 3844 geterrno_from_win_error: windows error 6 == errno 9 170 79262 [main] gawk 3844 read: -1 = read(3, 0x8004AF90, -1), errno 9 A successful call goes on after the "read: read(3, ..., 135)" like this: 129 187614 [main] gawk 4452 fhandler_base::read: returning 135, text mode 147 187761 [main] gawk 4452 read: 135 = read(3, 0x8004AF80, 135) 181 187942 [main] gawk 4452 read: read(3, 0x8004AF80, 135) blocking 130 188072 [main] gawk 4452 fhandler_base::read: returning 0, text mode 150 188222 [main] gawk 4452 read: 0 = read(3, 0x8004AF80, 0) 350 188572 [main] gawk 4452 close: close(3) 163 188735 [main] gawk 4452 fhandler_base::close: closing '???/datafile.txt' handle 0x12C Thanks, Wolfgang
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |