From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31325 invoked by alias); 20 May 2007 15:57:11 -0000 Received: (qmail 31311 invoked by uid 22791); 20 May 2007 15:57:09 -0000 X-Spam-Check-By: sourceware.org Received: from py-out-1112.google.com (HELO py-out-1112.google.com) (64.233.166.180) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 20 May 2007 15:57:00 +0000 Received: by py-out-1112.google.com with SMTP id a29so66466pyi for ; Sun, 20 May 2007 08:56:58 -0700 (PDT) Received: by 10.35.43.10 with SMTP id v10mr6937865pyj.1179676616808; Sun, 20 May 2007 08:56:56 -0700 (PDT) Received: by 10.35.48.9 with HTTP; Sun, 20 May 2007 08:56:56 -0700 (PDT) Message-ID: Date: Sun, 20 May 2007 15:57:00 -0000 From: "Rob Duncan" To: ecos-discuss@sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] eCos LWIP thread-safety X-SW-Source: 2007-05/txt/msg00097.txt.bz2 I'm having some trouble understanding what the thread-safety requirements for using LWIP are. I've been through the archives on the LWIP mailing lists where it's explicitly stated that the low-level APIs are not thread-safe, but I can't find an equivalent description of the high-level socket interfaces. It appears to depend on how the specific OS port was done. The reason I'm looking at this is because I'm getting the following assertion failure: ASSERT FAIL: <6>pbuf.c[577]pbuf_free() pbuf_free: p->ref > 0 According to the LWIP archives this assertion is often evidence of a violation of the stack's thread-safety rules. I'm exclusively using the socket APIs from a single thread, so I'm wondering whether I need to take any additional steps to satisfy these requirements. Can someone with a better understanding of the eCos LWIP port comment? On the other hand, I'm running with a rather miserly buffer allocation, and I suppose it's possible that I'm tickling some other bug in the pbuf code. Any thoughts and suggestions are very appreciated. Thanks, Rob. -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss