From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13527 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: aio_cancel segmentation fault for in progress write requests Date: Fri, 7 Dec 2018 11:52:17 -0500 Message-ID: <20181207165217.GE23599@brightrain.aerifal.cx> References: <20181207154419.GD23599@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1544201431 18555 195.159.176.226 (7 Dec 2018 16:50:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 7 Dec 2018 16:50:31 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) Cc: musl@lists.openwall.com To: Arkadiusz Sienkiewicz Original-X-From: musl-return-13543-gllmg-musl=m.gmane.org@lists.openwall.com Fri Dec 07 17:50:27 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1gVJKd-0004hl-4J for gllmg-musl@m.gmane.org; Fri, 07 Dec 2018 17:50:27 +0100 Original-Received: (qmail 26217 invoked by uid 550); 7 Dec 2018 16:52:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 26193 invoked from network); 7 Dec 2018 16:52:35 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:13527 Archived-At: On Fri, Dec 07, 2018 at 05:04:07PM +0100, Arkadiusz Sienkiewicz wrote: > Ok, maybe stacktrace is misleading due to some problem in GDB. However, It's not just the backtrace that's misleading, but also the point of crash. The point gdb has stopped at is prior to the crash. However... > that doesn't explain why I'm getting segmentation fault when I execute test > program without gdb. Also commenting aio_cancel line will "fix" seg fault, > so that function is most probable culprit. it seems from your output, which lacks the message: aio_write/1-1.c cancelationStatus : 2 that the crash happened before the printf was reached. It's not clear to me what could have caused it though. Calling close also performs the equivalent of aio_cancel on the fd. Can you try running under strace (with -f option) or anything else that might give further clues as to where/why it crashed? valgrind might also be a good idea. Rich