From dev-return-21887-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Thu Jun 18 00:18:25 2009 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 59318 invoked from network); 18 Jun 2009 00:18:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Jun 2009 00:18:25 -0000 Received: (qmail 49481 invoked by uid 500); 18 Jun 2009 00:18:36 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 49393 invoked by uid 500); 18 Jun 2009 00:18:35 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 49385 invoked by uid 99); 18 Jun 2009 00:18:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jun 2009 00:18:35 +0000 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.218.209] (HELO mail-bw0-f209.google.com) (209.85.218.209) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jun 2009 00:18:26 +0000 Received: by bwz5 with SMTP id 5so34931bwz.43 for ; Wed, 17 Jun 2009 17:18:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.31.82 with SMTP id x18mr725325bkc.5.1245284285112; Wed, 17 Jun 2009 17:18:05 -0700 (PDT) In-Reply-To: <1245281362.2334.223.camel@shrek.rexursive.com> References: <73daaa720906171551i31eff7eej599fba21704b4242@mail.gmail.com> <1245281362.2334.223.camel@shrek.rexursive.com> Date: Thu, 18 Jun 2009 02:18:05 +0200 Message-ID: <73daaa720906171718i22e1016fvcd37e13532ac03d1@mail.gmail.com> Subject: Re: Segfault in testlockperf test on AIX From: Gavin Sherry To: Bojan Smojver Cc: dev@apr.apache.org Content-Type: multipart/alternative; boundary=001485f772b875620b046c94572b X-Virus-Checked: Checked by ClamAV on apache.org --001485f772b875620b046c94572b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 2009/6/18 Bojan Smojver > On Thu, 2009-06-18 at 00:51 +0200, Gavin Sherry wrote: > > 497 proc_mutex_unlock_it.l_pid = 0; /* pid not > > actually interesting */ > > What's in proc_mutex_unlock_it when this happens? What's its size? > $1 = {l_type = 0, l_whence = 0, l_start = 0, l_len = 0, l_sysid = 0, l_pid = 0, l_vfs = 0} (gdb) print sizeof(proc_mutex_unlock_it) $2 = 24 ptype proc_mutex_unlock_it type = struct flock { short l_type; short l_whence; off_t l_start; off_t l_len; unsigned int l_sysid; pid_t l_pid; int l_vfs; } >From flock.h: struct flock { short l_type; short l_whence; #ifndef _LARGE_FILES #ifndef __64BIT__ off_t l_start; off_t l_len; /* len = 0 means until end of file */ #endif #endif unsigned int l_sysid; #ifdef _NONSTD_TYPES ushort l_pid_ext; ushort l_pid; #else pid_t l_pid; #endif int l_vfs; #if defined(_LARGE_FILES) || defined(__64BIT__) /* If LARGE FILES or 64 BIT then off_t is 64 bits and struct flock * must be laid out as struct flock64 */ off_t l_start; off_t l_len; #endif }; Thanks, Gavin --001485f772b875620b046c94572b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2009/6/18 Bojan Smojver <bojan@rexursive.com>
=
On Thu, 2009-06-18 at 00:51 +0200, Gavin Sherry wrote: > 497 =A0 =A0 =A0 =A0 proc_mutex_unlock_it.l_pid =3D 0; =A0 =A0 =A0 =A0 = =A0 /* pid not
> actually interesting */

What's in proc_mutex_unlock_it when this happens? What's its = size?

$1 =3D {l_type =3D 0, l_whence =3D 0, l_start =3D 0, = l_len =3D 0, l_sysid =3D 0, l_pid =3D 0, l_vfs =3D 0}
(gdb) print sizeof= (proc_mutex_unlock_it)
$2 =3D 24
ptype proc_mutex_unlock_it
type = =3D struct flock {
=A0=A0=A0 short l_type;
=A0=A0=A0 short l_whence;
=A0=A0=A0 off_t l_s= tart;
=A0=A0=A0 off_t l_len;
=A0=A0=A0 unsigned int l_sysid;
=A0= =A0=A0 pid_t l_pid;
=A0=A0=A0 int l_vfs;
}

From flock.h:
struct=A0 flock=A0=A0 {
=A0=A0=A0=A0=A0=A0=A0 short=A0=A0 l_type;
=A0=A0=A0=A0=A0=A0=A0 short=A0=A0 l_whence;
#ifndef _LARGE_FILES
#ifn= def __64BIT__
=A0=A0=A0=A0=A0=A0=A0 off_t=A0=A0 l_start;
=A0=A0=A0=A0= =A0=A0=A0 off_t=A0=A0 l_len;=A0=A0=A0=A0=A0=A0=A0=A0=A0 /* len =3D 0 means = until end of file */
#endif
#endif
=A0=A0=A0=A0=A0=A0=A0 unsigned = int=A0=A0=A0 l_sysid;
#ifdef=A0 _NONSTD_TYPES
=A0=A0=A0=A0=A0=A0=A0 ushort=A0 l_pid_ext;
= =A0=A0=A0=A0=A0=A0=A0 ushort=A0 l_pid;
#else
=A0=A0=A0=A0=A0=A0=A0 pi= d_t=A0=A0 l_pid;
#endif
=A0=A0=A0=A0=A0=A0=A0 int=A0=A0=A0=A0 l_vfs;<= br>#if defined(_LARGE_FILES) || defined(__64BIT__)
=A0=A0=A0=A0=A0=A0=A0= /* If LARGE FILES or 64 BIT then off_t is 64 bits and struct flock
=A0=A0=A0=A0=A0=A0=A0=A0 * must be laid out as struct flock64
=A0=A0=A0= =A0=A0=A0=A0=A0 */
=A0=A0=A0=A0=A0=A0=A0 off_t=A0=A0 l_start;
=A0=A0= =A0=A0=A0=A0=A0 off_t=A0=A0 l_len;
#endif
};

Thanks,
Gavin<= br>

--001485f772b875620b046c94572b--