NetBSD Problem Report #45942

From tron@zhadum.org.uk  Tue Feb  7 08:35:43 2012
Return-Path: <tron@zhadum.org.uk>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 28E2B63D911
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  7 Feb 2012 08:35:43 +0000 (UTC)
Message-Id: <20120207083540.30617A3B95F@mail.zhadum.org.uk>
Date: Tue,  7 Feb 2012 08:35:40 +0000 (GMT)
From: tron@zhadum.org.uk
Reply-To: tron@zhadum.org.uk
To: gnats-bugs@gnats.NetBSD.org
Subject: glib 2.30.2 package broken under NetBSD/amd64 5.1_STABLE
X-Send-Pr-Version: 3.95

>Number:         45942
>Category:       pkg
>Synopsis:       glib 2.30.2 package broken under NetBSD/amd64 5.1_STABLE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    drochner
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 07 08:40:00 +0000 2012
>Closed-Date:    Thu Feb 16 19:11:05 +0000 2012
>Last-Modified:  Thu Feb 16 19:11:05 +0000 2012
>Originator:     Matthias Scheler
>Release:        NetBSD 5.1_STABLE pkgsrc HEAD of 2012-02-07
>Organization:
Matthias Scheler                                  http://zhadum.org.uk/
>Environment:
System: NetBSD colwyn.zhadum.org.uk 5.1_STABLE NetBSD 5.1_STABLE (COLWYN.64) #0: Sun Jan 22 01:14:36 GMT 2012 tron@colwyn.zhadum.org.uk:/src/sys/compile/COLWYN.64 amd64
Architecture: x86_64
Machine: amd64
>Description:
The latest "glib2" package doesn't work properly under NetBSD/amd64 5.1_STABLE.
The "gio-querymodules"program which is run by "pkgsrc/devel/glib2/INSTALL"
crashes with a segmentation fault. Here is a stack trace:

(gdb) where
#0  0x00007f7ffc9069e6 in pollts () from /usr/lib/libpthread.so.0
#1  0x00000000001ec868 in ?? ()
#2  0x00000000000001b6 in ?? ()
#3  0x0000000000000015 in ?? ()
#4  0x0101010101010101 in ?? ()
#5  0x8080808080808080 in ?? ()
#6  0x00007f7ffde03e0d in _rtld_bind () from /usr/libexec/ld.elf_so
#7  0x00007f7ffde03a91 in _rtld_bind_start () from /usr/libexec/ld.elf_so
#8  0x00007f7ffc5035f0 in ?? ()
#9  0x00007f7ffc503000 in ?? ()
#10 0x0000000000000020 in ?? ()
#11 0x00007f7ffc500130 in ?? ()
#12 0x00007f7ffc5035f0 in ?? ()
#13 0x00007f7ffdc8e9a2 in ?? ()
   from /objdir/tron/devel/glib2/work.colwyn/glib-2.30.2/glib/.libs/libglib-2.0.so.0
#14 0x0000000000000a02 in ?? ()
#15 0x00000000000001b6 in ?? ()
#16 0x00007f7ffdc47237 in g_get_current_time (result=0x0) at gmain.c:1967
#17 0x00007f7ffdc35eae in get_tmp_file (
    tmpl=0x7f7ffc5035f0 "/usr/pkg/lib/gio/modules/giomodule.cache.T2XS9V", 
    f=0x7f7ffc906ac0 <open>, flags=2562, mode=438) at gfileutils.c:1232
#18 0x00007f7ffdc36408 in g_file_set_contents (
    filename=0x7f7ffc501180 "/usr/pkg/lib/gio/modules/giomodule.cache", 
    contents=0x7f7ffc5050cc "", length=0, error=0x7f7fffffd298)
    at gfileutils.c:894
#19 0x000000000040125d in main (argc=2, argv=<value optimized out>)
    at gio-querymodules.c:105

The crash is here:

void
g_get_current_time (GTimeVal *result)
{
#ifndef G_OS_WIN32
  struct timeval r;

  g_return_if_fail (result != NULL);

  /*this is required on alpha, there the timeval structs are int's
    not longs and a cast only would fail horribly*/
  gettimeofday (&r, NULL);					<-----
  result->tv_sec = r.tv_sec;
  result->tv_usec = r.tv_usec;
#else
[...]
#endif
}

I have no idea who this call to gettimeofday(2) can cause a segmentation fault.

>How-To-Repeat:
cd pkgsrc/devel/glib2
make install

>Fix:
Not known.

>Release-Note:

>Audit-Trail:
From: Matthias Scheler <tron@zhadum.org.uk>
To: NetBSD GNATS <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/45942: glib 2.30.2 package broken under NetBSD/amd64
 5.1_STABLE
Date: Tue, 7 Feb 2012 08:44:46 +0000

 On Tue, Feb 07, 2012 at 08:40:00AM +0000, Matthias Scheler wrote:
 > >Number:         45942
 > >Category:       pkg
 > >Synopsis:       glib 2.30.2 package broken under NetBSD/amd64 5.1_STABLE
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    pkg-manager
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Tue Feb 07 08:40:00 +0000 2012
 > >Originator:     Matthias Scheler
 > >Release:        NetBSD 5.1_STABLE pkgsrc HEAD of 2012-02-07
 > >Organization:
 > Matthias Scheler                                  http://zhadum.org.uk/
 > >Environment:
 > System: NetBSD colwyn.zhadum.org.uk 5.1_STABLE NetBSD 5.1_STABLE (COLWYN.64) #0: Sun Jan 22 01:14:36 GMT 2012 tron@colwyn.zhadum.org.uk:/src/sys/compile/COLWYN.64 amd64
 > Architecture: x86_64
 > Machine: amd64
 > >Description:
 > The latest "glib2" package doesn't work properly under NetBSD/amd64 5.1_STABLE.
 > The "gio-querymodules"program which is run by "pkgsrc/devel/glib2/INSTALL"
 > crashes with a segmentation fault. Here is a stack trace:
 > 
 > (gdb) where
 > #0  0x00007f7ffc9069e6 in pollts () from /usr/lib/libpthread.so.0
 > #1  0x00000000001ec868 in ?? ()
 > #2  0x00000000000001b6 in ?? ()
 > #3  0x0000000000000015 in ?? ()
 > #4  0x0101010101010101 in ?? ()
 > #5  0x8080808080808080 in ?? ()
 > #6  0x00007f7ffde03e0d in _rtld_bind () from /usr/libexec/ld.elf_so
 > #7  0x00007f7ffde03a91 in _rtld_bind_start () from /usr/libexec/ld.elf_so
 > #8  0x00007f7ffc5035f0 in ?? ()
 > #9  0x00007f7ffc503000 in ?? ()
 > #10 0x0000000000000020 in ?? ()
 > #11 0x00007f7ffc500130 in ?? ()
 > #12 0x00007f7ffc5035f0 in ?? ()
 > #13 0x00007f7ffdc8e9a2 in ?? ()
 >    from /objdir/tron/devel/glib2/work.colwyn/glib-2.30.2/glib/.libs/libglib-2.0.so.0
 > #14 0x0000000000000a02 in ?? ()
 > #15 0x00000000000001b6 in ?? ()
 > #16 0x00007f7ffdc47237 in g_get_current_time (result=0x0) at gmain.c:1967
 > #17 0x00007f7ffdc35eae in get_tmp_file (
 >     tmpl=0x7f7ffc5035f0 "/usr/pkg/lib/gio/modules/giomodule.cache.T2XS9V", 
 >     f=0x7f7ffc906ac0 <open>, flags=2562, mode=438) at gfileutils.c:1232
 > #18 0x00007f7ffdc36408 in g_file_set_contents (
 >     filename=0x7f7ffc501180 "/usr/pkg/lib/gio/modules/giomodule.cache", 
 >     contents=0x7f7ffc5050cc "", length=0, error=0x7f7fffffd298)
 >     at gfileutils.c:894
 > #19 0x000000000040125d in main (argc=2, argv=<value optimized out>)
 >     at gio-querymodules.c:105
 > 
 > The crash is here:
 > 
 > void
 > g_get_current_time (GTimeVal *result)
 > {
 > #ifndef G_OS_WIN32
 >   struct timeval r;
 > 
 >   g_return_if_fail (result != NULL);
 > 
 >   /*this is required on alpha, there the timeval structs are int's
 >     not longs and a cast only would fail horribly*/
 >   gettimeofday (&r, NULL);					<-----
 >   result->tv_sec = r.tv_sec;
 >   result->tv_usec = r.tv_usec;
 > #else
 > [...]
 > #endif
 > }
 > 
 > I have no idea who this call to gettimeofday(2) can cause a segmentation fault.
 > 
 > >How-To-Repeat:
 > cd pkgsrc/devel/glib2
 > make install
 > 
 > >Fix:
 > Not known.

 I get a similar crash in "dbus-binding-tool" while building the
 "dbus-glib" package:

 GNU gdb 6.5
 Copyright (C) 2006 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for details.
 This GDB was configured as "x86_64--netbsd"...
 Reading symbols from /objdir/tron/sysutils/dbus-glib/work.colwyn/dbus-glib-0.92/dbus/.libs/libdbus-glib-1.so.2...done.
 Loaded symbols for /objdir/tron/sysutils/dbus-glib/work.colwyn/dbus-glib-0.92/dbus/.libs/libdbus-glib-1.so.2
 Reading symbols from /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libdbus-1.so.3...done.
 Loaded symbols for /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libdbus-1.so.3
 Reading symbols from /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libgobject-2.0.so.0...done.
 Loaded symbols for /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libgobject-2.0.so.0
 Reading symbols from /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libffi.so.5...done.
 Loaded symbols for /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libffi.so.5
 Reading symbols from /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libgthread-2.0.so.0...done.
 Loaded symbols for /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libgthread-2.0.so.0
 Reading symbols from /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libglib-2.0.so.0...done.
 Loaded symbols for /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libglib-2.0.so.0
 Reading symbols from /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libpcre.so.0...done.
 Loaded symbols for /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libpcre.so.0
 Reading symbols from /usr/lib/libintl.so.0...done.
 Loaded symbols for /usr/lib/libintl.so.0
 Reading symbols from /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libexpat.so.1...done.
 Loaded symbols for /objdir/tron/sysutils/dbus-glib/work.colwyn/.buildlink/lib/libexpat.so.1
 Reading symbols from /usr/lib/libpthread.so.0...done.
 Loaded symbols for /usr/lib/libpthread.so.0
 Reading symbols from /usr/lib/libc.so.12...done.
 Loaded symbols for /usr/lib/libc.so.12
 Reading symbols from /usr/libexec/ld.elf_so...done.
 Loaded symbols for /usr/libexec/ld.elf_so
 Core was generated by `dbus-binding-too'.
 Program terminated with signal 11, Segmentation fault.
 #0  0x00007f7ffca069e6 in pollts () from /usr/lib/libpthread.so.0
 (gdb) where
 #0  0x00007f7ffca069e6 in pollts () from /usr/lib/libpthread.so.0
 #1  0x00000000001ec868 in ?? ()
 #2  0x0000000000000180 in ?? ()
 #3  0x0000000000000015 in ?? ()
 #4  0x0101010101010101 in ?? ()
 #5  0x8080808080808080 in ?? ()
 #6  0x00007f7ffde03e0d in _rtld_bind () from /usr/libexec/ld.elf_so
 #7  0x00007f7ffde03a91 in _rtld_bind_start () from /usr/libexec/ld.elf_so
 #8  0x0000000000000001 in ?? ()
 #9  0x00007f7ffc605000 in ?? ()
 #10 0x8080808080808080 in ?? ()
 #11 0x0000000000000000 in ?? ()

 	Kind regards

 -- 
 Matthias Scheler                                  http://zhadum.org.uk/

Responsible-Changed-From-To: pkg-manager->drochner
Responsible-Changed-By: tron@NetBSD.org
Responsible-Changed-When: Tue, 07 Feb 2012 18:01:56 +0000
Responsible-Changed-Why:
Matthias Drochner updated the "glib2" package to version 2.30.2.


State-Changed-From-To: open->closed
State-Changed-By: tron@NetBSD.org
State-Changed-When: Thu, 16 Feb 2012 19:11:05 +0000
State-Changed-Why:
The following commit fixes the problem for me:

Module Name:    pkgsrc
Committed By:   drochner
Date:           Thu Feb 16 15:09:54 UTC 2012

Modified Files:
        pkgsrc/devel/glib2: Makefile distinfo
Added Files:
        pkgsrc/devel/glib2/patches: patch-at

Log Message:
open(2) is variadic (at least in Posix and NetBSD), g_open is not,
don't mix them, the ABIs are incompatible at least on amd64
bump PKGREV


To generate a diff of this commit:
cvs rdiff -u -r1.194 -r1.195 pkgsrc/devel/glib2/Makefile
cvs rdiff -u -r1.160 -r1.161 pkgsrc/devel/glib2/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/glib2/patches/patch-at


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.