From owner-freebsd-threads@FreeBSD.ORG Mon Sep 12 04:00:43 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C12BA16A426 for ; Mon, 12 Sep 2005 04:00:42 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7774243D46 for ; Mon, 12 Sep 2005 04:00:39 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j8C40dwA068557 for ; Mon, 12 Sep 2005 04:00:39 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j8C40dcF068556; Mon, 12 Sep 2005 04:00:39 GMT (envelope-from gnats) Resent-Date: Mon, 12 Sep 2005 04:00:39 GMT Resent-Message-Id: <200509120400.j8C40dcF068556@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-threads@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Justin Shumaker Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3D4316A41F for ; Mon, 12 Sep 2005 03:55:13 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3FB843D45 for ; Mon, 12 Sep 2005 03:55:13 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j8C3tDbt028075 for ; Mon, 12 Sep 2005 03:55:13 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j8C3tDgc028074; Mon, 12 Sep 2005 03:55:13 GMT (envelope-from nobody) Message-Id: <200509120355.j8C3tDgc028074@www.freebsd.org> Date: Mon, 12 Sep 2005 03:55:13 GMT From: Justin Shumaker To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: threads/86004: libthr broken on amd64 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2005 04:00:43 -0000 >Number: 86004 >Category: threads >Synopsis: libthr broken on amd64 >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 12 04:00:38 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Justin Shumaker >Release: 5.4 AMD64 >Organization: U.S. Army Research Laboratory >Environment: FreeBSD xxx.army.mil 5.4-RELEASE-p6 FreeBSD 5.4-RELEASE-p6 #0: Wed Sep 7 17:41:09 EST 2005 >Description: maping libpthread to libthr on AMD-64 causes multithreaded apps to core dump. >How-To-Repeat: Write a simple multithreaded test program in C. Here is a snippet of my test appplication. I have also tested with 3 other threaded apps all with the same results, so before complaining about a line of code in the below code, try cooking up your own. The application runs with libpthread. #include #include #define WORK_SIZE 1024*128*8 int queue; void* work(void *ptr) { unsigned int i, q; float a; q = queue; while(q--) { a = 1; for(i = 0; i < 128; i++) a *= 1.001; } return 0; } int main(int argc, char *args[]) { unsigned int i, tnum, n; pthread_t t[8]; if(argc < 2) { fprintf(stderr, "thread argument [1..8] required.\n"); exit(1); } tnum = atoi(args[1]); if(tnum < 1 || tnum > 8) { fprintf(stderr, "thread number must be from 1 to 8\n"); exit(1); } for(n = 0; n < 4; n++) { queue = WORK_SIZE / tnum; /* Launch the threads */ for(i = 0; i < tnum; i++) pthread_create(&t[i], 0, work, 0); /* Join the threads and finish */ for(i = 0; i < tnum; i++) { pthread_join(t[i], 0); printf("done: %d\n", i); } } exit(0); } >Fix: No idea, will require combing the libthr source and finding 64-bit unfriendly code or something it's tickling in the kernel. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Mon Sep 12 11:02:16 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org 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 CD42B16A420 for ; Mon, 12 Sep 2005 11:02:16 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B74A43D5C for ; Mon, 12 Sep 2005 11:02:15 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j8CB2FW0025622 for ; Mon, 12 Sep 2005 11:02:15 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j8CB2E6s025616 for freebsd-threads@freebsd.org; Mon, 12 Sep 2005 11:02:14 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 12 Sep 2005 11:02:14 GMT Message-Id: <200509121102.j8CB2E6s025616@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Sep 2005 11:02:17 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2005/01/26] threads/76690threads fork hang in child for (-lc_r & -lthr) o [2005/05/11] threads/80887threads ULE with SMP broke libpthread/libthr on 5 2 problems total. Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/07/18] kern/20016 threads pthreads: Cannot set scheduling timer/Can o [2000/08/26] kern/20861 threads libc_r does not honor socket timeouts o [2001/01/20] threads/24472threads libc_r does not honor SO_SNDTIMEO/SO_RCVT o [2001/01/25] threads/24632threads libc_r delicate deviation from libc in ha o [2001/01/25] kern/24641 threads pthread_rwlock_rdlock can deadlock o [2001/11/26] bin/32295 threads pthread dont dequeue signals o [2002/02/01] threads/34536threads accept() blocks other threads o [2002/05/25] kern/38549 threads the procces compiled whith pthread stoppe o [2002/06/27] threads/39922threads [PATCH?] Threaded applications executed w o [2002/08/04] kern/41331 threads Pthread library open sets O_NONBLOCK flag o [2003/03/02] threads/48856threads Setting SIGCHLD to SIG_IGN still leaves z o [2003/03/10] threads/49087threads Signals lost in programs linked with libc s [2004/03/15] kern/64313 threads FreeBSD (OpenBSD) pthread implicit set/un o [2004/08/26] threads/70975threads unexpected and unreliable behaviour when o [2004/09/14] threads/71725threads Mysql Crashes frequently giving Sock Erro o [2004/10/05] threads/72353threads Assertion fails in /usr/src/lib/libpthrea o [2004/10/07] threads/72429threads threads blocked in stdio (fgets, etc) are o [2004/10/21] threads/72953threads fork() unblocks blocked signals w/o PTHRE o [2004/12/19] threads/75273threads FBSD 5.3 libpthread (KSE) bug o [2004/12/21] threads/75374threads pthread_kill() ignores SA_SIGINFO flag o [2005/01/26] threads/76694threads fork cause hang in dup()/close() function o [2005/03/10] threads/78660threads Java hangs unkillably in STOP state after o [2005/04/08] threads/79683threads svctcp_create() fails if multiple threads o [2005/04/28] threads/80435threads panic on high loads o [2005/05/19] threads/81258threads Thread specific data is sometimes assigne o [2005/08/02] threads/84483threads problems with devel/nspr and -lc_r on 4.x o [2005/08/10] threads/84778threads libpthread busy loop/hang with Java when o [2005/08/19] threads/85112threads Resource temporarily unavailable reading o [2005/08/20] threads/85160threads [patch] libobjc + libpthread/libthr crash o [2005/09/12] threads/86004threads libthr broken on amd64 30 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/05/26] kern/18824 threads gethostbyname is not thread safe o [2000/06/13] kern/19247 threads uthread_sigaction.c does not do anything o [2000/10/21] kern/22190 threads A threaded read(2) from a socketpair(2) f o [2001/09/09] threads/30464threads pthread mutex attributes -- pshared o [2002/05/02] threads/37676threads libc_r: msgsnd(), msgrcv(), pread(), pwri s [2002/07/16] threads/40671threads pthread_cancel doesn't remove thread from o [2004/07/13] threads/69020threads pthreads library leaks _gc_mutex o [2004/09/21] threads/71966threads Mlnet Core Dumped : Fatal error '_pq_inse o [2004/11/21] threads/74180threads KSE problem. Applications those riched ma o [2005/01/20] threads/76513threads libpthread is not working o [2005/04/13] threads/79887threads [patch] freopen() isn't thread-safe o [2005/05/13] threads/80992threads abort() sometimes not caught by gdb depen o [2005/05/26] threads/81534threads [PATCH] libc_r close() will fail on any f 13 problems total. From owner-freebsd-threads@FreeBSD.ORG Sat Sep 17 04:43:36 2005 Return-Path: X-Original-To: threads@FreeBSD.org 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 0BB3416A41F; Sat, 17 Sep 2005 04:43:36 +0000 (GMT) (envelope-from bland@FreeBSD.org) Received: from mvs5.plala.or.jp (c158133.vh.plala.or.jp [210.150.158.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D32843D46; Sat, 17 Sep 2005 04:43:34 +0000 (GMT) (envelope-from bland@FreeBSD.org) Received: from hub.bbnest.net ([219.164.5.135]) by mvs5.plala.or.jp with ESMTP id <20050917044333.SFSR6132.mvs5.plala.or.jp@hub.bbnest.net>; Sat, 17 Sep 2005 13:43:33 +0900 Received: from [10.0.0.2] (nest.bbnest.net [10.0.0.2]) by hub.bbnest.net (8.13.4/8.13.3) with ESMTP id j8H4hWp2067350; Sat, 17 Sep 2005 13:43:32 +0900 (JST) (envelope-from bland@FreeBSD.org) Message-ID: <432B9E4B.1020306@FreeBSD.org> Date: Sat, 17 Sep 2005 13:40:43 +0900 From: Alexander Nedotsukov User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.11) Gecko/20050909 X-Accept-Language: en-us, en MIME-Version: 1.0 To: current@FreeBSD.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: threads@FreeBSD.org Subject: GDB warning message. X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Sep 2005 04:43:36 -0000 Guys, Can anyone say what is it (see warning message bellow)? (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /usr/X11R6/bin/gnome-dictionary warning: Unable to get location for thread creation breakpoint: generic error [New LWP 100212] [New Thread 0x806b000 (LWP 100212)] [Switching to Thread 0x806b000 (LWP 100120)] Breakpoint 1, dict_disconnect (context=0x8277000) at dict.c:844 844 g_return_if_fail (context != NULL); This is 100% reproducible. Just run program with breakpoint set. Do we have something broken? Thanks, Alexander.