From owner-freebsd-threads@FreeBSD.ORG Sun Oct 19 22:44:55 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F44916A4B3 for ; Sun, 19 Oct 2003 22:44:55 -0700 (PDT) Received: from fri.itea.ntnu.no (fri.itea.ntnu.no [129.241.7.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 827E843F85 for ; Sun, 19 Oct 2003 22:44:54 -0700 (PDT) (envelope-from morten@rodal.no) Received: from localhost (localhost [127.0.0.1]) by fri.itea.ntnu.no (Postfix) with ESMTP id 29460C7378; Mon, 20 Oct 2003 07:44:53 +0200 (CEST) Received: from slurp.rodal.no (m200h.studby.ntnu.no [129.241.135.200]) by fri.itea.ntnu.no (Postfix) with ESMTP id E4224C72E1; Mon, 20 Oct 2003 07:44:52 +0200 (CEST) Received: (from morten@localhost) by slurp.rodal.no (8.12.10/8.12.10/Submit) id h9K5ip2U039918; Mon, 20 Oct 2003 07:44:51 +0200 (CEST) (envelope-from morten) Date: Mon, 20 Oct 2003 07:44:51 +0200 From: Morten Rodal To: Daniel Eischen Message-ID: <20031020054450.GA39716@slurp.rodal.no> References: <20031019183129.GA94145@slurp.rodal.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Content-Scanned: with sophos and spamassassin at mailgw.ntnu.no. cc: threads@freebsd.org Subject: Re: libkse and bus error X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Oct 2003 05:44:55 -0000 On Sun, Oct 19, 2003 at 05:50:54PM -0400, Daniel Eischen wrote: > On Sun, 19 Oct 2003, Morten Rodal wrote: > > > On Sun, Oct 19, 2003 at 02:16:27PM -0400, Daniel Eischen wrote: > > > On Sun, 19 Oct 2003, Morten Rodal wrote: > > > > > > > I seem to be able to crash almost every pthread program that uses > > > > pthread_mutex'es. First I thought it was a problem with > > > > pthread_testcancel(), until I compiled libkse with DEBUG_FLAGS=-g on > > > > one of machines. > > > > > > > > Backtrace from a machine with DEBUG_FLAGS=-g and libkse: > > > > > > > > #0 0x28e6ed1b in kse_thr_interrupt () at {standard input}:15 > > > > #1 0x28e5f990 in _thr_sig_add (pthread=0x81fab00, sig=136293172, > > > > info=0x0) > > > > at /usr/src/lib/libpthread/thread/thr_sig.c:885 > > > > #2 0x28e687cb in kse_check_completed (kse=0x81fab00) > > > > at /usr/src/lib/libpthread/thread/thr_kern.c:1558 > > > > #3 0x28e6721c in kse_sched_multi (kmbx=0x17e) > > > > at /usr/src/lib/libpthread/thread/thr_kern.c:1021 > > > > > > This is a problem. The mailbox pointer is invalid. > > > > > > > I thought it looked a bit strange. Any clues to what might have > > caused this? > > When I've seen it before, it's when %gs becomes corrupted. Nvidia > uses static ldt allocation and this can screw things up. If you > are getting any static ldt allocations out of the kernel, that is > the problem. > Ok. Then that's probably my problem. I did see some warnings about pids using static ldt allocation, but they haven't appeared for a while now. So my threading support is in the hands of nvidia now. That kind of sucks, but I guess I can live with it.. -- Morten Rodal