NetBSD Problem Report #56212

From www@netbsd.org  Thu May 27 02:01:45 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D8E021A9282
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 27 May 2021 02:01:44 +0000 (UTC)
Message-Id: <20210527020143.6FE4D1A92A8@mollari.NetBSD.org>
Date: Thu, 27 May 2021 02:01:43 +0000 (UTC)
From: lenzi.sergio@gmail.com
Reply-To: lenzi.sergio@gmail.com
To: gnats-bugs@NetBSD.org
Subject: evolution (mail/evolution)  abort coredump
X-Send-Pr-Version: www-1.0

>Number:         56212
>Category:       pkg
>Synopsis:       evolution (mail/evolution)  abort coredump
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 27 02:05:00 +0000 2021
>Closed-Date:    Sat Aug 07 03:33:23 +0000 2021
>Last-Modified:  Sat Aug 07 03:33:23 +0000 2021
>Originator:     sergio lenzi
>Release:        9.2
>Organization:
k1 sistemas
>Environment:
NetBSD netbsd386.netbsd 9.2 NetBSD 9.2 (LZT9) #0: Mon May 17 21:11:46 -03 2021  NetBSD@vms.lenzicasa:/home/NetBSD/BUILD/9/i386/OBJ/sys/arch/i386/compile/GENERIC i386
>Description:
evolution, the main client for gnome, dumps core on only one situation:
when you access the contacts and try to add a new contact
the problem seems linked from the glib version 60+  the new pkgsrc is base on glib-2.68, so it is impossible to use evolution on new systems where glib version is greater 2.60 it happens on both i386 and amd64
a core dump from gdb shows:

Core was generated by `evolution'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0  0xb0c1367d in _g_log_abort () from /usr/pkg/lib/libglib-2.0.so.0
[Current thread is 1 (process 1)]
(gdb) bt
#0  0xb0c1367d in _g_log_abort () from /usr/pkg/lib/libglib-2.0.so.0
#1  0xb0c145ba in g_log_default_handler () from /usr/pkg/lib/libglib-2.0.so.0
#2  0xb0c147f9 in g_logv () from /usr/pkg/lib/libglib-2.0.so.0
#3  0xb0c14912 in g_log () from /usr/pkg/lib/libglib-2.0.so.0
#4  0xab7a356e in e_load_ui_builder_definition (builder=0xa3097920, basename=0xa6e60f63 "contact-editor.ui")
    at /usr/work/mail/evolution/work/evolution-3.34.1/src/e-util/e-misc-utils.c:794
#5  0xa6e5a337 in e_contact_editor_init (e_contact_editor=0xa453e920)
    at /usr/work/mail/evolution/work/evolution-3.34.1/src/addressbook/gui/contact-editor/e-contact-editor.c:5038
#6  0xaf85c0b0 in g_type_create_instance () from /usr/pkg/lib/libgobject-2.0.so.0
#7  0xaf83d44b in g_object_new_internal () from /usr/pkg/lib/libgobject-2.0.so.0
#8  0xaf83ebf5 in g_object_new_valist () from /usr/pkg/lib/libgobject-2.0.so.0
#9  0xaf83f0e3 in g_object_new () from /usr/pkg/lib/libgobject-2.0.so.0
#10 0xa6e5b17c in e_contact_editor_new (shell=0xa798abe0, book_client=0xa4d862b0, contact=0xa29e2280, 
    is_new_contact=1, editable=1)
    at /usr/work/mail/evolution/work/evolution-3.34.1/src/addressbook/gui/contact-editor/e-contact-editor.c:5357
#11 0xa6ebce48 in book_shell_backend_new_contact_cb (source_object=0xa7687970, result=0xa3097968, user_data=0xa4cf61f0)
    at /usr/work/mail/evolution/work/evolution-3.34.1/src/modules/addressbook/e-book-shell-backend.c:115
#12 0xaf90b9f1 in g_simple_async_result_complete () from /usr/pkg/lib/libgio-2.0.so.0
#13 0xaf90ba71 in complete_in_idle_cb () from /usr/pkg/lib/libgio-2.0.so.0
#14 0xb0c0e1a0 in g_main_context_dispatch () from /usr/pkg/lib/libglib-2.0.so.0
#15 0xb0c0e536 in g_main_context_iterate.isra () from /usr/pkg/lib/libglib-2.0.so.0
#16 0xb0c0e7f3 in g_main_loop_run () from /usr/pkg/lib/libglib-2.0.so.0
#17 0xb052914b in gtk_main () from /usr/pkg/lib/libgtk-3.so.0
--Type <RET> for more, q to quit, c to continue without paging--
#18 0x0804b996 in main (argc=1, argv=0xbfbdd7b4) at /usr/work/mail/evolution/work/evolution-3.34.1/src/shell/main.c:691
>How-To-Repeat:
start evolution
select contatcs
click new

the program core dums with the message: evolution-util-ERROR **: 22:48:14.803: contact-editor.ui: /usr/pkg/share/evolution/ui/contact-editor.ui:500:1 Invalid type function 'e_contact_editor_dyntable_get_type'

>Fix:

>Release-Note:

>Audit-Trail:
From: Benny Siegert <bsiegert@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/56212: evolution (mail/evolution) abort coredump
Date: Thu, 27 May 2021 09:22:07 +0200

 > evolution, the main client for gnome, dumps core on only one situation:
 > when you access the contacts and try to add a new contact
 > the problem seems linked from the glib version 60+  the new pkgsrc is base on glib-2.68, so it is impossible to use evolution on new systems where glib version is greater 2.60 it happens on both i386 and amd64

 This may be worth filing upstream.

 -- 
 Benny

From: Sergio de Almeida Lenzi <lenzi.sergio@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56212: evolution (mail/evolution) abort coredump  SOLVED
Date: Sun, 30 May 2021 15:13:07 -0300

 --=-BSxSGx0s3aS8jOFoHar0
 Content-Type: multipart/alternative; boundary="=-FQPYIh8M/ANHcVBEDxV/"


 --=-FQPYIh8M/ANHcVBEDxV/
 Content-Type: text/plain; charset="UTF-8"
 Content-Transfer-Encoding: 8bit

 Em qui, 2021-05-27 às 07:25 +0000, Benny Siegert escreveu:
 > The following reply was made to PR pkg/56212; it has been noted by GNATS.
 > 
 > From: Benny Siegert <bsiegert@gmail.com>
 > To: gnats-bugs@netbsd.org
 > Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
 > Subject: Re: pkg/56212: evolution (mail/evolution) abort coredump
 > Date: Thu, 27 May 2021 09:22:07 +0200
 > 
 >  > evolution, the main client for gnome, dumps core on only one situation:
 >  > when you access the contacts and try to add a new contact
 >  > the problem seems linked from the glib version 60+  the new pkgsrc is base on glib-2.68, so it is impossible to use evolution on new systems where glib version is greater 2.60 it happens on both i386 and amd64
 >  
 >  This may be worth filing upstream.
 >  
 >  -- 
 >  Benny
 >  

 The problem is in the glib2 dynamic load of modules.. 
 Patch adapted from FreeBSD  solution in the attach 



 --=-FQPYIh8M/ANHcVBEDxV/
 Content-Type: text/html; charset="utf-8"
 Content-Transfer-Encoding: quoted-printable

 <html><head></head><body><div>Em qui, 2021-05-27 =C3=A0s 07:25 +0000, Benny=
  Siegert escreveu:</div><blockquote type=3D"cite" style=3D"margin:0 0 0 .8e=
 x; border-left:2px #729fcf solid;padding-left:1ex"><pre>The following reply=
  was made to PR pkg/56212; it has been noted by GNATS.</pre><pre><br></pre>=
 <pre>From: Benny Siegert &lt;<a href=3D"mailto:bsiegert@gmail.com">bsiegert=
 @gmail.com</a>&gt;</pre><pre>To: <a href=3D"mailto:gnats-bugs@netbsd.org">g=
 nats-bugs@netbsd.org</a></pre><pre>Cc: <a href=3D"mailto:pkg-manager@netbsd=
 .org">pkg-manager@netbsd.org</a>, <a href=3D"mailto:gnats-admin@netbsd.org"=
 >gnats-admin@netbsd.org</a>, <a href=3D"mailto:pkgsrc-bugs@netbsd.org">pkgs=
 rc-bugs@netbsd.org</a></pre><pre>Subject: Re: pkg/56212: evolution (mail/ev=
 olution) abort coredump</pre><pre>Date: Thu, 27 May 2021 09:22:07 +0200</pr=
 e><pre><br></pre><pre> &gt; evolution, the main client for gnome, dumps cor=
 e on only one situation:</pre><pre> &gt; when you access the contacts and t=
 ry to add a new contact</pre><pre> &gt; the problem seems linked from the g=
 lib version 60+  the new pkgsrc is base on glib-2.68, so it is impossible t=
 o use evolution on new systems where glib version is greater 2.60 it happen=
 s on both i386 and amd64</pre><pre> </pre><pre> This may be worth filing up=
 stream.</pre><pre> </pre><pre> -- </pre><pre> Benny</pre><pre> </pre></bloc=
 kquote><div><br></div><div>The problem is in the glib2 dynamic load of modu=
 les..&nbsp;</div><div>Patch adapted from FreeBSD &nbsp;solution in the atta=
 ch&nbsp;</div><div><br></div><div><br></div><div class=3D"-x-evo-signature-=
 wrapper"><span class=3D"-x-evo-signature" id=3D"none"></span></div></body><=
 /html>

 --=-FQPYIh8M/ANHcVBEDxV/--

 --=-BSxSGx0s3aS8jOFoHar0
 Content-Disposition: attachment; filename="patch-gmodule_gmodule-dl.c"
 Content-Type: text/x-csrc; name="patch-gmodule_gmodule-dl.c"; charset="UTF-8"
 Content-Transfer-Encoding: base64

 JE5ldEJTRCQKCi0tLSBnbW9kdWxlL2dtb2R1bGUtZGwuYy5vcmlnCTIwMjEtMDQtMDggMTQ6MDA6
 MTYuODczNTAxMDAwICswMDAwCisrKyBnbW9kdWxlL2dtb2R1bGUtZGwuYwpAQCAtMTA2LDI4ICsx
 MDYsNyBAQCBfZ19tb2R1bGVfb3BlbiAoY29uc3QgZ2NoYXIgKmZpbGVfbmFtZSwKIHN0YXRpYyBn
 cG9pbnRlcgogX2dfbW9kdWxlX3NlbGYgKHZvaWQpCiB7Ci0gIGdwb2ludGVyIGhhbmRsZTsKLSAg
 Ci0gIC8qIHRvIHF1ZXJ5IHN5bWJvbHMgZnJvbSB0aGUgcHJvZ3JhbSBpdHNlbGYsIHNwZWNpYWwg
 bGluayBvcHRpb25zCi0gICAqIGFyZSByZXF1aXJlZCBvbiBzb21lIHN5c3RlbXMuCi0gICAqLwot
 Ci0gIC8qIE9uIEFuZHJvaWQgMzIgYml0IChpLmUuIG5vdCBfX0xQNjRfXyksIGRsb3BlbihOVUxM
 KQotICAgKiBkb2VzIG5vdCB3b3JrIHJlbGlhYmxlIGFuZCBnZW5lcmFsbHkgbm8gc3ltYm9scyBh
 cmUgZm91bmQKLSAgICogYXQgYWxsLiBSVExEX0RFRkFVTFQgd29ya3MgdGhvdWdoLgotICAgKiBP
 biBBbmRyb2lkIDY0IGJpdCwgZGxvcGVuKE5VTEwpIHNlZW1zIHRvIHdvcmsgYnV0IGRsc3ltKGhh
 bmRsZSkKLSAgICogYWx3YXlzIHJldHVybnMgJ3VuZGVmaW5lZCBzeW1ib2wnLiBPbmx5IGlmIFJU
 TERfREVGQVVMVCBvciAKLSAgICogTlVMTCBpcyBnaXZlbiwgZGxzeW0gcmV0dXJucyBhbiBhcHBy
 b3ByaWF0ZSBwb2ludGVyLgotICAgKi8KLSNpZiBkZWZpbmVkKF9fQklPTklDX18pCi0gIGhhbmRs
 ZSA9IFJUTERfREVGQVVMVDsKLSNlbHNlCi0gIGhhbmRsZSA9IGRsb3BlbiAoTlVMTCwgUlRMRF9H
 TE9CQUwgfCBSVExEX0xBWlkpOwotI2VuZGlmCi0gIGlmICghaGFuZGxlKQotICAgIGdfbW9kdWxl
 X3NldF9lcnJvciAoZmV0Y2hfZGxlcnJvciAoVFJVRSkpOwotICAKLSAgcmV0dXJuIGhhbmRsZTsK
 KyAgcmV0dXJuIFJUTERfREVGQVVMVDsKIH0KIAogc3RhdGljIHZvaWQK


 --=-BSxSGx0s3aS8jOFoHar0--

From: Sergio de Almeida Lenzi <lenzi.sergio@gmail.com>
To: gnats-bugs@netbsd.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org, 
	pkgsrc-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56212: evolution (mail/evolution) abort coredump  SOLVED
Date: Sun, 30 May 2021 15:29:34 -0300

 Em dom, 2021-05-30 às 18:15 +0000, Sergio de Almeida Lenzi escreveu:
 > The following reply was made to PR pkg/56212; it has been noted by GNATS.
 > 

 a patch to devel/glib2 solve ths PR

 ===================================================
 $NetBSD$

 --- gmodule/gmodule-dl.c.orig	2021-04-08 14:00:16.873501000 +0000
 +++ gmodule/gmodule-dl.c
 @@ -106,28 +106,7 @@ _g_module_open (const gchar *file_name,
  static gpointer
  _g_module_self (void)
  {
 -  gpointer handle;
 -  
 -  /* to query symbols from the program itself, special link options
 -   * are required on some systems.
 -   */
 -
 -  /* On Android 32 bit (i.e. not __LP64__), dlopen(NULL)
 -   * does not work reliable and generally no symbols are found
 -   * at all. RTLD_DEFAULT works though.
 -   * On Android 64 bit, dlopen(NULL) seems to work but dlsym(handle)
 -   * always returns 'undefined symbol'. Only if RTLD_DEFAULT or 
 -   * NULL is given, dlsym returns an appropriate pointer.
 -   */
 -#if defined(__BIONIC__)
 -  handle = RTLD_DEFAULT;
 -#else
 -  handle = dlopen (NULL, RTLD_GLOBAL | RTLD_LAZY);
 -#endif
 -  if (!handle)
 -    g_module_set_error (fetch_dlerror (TRUE));
 -  
 -  return handle;
 +  return RTLD_DEFAULT;
  }

  static void
 ===================================================================


From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc: lenzi.sergio@gmail.com, prlw1@cam.ac.uk
Subject: Re: pkg/56212: evolution (mail/evolution) abort coredump  SOLVED
Date: Sun, 6 Jun 2021 13:07:54 +0100

 On Sun, May 30, 2021 at 06:30:02PM +0000, Sergio de Almeida Lenzi wrote:
 ...
 >  a patch to devel/glib2 solve ths PR
 ...

 I see that when glib2 was updated to 2.64.0, the patches

 -SHA1 (patch-gmodule_gmodule-ar.c) = e382a0ada232e083d51cbede7f689a50ebeff4d8
 -SHA1 (patch-gmodule_gmodule-dl.c) = b678a04debbc79ebb67d91db7716990658e76da4
 -SHA1 (patch-gmodule_gmodule-dyld.c) = 5adf62970d9cff22d451307aaa0b00d975dab138
 -SHA1 (patch-gmodule_gmodule-win32.c) = 477a861f8590a62c3dbc0aa4ad728cc86ebb34dd
 -SHA1 (patch-gmodule_gmodule.c) = 55c5f9d16e3517f3fdc04d40922f50d9c66b0b9a

 were simply ditched.

 As you have witnessed a problem, maybe you have a test to encourage
 upstream to apply what I believe to be correct:

   https://gitlab.gnome.org/GNOME/glib/-/merge_requests/327

From: "Patrick Welche" <prlw1@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56212 CVS commit: pkgsrc/devel/glib2
Date: Wed, 30 Jun 2021 14:26:11 +0000

 Module Name:	pkgsrc
 Committed By:	prlw1
 Date:		Wed Jun 30 14:26:11 UTC 2021

 Modified Files:
 	pkgsrc/devel/glib2: Makefile distinfo
 Added Files:
 	pkgsrc/devel/glib2/patches: patch-gmodule_gmodule-dl.c
 	    patch-gmodule_gmodule.c

 Log Message:
 Re-add patches I wrote in October 2018:

     glib2's gobject subsystem is essentially a wrapper for dlopen. In
     view of comments in PR lib/49791 which can be summarised as
     "RTLD_GLOBAL is a bug", make gobject use RTLD_DEFAULT instead.

 This should fix PR pkg/56212

 The upstream merge request

     https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2171

 has been updated - feel free to add a description of the problems you
 experienced without this patch to it.


 To generate a diff of this commit:
 cvs rdiff -u -r1.281 -r1.282 pkgsrc/devel/glib2/Makefile
 cvs rdiff -u -r1.287 -r1.288 pkgsrc/devel/glib2/distinfo
 cvs rdiff -u -r0 -r1.3 pkgsrc/devel/glib2/patches/patch-gmodule_gmodule-dl.c \
     pkgsrc/devel/glib2/patches/patch-gmodule_gmodule.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56212: evolution (mail/evolution) abort coredump  SOLVED
Date: Wed, 30 Jun 2021 15:58:02 +0100

  Module Name:	pkgsrc
  Committed By:	prlw1
  Date:		Wed Jun 30 14:26:11 UTC 2021

  Modified Files:
  	pkgsrc/devel/glib2: Makefile distinfo
  Added Files:
  	pkgsrc/devel/glib2/patches: patch-gmodule_gmodule-dl.c
  	    patch-gmodule_gmodule.c

  Log Message:
  Re-add patches I wrote in October 2018:

      glib2's gobject subsystem is essentially a wrapper for dlopen. In
      view of comments in PR lib/49791 which can be summarised as
      "RTLD_GLOBAL is a bug", make gobject use RTLD_DEFAULT instead.

  This should fix PR pkg/56212

  The upstream merge request

      https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2171

  has been updated - feel free to add a description of the problems you
  experienced without this patch to it.


  To generate a diff of this commit:
  cvs rdiff -u -r1.281 -r1.282 pkgsrc/devel/glib2/Makefile
  cvs rdiff -u -r1.287 -r1.288 pkgsrc/devel/glib2/distinfo
  cvs rdiff -u -r0 -r1.3 pkgsrc/devel/glib2/patches/patch-gmodule_gmodule-dl.c \
      pkgsrc/devel/glib2/patches/patch-gmodule_gmodule.c

  Please note that diffs are not public domain; they are subject to the
  copyright notices on the relevant files.


State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 17 Jul 2021 08:20:11 +0000
State-Changed-Why:
Is this fixed?

(also, what should we do to discourage ditching patches like this? it keeps
happening)


State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 07 Aug 2021 03:33:23 +0000
State-Changed-Why:
Submitter wrote to the gnats administrator address (instead of gnats-bugs)
to report it was fixed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.