NetBSD Problem Report #47072
From julio+host-mini-jmmv@meroh.net Sun Oct 14 03:07:06 2012
Return-Path: <julio+host-mini-jmmv@meroh.net>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 2CC1C63B8DB
for <gnats-bugs@gnats.NetBSD.org>; Sun, 14 Oct 2012 03:07:06 +0000 (UTC)
Message-Id: <20121014030659.01C1216183B@mini.meroh.net>
Date: Sat, 13 Oct 2012 23:06:58 -0400 (EDT)
From: julio+host-mini-jmmv@meroh.net
Reply-To: julio+host-mini-jmmv@meroh.net
To: gnats-bugs@gnats.NetBSD.org
Subject: Broken threads in macppc
X-Send-Pr-Version: 3.95
>Number: 47072
>Category: port-macppc
>Synopsis: Broken threads in macppc
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-macppc-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Oct 14 03:10:01 +0000 2012
>Closed-Date: Sun Apr 28 07:26:38 +0000 2019
>Last-Modified: Sun Apr 28 07:26:38 +0000 2019
>Originator: julio+host-mini-jmmv@meroh.net
>Release: NetBSD 6.99.13 -- Sources as of 2012-10-13.
>Organization:
>Environment:
System: NetBSD mini.meroh.net 6.99.13 NetBSD 6.99.13 (MINI) #13: Sat Oct 13 22:44:13 EDT 2012 jmmv@netbsd.meroh.net:/home/jmmv/os/netbsd/macppc/obj/home/jmmv/os/netbsd/src/sys/arch/macppc/compile/MINI macppc
Architecture: powerpc
Machine: macppc
>Description:
Since 2012-09-11, many applications in my NetBSD/macppc -current
installation have started to act wierdly.
Some of the many failures I have noticed:
- While building emacs, the generated emacs binary either segfaults
along the build process or enters an infinite loop (that requires
kill -9 to erradicate).
- mutt segfaults during email composition, right after exiting the
editor.
- pidgin segfaults right on startup.
- firefox randomly locks up.
- And the obvious: many failures in the lib/libpthread tests.
Regarding the failures in lib/libpthread I got this data collected:
===> Expected failures
t_cond:cond_timedwait_race -> expected_failure: PR lib/44756: /home/sysbuild/src/tests/lib/libpthread/t_cond.c:338: rv == ETIMEDOUT not met [1.419s]
t_mutex:mutex2 -> expected_failure: PR port-powerpc/44387 [40.009s]
t_mutex:mutex3 -> expected_failure: PR port-powerpc/44387 [40.009s]
===> Broken tests
t_sem:before_start_no_threads -> broken: Premature exit: received signal 11 (core dumped) [0.122s]
t_sigmask:before_threads -> broken: Premature exit: received signal 11 (core dumped) [0.099s]
t_sigmask:incorrect_mask_bug -> broken: Premature exit: received signal 11 (core dumped) [2.109s]
t_sigsuspend:sigsuspend -> broken: Premature exit: received signal 11 (core dumped) [1.098s]
The stacktraces look like shown below; the stacktraces for the other
programs, like pidgin, look very similar:
t_sem:before_start_no_threads:
0xfdfca474 in pthread__errno () from /usr/lib/libpthread.so.1
0xfdfca474 in pthread__errno () from /usr/lib/libpthread.so.1
0xfdeedfd4 in __errno () from /usr/lib/libc.so.12
0xfdeedf64 in __cerror () from /usr/lib/libc.so.12
0xfdfc4828 in sem_trywait () from /usr/lib/libpthread.so.1
0x01801b0c in threadfunc ()
0x01801c5c in before_start_test ()
0xfdf77cb8 in atf_tc_run () from /usr/lib/libatf-c.so.0
0xfdf761b0 in atf_tp_run () from /usr/lib/libatf-c.so.0
0xfdf7589c in atf_tp_main () from /usr/lib/libatf-c.so.0
0x01801d24 in main ()
t_sigmask:before_threads
0xfdfc71ac in pthread_mutex_lock () from /usr/lib/libpthread.so.1
0xfdfc71ac in pthread_mutex_lock () from /usr/lib/libpthread.so.1
0xfdf0d5d0 in __flockfile_internal () from /usr/lib/libc.so.12
0xfded2b08 in puts () from /usr/lib/libc.so.12
0x018014a0 in atfu_before_threads_body ()
0xfdf97cb8 in atf_tc_run () from /usr/lib/libatf-c.so.0
0xfdf961b0 in atf_tp_run () from /usr/lib/libatf-c.so.0
0xfdf9589c in atf_tp_main () from /usr/lib/libatf-c.so.0
0x018016f0 in main ()
t_sigmask:incorrect_mask_bug
0xfdfca474 in pthread__errno () from /usr/lib/libpthread.so.1
0xfdfca474 in pthread__errno () from /usr/lib/libpthread.so.1
0xfdf0dfd4 in __errno () from /usr/lib/libc.so.12
0xfdf0df64 in __cerror () from /usr/lib/libc.so.12
0xfdfc5794 in __select50 () from /usr/lib/libpthread.so.1
0x01801068 in atfu_incorrect_mask_bug_body ()
0xfdf97cb8 in atf_tc_run () from /usr/lib/libatf-c.so.0
0xfdf961b0 in atf_tp_run () from /usr/lib/libatf-c.so.0
0xfdf9589c in atf_tp_main () from /usr/lib/libatf-c.so.0
0x018016f0 in main ()
t_sigsuspend:sigsuspend
0xfdfca474 in pthread__errno () from /usr/lib/libpthread.so.1
0xfdfca474 in pthread__errno () from /usr/lib/libpthread.so.1
0xfdf0dfd4 in __errno () from /usr/lib/libc.so.12
0xfdf0df64 in __cerror () from /usr/lib/libc.so.12
0xfdfc5924 in __sigsuspend14 () from /usr/lib/libpthread.so.1
0x01800c18 in atfu_sigsuspend_body ()
0xfdf97cb8 in atf_tc_run () from /usr/lib/libatf-c.so.0
0xfdf961b0 in atf_tp_run () from /usr/lib/libatf-c.so.0
0xfdf9589c in atf_tp_main () from /usr/lib/libatf-c.so.0
0x01800cb4 in main ()
>How-To-Repeat:
Update a macppc machine to a recent version. Try to build emacs24,
run pidgin or run the pthreads tests.
>Fix:
I *think* this might be caused by:
http://mail-index.netbsd.org/source-changes/2012/09/11/msg037199.html
I took a quick look at the pthread code and added some printfs, and
it seems that, e.g. within pthread__errno, the call to get a pointer
to the TLS returns an invalid address (like 0x4) and that causes the
crash.
But no, I don't have a fix.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Sun, 24 Mar 2019 06:50:18 +0000
State-Changed-Why:
I believe this can be closed. All tests pass for me on -current, and
the specific source change referenced was subsequently revised in
revisions 1.44 and 1.45 of powerpc/sig_machdep.c.
State-Changed-From-To: feedback->closed
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Sun, 28 Apr 2019 07:26:38 +0000
State-Changed-Why:
Feedback timeout, though feedback probably wasn't necessary anyway,
I've confirmed it's addressed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.