mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "A. Wilcox" <awilfox@adelielinux.org>
To: musl@lists.openwall.com
Subject: Re: aio_cancel segmentation fault for in progress write requests
Date: Fri, 7 Dec 2018 16:51:03 -0600	[thread overview]
Message-ID: <a41b688f-dfae-c4b2-d58e-df797ede8a09@adelielinux.org> (raw)
In-Reply-To: <20181207203532.GA2554@voyager>


[-- Attachment #1.1: Type: text/plain, Size: 2211 bytes --]

On 12/07/18 14:35, Markus Wichmann wrote:
> On Fri, Dec 07, 2018 at 01:13:44PM -0600, A. Wilcox wrote:
>> So, my best theory is that running inside a debugger (gdb, valgrind)
>> makes it slow enough that it no longer races.
> 
> Two ideas to investigate further. 1: Produce a coredump ("ulimit -c
> unlimited"). That won't interfere with timing, but I have no clue if
> coredumps work with multithreading.

Core was generated by `./aioWrite '.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  __cp_end () at src/thread/powerpc64/syscall_cp.s:32
32      src/thread/powerpc64/syscall_cp.s: No such file or directory.
[Current thread is 1 (LWP 5507)]
(gdb) bt
#0  __cp_end () at src/thread/powerpc64/syscall_cp.s:32
#1  0x00003fffa768f2a4 in __syscall_cp_c (nr=180, u=512512, v=0, w=0,
x=0, y=0, z=0) at src/thread/pthread_cancel.c:35
#2  0x00003fffa768e008 in __syscall_cp (nr=<optimized out>, u=<optimized
out>, v=<optimized out>, w=<optimized out>, x=<optimized out>,
y=<optimized out>, z=<optimized out>) at src/thread/__syscall_cp.c:20
#3  0x00003fffa76969f4 in pwrite (fd=<optimized out>, buf=<optimized
out>, size=<optimized out>, ofs=<optimized out>) at src/unistd/pwrite.c:7
#4  0x00003fffa763eddc in io_thread_func (ctx=<optimized out>) at
src/aio/aio.c:240
#5  0x00003fffa768f76c in start (p=0x3fffa76e8af8) at
src/thread/pthread_create.c:147
#6  0x00003fffa769b608 in __clone () at src/thread/powerpc64/clone.s:43
(gdb) thread 2
[Switching to thread 2 (LWP 5506)]
#0  0x00003fffa7637144 in __syscall4 (d=0, c=-1, b=128, a=512, n=221) at
./arch/powerpc64/syscall_arch.h:54
54      ./arch/powerpc64/syscall_arch.h: No such file or directory.
(gdb) bt
#0  0x00003fffa7637144 in __syscall4 (d=0, c=-1, b=128, a=512, n=221) at
./arch/powerpc64/syscall_arch.h:54
#1  __wait (addr=0x200, waiters=0x0, val=<optimized out>,
priv=<optimized out>) at src/thread/__wait.c:13
#2  0x00003fffa763f07c in aio_cancel (fd=<optimized out>,
cb=0x3fffffafd2b8) at src/aio/aio.c:356
#3  0x000000012034c044 in main ()


221 is SYS_futex.  Wow, that looks wrong.

Best,
--arw

-- 
A. Wilcox (awilfox)
Project Lead, Adélie Linux
https://www.adelielinux.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2018-12-07 22:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07 12:52 Arkadiusz Sienkiewicz
2018-12-07 15:44 ` Rich Felker
2018-12-07 16:04   ` Arkadiusz Sienkiewicz
2018-12-07 16:52     ` Orivej Desh
2018-12-07 16:52     ` Rich Felker
2018-12-07 17:31       ` A. Wilcox
2018-12-07 18:26         ` Rich Felker
2018-12-07 19:05           ` A. Wilcox
2018-12-07 20:07             ` Rich Felker
2018-12-07 19:13           ` A. Wilcox
2018-12-07 20:21             ` Rich Felker
2018-12-07 20:35             ` Markus Wichmann
2018-12-07 21:12               ` Rich Felker
2018-12-07 22:51               ` A. Wilcox [this message]
2018-12-07 23:50                 ` Rich Felker
2018-12-07 20:06           ` Florian Weimer
2018-12-07 20:14             ` Rich Felker
2018-12-08 16:18               ` Florian Weimer
2018-12-10  9:05                 ` Arkadiusz Sienkiewicz
2018-12-12  0:36                   ` Rich Felker
2018-12-17 14:21                     ` Arkadiusz Sienkiewicz
2018-12-17 17:29                       ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a41b688f-dfae-c4b2-d58e-df797ede8a09@adelielinux.org \
    --to=awilfox@adelielinux.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).