NetBSD Problem Report #34722
From yamt@mwd.biglobe.ne.jp Thu Oct 5 14:06:38 2006
Return-Path: <yamt@mwd.biglobe.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 919A263B8C9
for <gnats-bugs@gnats.NetBSD.org>; Thu, 5 Oct 2006 14:06:38 +0000 (UTC)
Message-Id: <20061005123021.04C3411705@yamt.dyndns.org>
Date: Thu, 5 Oct 2006 21:30:20 +0900 (JST)
From: yamt@mwd.biglobe.ne.jp
Reply-To: yamt@mwd.biglobe.ne.jp
To: gnats-bugs@NetBSD.org
Subject: pthread can use unlimited amount of stack
X-Send-Pr-Version: 3.95
>Number: 34722
>Category: lib
>Synopsis: pthread can use unlimited amount of stack
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 05 14:10:01 +0000 2006
>Closed-Date: Fri Mar 23 10:08:05 +0000 2018
>Last-Modified: Fri Mar 23 10:08:05 +0000 2018
>Originator: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release: NetBSD 4.99.3
>Organization:
>Environment:
System: NetBSD 4.99.3
Architecture: i386
Machine: i386
>Description:
(i thought i filed this PR sometime ago, but i couldn't find a number.
sorry if it was duplicated.)
1. your thread is interrupted by an upcall.
2. pthread__upcall() handles the upcall and switch back to your thread
by pthread__upcall_switch.
3. pthread__upcall_switch switches its stack (STACK_SWITCH),
and eventually calls _md_setcontext_u.
4. if you are unfortunate enough, _md_setcontext_u is interrupted by
an upcall. now, it's similar to #1, but with some more stack consumed.
5. if you are really unfortunate, you'll repeat the above sequence
again and again, and eventually run out stack.
>How-To-Repeat:
code inspection.
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended
State-Changed-By: ad@netbsd.org
State-Changed-When: Wed, 21 Mar 2007 18:48:06 +0000
State-Changed-Why:
This should be fixed in -current. Realistically, there is no chance
of it being fixed in a earlier release.
State-Changed-From-To: suspended->closed
State-Changed-By: maxv@NetBSD.org
State-Changed-When: Fri, 23 Mar 2018 10:08:05 +0000
State-Changed-Why:
Close this PR, fixed.
>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.