From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15439 invoked by alias); 23 Mar 2012 22:51:16 -0000 Received: (qmail 15430 invoked by uid 22791); 23 Mar 2012 22:51:15 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Mar 2012 22:51:03 +0000 From: "carlos_odonell at mentor dot com" To: glibc-bugs@sources.redhat.com Subject: [Bug libc/11787] Program with large TLS segment fails aio_write Date: Fri, 23 Mar 2012 23:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlos_odonell at mentor dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00304.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=11787 --- Comment #9 from Carlos O'Donell 2012-03-23 22:50:12 UTC --- (In reply to comment #7) > I can provide some information about Chrome built with -fprofile-generate: > > p __static_tls_size > $1 = 114880 > > Now let's look at how Chrome allocates thread stacks: > > http://code.google.com/p/chromium/source/search?q=kShutdownDetectorThreadStackSize&origq=kShutdownDetectorThreadStackSize&btnG=Search+Trunk > > http://code.google.com/p/chromium/source/search?q=kWorkerThreadStackSize&origq=kWorkerThreadStackSize&btnG=Search+Trunk > > are two examples. There are other stack sizes too. From what I have seen, if > the stack size is less than __static_tls_size, it just fails to allocate the > stack. If it is something like 128k, it gets allocated, but soon runs out of > stack into the guard page where it causes a segfault on a random function (as > it allocating locals for the function). That's brutal. You have a 128k stack with 114k of thread local data, a guard page, the thread descriptor, and you've barely got anything left. Thank you for some real-world data, that helps put things into perspective. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.