From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82767 invoked by alias); 26 Mar 2015 13:05:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 82747 invoked by uid 89); 26 Mar 2015 13:05:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: glazunov.sibelius.xs4all.nl Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 26 Mar 2015 13:05:19 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id t2QD5Atw006669; Thu, 26 Mar 2015 14:05:10 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id t2QD5A9h030233; Thu, 26 Mar 2015 14:05:10 +0100 (CET) Date: Thu, 26 Mar 2015 13:05:00 -0000 Message-Id: <201503261305.t2QD5A9h030233@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: palves@redhat.com CC: gdb-patches@sourceware.org In-reply-to: <1427373950-30952-1-git-send-email-palves@redhat.com> (message from Pedro Alves on Thu, 26 Mar 2015 12:45:50 +0000) Subject: Re: [PATCH] Crash on thread id wrap around References: <1427373950-30952-1-git-send-email-palves@redhat.com> X-SW-Source: 2015-03/txt/msg00853.txt.bz2 > From: Pedro Alves > Date: Thu, 26 Mar 2015 12:45:50 +0000 > > I managed to come up with a test that reliably reproduces this. It > relies on pids wrapping around though, so could potentially take a > while. On my box that's 4 seconds; on gcc110, a PPC box which has > max_pid set to 65536, it's over 10 seconds. So I made the test > compute how long that would take, and cap the time waited if that > would be too long. You can't really count on thread IDs wrapping on systems that randomize them. There is still a chance that you'll reuse on of course. Not much you can do about this, but folks should be aware that this may cause non-reproducable test results on some systems.