From owner-freebsd-questions@FreeBSD.ORG Fri Mar 26 04:54:30 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3756B1065670 for ; Fri, 26 Mar 2010 04:54:30 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from server505.appriver.com (server505a.appriver.com [98.129.35.4]) by mx1.freebsd.org (Postfix) with ESMTP id F2F308FC1D for ; Fri, 26 Mar 2010 04:54:29 +0000 (UTC) X-Policy: GLOBAL - maxiscale.com X-Primary: psteele@maxiscale.com X-Note: This Email was scanned by AppRiver SecureTide X-ALLOW: psteele@maxiscale.com ALLOWED X-Virus-Scan: V- X-Note: Spam Tests Failed: X-Country-Path: UNITED STATES->UNITED STATES->UNITED STATES X-Note-Sending-IP: 98.129.23.15 X-Note-Reverse-DNS: ht02.exg5.exghost.com X-Note-WHTLIST: psteele@maxiscale.com X-Note: User Rule Hits: X-Note: Global Rule Hits: G179 G180 G181 G182 G186 G187 G198 G285 X-Note: Encrypt Rule Hits: X-Note: Mail Class: ALLOWEDSENDER X-Note: Headers Injected Received: from [98.129.23.15] (HELO ht02.exg5.exghost.com) by server505.appriver.com (CommuniGate Pro SMTP 5.3.2) with ESMTPS id 33974409 for freebsd-questions@freebsd.org; Thu, 25 Mar 2010 23:54:28 -0500 Received: from mbx03.exg5.exghost.com ([169.254.1.132]) by ht02.exg5.exghost.com ([98.129.23.15]) with mapi; Thu, 25 Mar 2010 23:54:28 -0500 From: Peter Steele To: "freebsd-questions@freebsd.org" Date: Thu, 25 Mar 2010 23:54:27 -0500 Thread-Topic: Very suspicious stack trace Thread-Index: AcrMoGm0gzb64YXNRuGkcS3QvYpxLQ== Message-ID: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3B5AAC95@MBX03.exg5.exghost.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Very suspicious stack trace X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2010 04:54:30 -0000 We had an app crash and the resulting core dump produced a very suspicious/= confusing stack trace: #0 0x00000008011d438c in thr_kill () from /lib/libc.so.7 #1 0x00000008012722bb in abort () from /lib/libc.so.7 #2 0x00000008011fb70c in malloc_usable_size () from /lib/libc.so.7 #3 0x00000008011fbb95 in malloc_usable_size () from /lib/libc.so.7 #4 0x00000008011fdaea in _malloc_thread_cleanup () from /lib/libc.so.7 #5 0x00000008011fdc86 in _malloc_thread_cleanup () from /lib/libc.so.7 #6 0x00000008011fc8e9 in malloc_usable_size () from /lib/libc.so.7 #7 0x00000008011fccc7 in malloc_usable_size () from /lib/libc.so.7 #8 0x00000008011ffe8f in malloc () from /lib/libc.so.7 #9 0x000000080127374b in memchr () from /lib/libc.so.7 #10 0x000000080125e6e9 in __srget () from /lib/libc.so.7 #11 0x00000008012352dd in vsscanf () from /lib/libc.so.7 #12 0x0000000801220087 in fscanf () from /lib/libc.so.7 This trace resulted from a call to fscanf, as follows: char sensor[21]; fscanf(in, "%20s", sensor); We've verified that the data being read was correct, and clearly the buffer= in which fscanf is storing the string it reads is valid (i.e., it's not NU= LL). So what would lead malloc() into calling abort()? Everything seems to = be in order.