X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6C30C3858D31
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
 header.from=dronecode.org.uk
Authentication-Results: sourceware.org;
 spf=none smtp.mailfrom=jon.turney@dronecode.org.uk
Authentication-Results: btinternet.com;
 auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com
X-Originating-IP: [86.158.32.4]
X-OWM-Source-IP: 86.158.32.4 (GB)
X-OWM-Env-Sender: jonturney@btinternet.com
X-VadeSecure-score: verdict=clean score=0/300, class=clean
X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduhedrgeefgddutddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhuffvfhfkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucfkphepkeeirdduheekrdefvddrgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddujegnpdhinhgvthepkeeirdduheekrdefvddrgedpmhgrihhlfhhrohhmpeeojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhequceuqfffjgepkeeukffvoffkoffgpdhrtghpthhtohepoegthihgfihinhestgihghifihhnrdgtohhmqedprhgtphhtthhopeeohhhsghhgvggshhgrrhguthesghhmrghilhdrtghomheq
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
From: Jon Turney <jon.turney@dronecode.org.uk>
Subject: Re: X crashes with SIGPIPE
To: The Cygwin Mailing List <cygwin@cygwin.com>
References: <faff3a3252644ab0f41d02854413932c9932e7af.camel@gmail.com>
Message-ID: <a4840a16-3739-a340-8c1f-23ad10b0d48c@dronecode.org.uk>
Date: Mon, 20 Apr 2020 18:03:36 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <faff3a3252644ab0f41d02854413932c9932e7af.camel@gmail.com>
Content-Language: en-GB
X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00, FORGED_SPF_HELO,
 KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_BARRACUDACENTRAL,
 RCVD_IN_DNSWL_LOW, SPF_HELO_PASS, SPF_NONE,
 TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Cc: Henry Gebhardt <hsggebhardt@gmail.com>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: cygwin-bounces@cygwin.com
Sender: "Cygwin" <cygwin-bounces@cygwin.com>

On 18/04/2020 04:38, Henry Gebhardt via Cygwin wrote:
> Hi,
> 
> Cygwin/X crashes every few days for me. I managed to obtain a backtrace
> from the last crash (attached). Server log is also included.
> 
> I have not, yet, managed to pin down the exact trigger for the crash. I
> am running two graphical programs under Windows 10 WSL2 Debian: tilix
> and evince.
> 
> Thank you for any help.

Thanks for reporting this issue.

I am assuming, although it's not totally clear from your report, that 
you are starting the X server with '-listen tcp', and are setting 
DISPLAY to localhost:0.0 or similar in your WSL environment.

> Thread 1 received signal SIGPIPE, Broken pipe.
> [Switching to Thread 2952.0x1144]
> 0x000000010053f250 in _XSERVTransSocketWritev (ciptr=0xffffbb18,
>     buf=0xffffbc10, size=-17396) at /usr/include/X11/Xtrans/Xtranssock.c:2382
> 2382    /usr/include/X11/Xtrans/Xtranssock.c: No such file or directory.

I'm not sure this is the actual point of failure (since the X server 
should be setting SIGPIPE to be ignored), so you probably need to tell 
gdb not to stop on it e.g. 'handle sigpipe ignore'.

In any case, a sigpipe here indicates that the X client has already 
closed when the X server tries to write to it's socket.

Assuming gdb is giving accurate information here, this is also looks 
very odd, as a negative value of size (which is used as iovcnt passed to 
write) doesn't make a lot of sense.
--
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
