NetBSD Problem Report #55690

From  Thu Oct  1 05:20:58 2020
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 66B081A9217
	for <>; Thu,  1 Oct 2020 05:20:58 +0000 (UTC)
Message-Id: <>
Date: Thu,  1 Oct 2020 05:20:57 +0000 (UTC)
Subject: GCC9 -pipe not working with PIPE_SOCKETPAIR
X-Send-Pr-Version: www-1.0

>Number:         55690
>Category:       kern
>Synopsis:       GCC9 -pipe not working with PIPE_SOCKETPAIR
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jdolecek
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 01 05:25:00 +0000 2020
>Last-Modified:  Sun Jan 24 13:03:41 +0000 2021
>Originator:     Rin Okuyama
>Release:        9.99.73
Department of Physics, Meiji University
NetBSD rpi 9.99.73 NetBSD 9.99.73 (PIPE) #0: Thu Oct  1 13:23:40 JST 2020  rin@latipes:/usr/src/sys/arch/evbarm/compile/PIPE evbarm

NetBSD sun3 9.99.73 NetBSD 9.99.73 (GENERIC) #4: Tue Sep 29 00:02:57 JST 2020  rin@latipes:/sys/arch/sun3/compile/GENERIC sun3

NetBSD obs266 9.99.73 NetBSD 9.99.73 (OBS266_PIPE) #0: Tue Sep 29 00:20:09 JST 2020  rin@latipes:/sys/arch/evbppc/compile/OBS266_PIPE evbppc
For various archs (at least for aarch64, m68k, and powerpc/ibm4xx),
-pipe option for GCC9 does not work well on kernel with PIPE_SOCKETPAIR
option enabled. This problem occurs regardless whether kernel, libc and
etc. are built by GCC9 or GCC8.

For example, ``make package'' for lang/perl5, which adds -pipe option to
CFLAGS by default, stalls somewhere, different from ports to ports, but
completely reproducible places. Here, cc1 and cc sleeps eternally at
netio in write(2) and read(2). Kernel itself is alive, and cc1 and cc
can be terminated by ^C.

Also, some tests related to pipe(2), fails on PIPE_SOCKETPAIR kernel:

- lib/libc/sys/t_pipe2

    pipe2_cloexec: [0.011948s] Failed: /usr/src/tests/lib/libc/sys/t_pipe2.c:65: (fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0 not met

- kernel/kqueue/write/t_pipe:pipe1

    pipe1: [0.022409s] Failed: /usr/src/tests/kernel/kqueue/write/t_pipe.c:67: (n = kevent(kq, event, 1, NULL, 0, NULL)) != -1: got: 0
Try to build lang/perl5 on kernel with PIPE_SOCKETPAIR option enabled.
As a workaround, disabling PIPE_SOCKETPAIR option resolves the problem.
Also, there were no such problem for GCC8 -pipe as far as I can see.



From: Rin Okuyama <>
To: "" <>
Subject: Re: kern/55690 (GCC9 -pipe not working with PIPE_SOCKETPAIR)
Date: Tue, 6 Oct 2020 00:05:49 +0900

 The situation does not change even with ``memcmp'' fix for GCC 9.3.

Responsible-Changed-From-To: kern-bug-people->jdolecek
Responsible-Changed-When: Sun, 24 Jan 2021 13:03:41 +0000
I'll look into this eventually, looks like this might be some race
similar to PR kern/50094


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.