From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22378 invoked by alias); 24 Nov 2011 12:57:02 -0000 Received: (qmail 22355 invoked by uid 22791); 24 Nov 2011 12:57:02 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Nov 2011 12:56:50 +0000 Received: from eggs.gnu.org ([140.186.70.92]:47414) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1RTYrB-0002MN-1t for gcc-help@gnu.org; Thu, 24 Nov 2011 07:56:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTYr9-0006lf-77 for gcc-help@gnu.org; Thu, 24 Nov 2011 07:56:48 -0500 Received: from mail-bw0-f41.google.com ([209.85.214.41]:47475) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTYr9-0006lX-2I for gcc-help@gnu.org; Thu, 24 Nov 2011 07:56:47 -0500 Received: by bke17 with SMTP id 17so3343897bke.0 for ; Thu, 24 Nov 2011 04:56:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.155.152 with SMTP id s24mr29383331bkw.5.1322139404956; Thu, 24 Nov 2011 04:56:44 -0800 (PST) Received: by 10.204.139.135 with HTTP; Thu, 24 Nov 2011 04:56:44 -0800 (PST) Date: Fri, 25 Nov 2011 05:34:00 -0000 Message-ID: Subject: Assertion `mutex->__data.__owner From: trisha yad To: libc-help@sourceware.org, gcc-help@gcc.gnu.org, gcc-help@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.214.41 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg00250.txt.bz2 Message-ID: <20111125053400.sv6kscQKKJbI-F_MtJR9zxqeGsz9RFqqzkFI5iI3Qi4@z> Dear All, Today on my ARM Board one problem hit. pthread_mutex_lock.c:62: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed. This happen in pthread_mutex_lock.c. May you pls let me know in which all cases it can happen. int __pthread_mutex_lock (mutex) pthread_mutex_t *mutex; { assert (sizeof (mutex->__size) >= sizeof (mutex->__data)); unsigned int type = PTHREAD_MUTEX_TYPE (mutex); if (__builtin_expect (type & ~PTHREAD_MUTEX_KIND_MASK_NP, 0)) return __pthread_mutex_lock_full (mutex); pid_t id = THREAD_GETMEM (THREAD_SELF, tid); if (__builtin_expect (type, PTHREAD_MUTEX_TIMED_NP) == PTHREAD_MUTEX_TIMED_NP) { simple: /* Normal mutex. */ LLL_MUTEX_LOCK (mutex); assert (mutex->__data.__owner == 0);<-------------------------------------------------Here. } else if (__builtin_expect (type == PTHREAD_MUTEX_RECURSIVE_NP, 1)) ...... Thanks