Debian Bug report logs - #591075
libglib2.0-0: segfaults in postinst script (i.e. installation fails), reportbug/python, emacs, etc.

version graph

Package: libglib2.0-0; Maintainer for libglib2.0-0 is Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>; Source for libglib2.0-0 is src:glib2.0 (PTS, buildd, popcon).

Reported by: Axel Beckert <abe@debian.org>

Date: Sat, 31 Jul 2010 17:30:01 UTC

Severity: grave

Found in version glib2.0/2.25.12-1

Fixed in version glib2.0/2.25.12-2

Done: Sebastian Dröge <slomo@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Loic Minier <lool@dooz.org>:
Bug#591075; Package libglib2.0-0. (Sat, 31 Jul 2010 17:30:04 GMT) (full text, mbox, link).


Acknowledgement sent to Axel Beckert <abe@debian.org>:
New Bug report received and forwarded. Copy sent to Loic Minier <lool@dooz.org>. (Sat, 31 Jul 2010 17:30:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Axel Beckert <abe@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libglib2.0-0: segfaults in postinst script (i.e. installation fails), reportbug/python, emacs, etc.
Date: Sat, 31 Jul 2010 19:26:34 +0200 (CEST)
Package: libglib2.0-0
Severity: grave
Version: 2.25.12-1

libglib2.0-0 fails to install due segfaults in the postinst script:

Setting up libglib2.0-0 (2.25.12-1) ...
Segmentation fault
dpkg: error processing libglib2.0-0 (--configure):
 subprocess installed post-installation script returned error exit
 status 139
dpkg: dependency problems prevent configuration of wireshark:
 wireshark depends on libglib2.0-0 (>= 2.16.0); however:
  Package libglib2.0-0 is not configured yet.
dpkg: error processing wireshark (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of remmina:
 remmina depends on libglib2.0-0 (>= 2.24.0); however:
  Package libglib2.0-0 is not configured yet.
dpkg: error processing remmina (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of guake:
 guake depends on libglib2.0-0 (>= 2.16.0); however:
  Package libglib2.0-0 is not configured yet.
dpkg: error processing guake (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgoffice-0.8-8:
 libgoffice-0.8-8 depends on libglib2.0-0 (>= 2.24.0); however:
  Package libglib2.0-0 is not configured yet.
dpkg: error processing libgoffice-0.8-8 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnumeric:
 gnumeric depends on libglib2.0-0 (>= 2.24.0); however:
  Package libglib2.0-0 is not configured yet.
 gnumeric depends on libgoffice-0.8-8 (>= 0.8.8); however:
  Package libgoffice-0.8-8 is not configured yet.
dpkg: error processing gnumeric (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of tshark:
 tshark depends on libglib2.0-0 (>= 2.16.0); however:
  Package libglib2.0-0 is not configured yet.
dpkg: error processing tshark (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of wireshark-common:
 wireshark-common depends on libglib2.0-0 (>= 2.24.0); however:
  Package libglib2.0-0 is not configured yet.
dpkg: error processing wireshark-common (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libglib2.0-0
 wireshark
 remmina
 guake
 libgoffice-0.8-8
 gnumeric
 tshark
 wireshark-common

Because reportbug also segfaults due to libglib2.0-0, this bugreport
is very minimal with most informations added manually.

Backtrace of reportbug so far:

Starting program: /usr/bin/python /usr/bin/reportbug
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0xb779f2bf in ?? () from /usr/lib/libgobject-2.0.so.0
(gdb) bt
#0  0xb779f2bf in ?? () from /usr/lib/libgobject-2.0.so.0
#1  0xb77a9aef in g_type_init_with_debug_flags ()
   from /usr/lib/libgobject-2.0.so.0
#2  0xb77a9c2e in g_type_init () from /usr/lib/libgobject-2.0.so.0
#3  0xb77db57b in init_gobject ()
   from /usr/lib/pymodules/python2.6/gtk-2.0/gobject/_gobject.so
#4  0x080f75a4 in _PyImport_LoadDynamicModule ()
#5  0x080f5510 in ?? ()
#6  0x080f5cf5 in ?? ()
#7  0x080f5fb5 in ?? ()
#8  0x080f65e9 in ?? ()
#9  0x080f6a87 in PyImport_ImportModuleLevel ()
#10 0x080db02f in ?? ()
#11 0x0806232a in PyObject_Call ()
#12 0x080dbc70 in ?? ()
#13 0x080ddb68 in PyEval_EvalFrameEx ()
#14 0x080e2467 in PyEval_EvalCodeEx ()
#15 0x080e2567 in PyEval_EvalCode ()
#16 0x080f313f in PyImport_ExecCodeModuleEx ()
#17 0x080f4fcc in ?? ()
#18 0x080f5cf5 in ?? ()
#19 0x080f5fb5 in ?? ()
#20 0x080f65e9 in ?? ()
#21 0x080f6a87 in PyImport_ImportModuleLevel ()
#22 0x080db02f in ?? ()
#23 0x0806232a in PyObject_Call ()
#24 0x080dbc70 in ?? ()
#25 0x080ddb68 in PyEval_EvalFrameEx ()
#26 0x080e2467 in PyEval_EvalCodeEx ()
#27 0x080e2567 in PyEval_EvalCode ()
#28 0x080f313f in PyImport_ExecCodeModuleEx ()
#29 0x080f4fcc in ?? ()
#30 0x080f5767 in ?? ()
#31 0x080f5cf5 in ?? ()
#32 0x080f5fec in ?? ()
#33 0x080f65a0 in ?? ()
#34 0x080f6a87 in PyImport_ImportModuleLevel ()
#35 0x080db02f in ?? ()
#36 0x0806232a in PyObject_Call ()
#37 0x080dbc70 in ?? ()
#38 0x080ddb68 in PyEval_EvalFrameEx ()
#39 0x080e2467 in PyEval_EvalCodeEx ()
#40 0x080e2567 in PyEval_EvalCode ()
#41 0x080f313f in PyImport_ExecCodeModuleEx ()
#42 0x080f4fcc in ?? ()
#43 0x080f5767 in ?? ()
#44 0x080f5cf5 in ?? ()
#45 0x080f5fec in ?? ()
#46 0x080f65a0 in ?? ()
#47 0x080f6a87 in PyImport_ImportModuleLevel ()
#48 0x080db02f in ?? ()
#49 0x0806232a in PyObject_Call ()
#50 0x080dbc70 in ?? ()
#51 0x080ddb68 in PyEval_EvalFrameEx ()
#52 0x080e2467 in PyEval_EvalCodeEx ()
#53 0x080e2567 in PyEval_EvalCode ()
#54 0x080f313f in PyImport_ExecCodeModuleEx ()
#55 0x080f4fcc in ?? ()
#56 0x080f5cf5 in ?? ()
#57 0x080f6281 in ?? ()
#58 0x080f6808 in ?? ()
#59 0x080f6a87 in PyImport_ImportModuleLevel ()
#60 0x080db02f in ?? ()
#61 0x080e18c8 in PyEval_EvalFrameEx ()
#62 0x080e2467 in PyEval_EvalCodeEx ()
#63 0x080e2567 in PyEval_EvalCode ()
#64 0x080f313f in PyImport_ExecCodeModuleEx ()
#65 0x080f4fcc in ?? ()
#66 0x080f5767 in ?? ()
#67 0x080f5cf5 in ?? ()
#68 0x080f5fb5 in ?? ()
#69 0x080f65a0 in ?? ()
#70 0x080f6a87 in PyImport_ImportModuleLevel ()
#71 0x080db02f in ?? ()
#72 0x0806232a in PyObject_Call ()
#73 0x080dbc70 in ?? ()
#74 0x080ddb68 in PyEval_EvalFrameEx ()
#75 0x080e2467 in PyEval_EvalCodeEx ()
#76 0x080e2567 in PyEval_EvalCode ()
#77 0x080f313f in PyImport_ExecCodeModuleEx ()
#78 0x080f4fcc in ?? ()
#79 0x080f5cf5 in ?? ()
#80 0x080f6281 in ?? ()
#81 0x080f6808 in ?? ()
#82 0x080f6a87 in PyImport_ImportModuleLevel ()
#83 0x080db02f in ?? ()
#84 0x0806232a in PyObject_Call ()
#85 0x080dbc70 in ?? ()
#86 0x080ddb68 in PyEval_EvalFrameEx ()
#87 0x080e2467 in PyEval_EvalCodeEx ()
#88 0x080e2567 in PyEval_EvalCode ()
#89 0x080ffc1d in PyRun_FileExFlags ()
#90 0x080ffe82 in PyRun_SimpleFileExFlags ()
#91 0x0805dd81 in Py_Main ()
#92 0x0805cf6b in main ()

emacs segfaults, too, if called without -nw (i.e. with X display):

Starting program: /usr/bin/emacs 
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0xb78462bf in ?? () from /usr/lib/libgobject-2.0.so.0
(gdb) bt
#0  0xb78462bf in ?? () from /usr/lib/libgobject-2.0.so.0
#1  0xb7850aef in g_type_init_with_debug_flags ()
   from /usr/lib/libgobject-2.0.so.0
#2  0xb7850c2e in g_type_init () from /usr/lib/libgobject-2.0.so.0
#3  0xb7b5c778 in gdk_pre_parse_libgtk_only ()
   from /usr/lib/libgdk-x11-2.0.so.0
#4  0xb7d135f7 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#5  0xb77942fa in g_option_context_parse () from /lib/libglib-2.0.so.0
#6  0xb7d1330c in gtk_parse_args () from /usr/lib/libgtk-x11-2.0.so.0
#7  0xb7d13384 in gtk_init_check () from /usr/lib/libgtk-x11-2.0.so.0
#8  0xb7d133c4 in gtk_init () from /usr/lib/libgtk-x11-2.0.so.0
#9  0x080e1f6b in ?? ()
#10 0x080edb4a in ?? ()
#11 0x0818d6e3 in ?? ()
#12 0x081c63f1 in ?? ()
#13 0x0818f504 in ?? ()
#14 0x0818d513 in ?? ()
#15 0x081c63f1 in ?? ()
#16 0x0818f0da in ?? ()
#17 0x0818fc12 in ?? ()
#18 0x081c564a in ?? ()
#19 0x0818f504 in ?? ()
#20 0x0818d513 in ?? ()
#21 0x081c63f1 in ?? ()
#22 0x0818f504 in ?? ()
#23 0x0818f703 in ?? ()
#24 0x0818ede4 in ?? ()
#25 0x08124923 in ?? ()
#26 0x0818ca51 in ?? ()
#27 0x081293c5 in ?? ()
#28 0x0818cb31 in ?? ()
#29 0x08129441 in ?? ()
#30 0x081297fa in ?? ()
#31 0x08129922 in ?? ()
#32 0x0811dfad in ?? ()
#33 0xb71edc76 in __libc_start_main (main=0x811d5b0, argc=1, 
    ubp_av=0xbffff644, init=0x81f14b0, fini=0x81f14a0, 
    rtld_fini=0xb7ff10d0 <_dl_fini>, stack_end=0xbffff63c) at
    libc-start.c:228
#34 0x08056701 in ?? ()

No time for finding all the appropriate -dbg packages at the
moment. Will add more detailed backtraces later if wanted.

Architecture is i386, distribution is Sid with a few packages from
Experimental.




Information forwarded to debian-bugs-dist@lists.debian.org, Loic Minier <lool@dooz.org>:
Bug#591075; Package libglib2.0-0. (Sat, 31 Jul 2010 21:39:02 GMT) (full text, mbox, link).


Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Loic Minier <lool@dooz.org>. (Sat, 31 Jul 2010 21:39:03 GMT) (full text, mbox, link).


Message #10 received at 591075@bugs.debian.org (full text, mbox, reply):

From: Jonathan Nieder <jrnieder@gmail.com>
To: 591075@bugs.debian.org
Cc: Axel Beckert <abe@debian.org>
Subject: Re: libglib2.0-0: segfaults in postinst script (i.e. installation fails), reportbug/python, emacs, etc.
Date: Sat, 31 Jul 2010 16:36:10 -0500
Axel Beckert wrote:

> libglib2.0-0 fails to install due segfaults in the postinst script:

Backtrace:

| # dpkg --configure -a
| Setting up libglib2.0-0 (2.25.12-1) ...
| No schema files found: doing nothing.
| Segmentation fault (core dumped)
| dpkg: error processing libglib2.0-0 (--configure):
|  subprocess installed post-installation script returned error exit status 139
[...]
| Errors were encountered while processing:
|  libglib2.0-0
|  libglib2.0-0-dbg
| # dmesg | tail -1
| gio-querymodule[4351]: segfault at 0 ip b76062bf sp bff11d20 error 6 in libgobject-2.0.so.0.2512.0[b75e5000+43000]
| # gdb /usr/lib/glib-2.0/gio-querymodules core
| GNU gdb (GDB) 7.1-debian
[...]
| Reading symbols from /usr/lib/glib-2.0/gio-querymodules...Reading symbols from /usr/lib/debug/usr/lib/glib-2.0/gio-querymodules...done.
| done.
| 
| warning: core file may not match specified executable file.
| [New Thread 4351]
| 
| warning: Can't read pathname for load map: Input/output error.
| Reading symbols from /lib/libglib-2.0.so.0...Reading symbols from /usr/lib/debug/lib/libglib-2.0.so.0.2512.0...done.
[...]
| Reading symbols from /lib/ld-linux.so.2...Reading symbols from /usr/lib/debug/lib/ld-2.11.2.so...done.
| done.
| Loaded symbols for /lib/ld-linux.so.2
| Core was generated by `/usr/lib/glib-2.0/gio-querymodules /usr/lib/gio/modules'.
| Program terminated with signal 11, Segmentation fault.
| #0  g_bsearch_array_create ()
|     at /build/buildd-glib2.0_2.25.12-1-i386-5iccNM/glib2.0-2.25.12/glib/gbsearcharray.h:137
| 137     /build/buildd-glib2.0_2.25.12-1-i386-5iccNM/glib2.0-2.25.12/glib/gbsearcharray.h: No such file or directory.
|         in /build/buildd-glib2.0_2.25.12-1-i386-5iccNM/glib2.0-2.25.12/glib/gbsearcharray.h
| (gdb) bt full
| #0  g_bsearch_array_create ()
|     at /build/buildd-glib2.0_2.25.12-1-i386-5iccNM/glib2.0-2.25.12/glib/gbsearcharray.h:137
| No locals.
| #1  g_signal_init () at /build/buildd-glib2.0_2.25.12-1-i386-5iccNM/glib2.0-2.25.12/gobject/gsignal.c:775
| No locals.
| #2  0xb7610aef in g_type_init_with_debug_flags (debug_flags=G_TYPE_DEBUG_NONE)
|     at /build/buildd-glib2.0_2.25.12-1-i386-5iccNM/glib2.0-2.25.12/gobject/gtype.c:4349
|         g__type_init_lock_lock = {runtime_mutex = 0x0, static_mutex = {
|             pad = "\001\000\000\000\000\000\000\000\377\020\000\000\000\000\000\000\001", '\000' <repeats 22 times>, dummy_double = 4.9406564584124654e-324, dummy_pointer = 0x1, dummy_long = 1}}
|         env_string = <value optimized out>
|         info = {class_size = 0, base_init = 0, base_finalize = 0, class_init = 0, class_finalize = 0, 
|           class_data = 0x0, instance_size = 0, n_preallocs = 0, instance_init = 0, value_table = 0x0}
|         node = 0x0
|         votype = 158872744
|         __PRETTY_FUNCTION__ = "g_type_init_with_debug_flags"
| #3  0xb7610c2e in g_type_init ()
|     at /build/buildd-glib2.0_2.25.12-1-i386-5iccNM/glib2.0-2.25.12/gobject/gtype.c:4367
| No locals.
| #4  0x08048b11 in main (argc=2, argv=0xbff11f04)
|     at /build/buildd-glib2.0_2.25.12-1-i386-5iccNM/glib2.0-2.25.12/gio/gio-querymodules.c:120
|         i = -1074717096
| (gdb) quit

Hope that helps.

| # dpkg -l | egrep '(gtk|glib)'
| ii  evince-gtk                   2.30.3-1              Document (postscrip
| ii  gir1.0-glib-2.0              0.6.15~git20100713-1  Introspection data 
| ii  gir1.0-gtk-2.0               0.6.5-6+b1            GObject introspecti
| ii  gir1.0-json-glib-1.0         0.10.2-2              GLib JSON manipulat
| ii  glibc-doc                    2.11.2-2              Embedded GNU C Libr
| rc  gtk-doc-tools                1.15-2                the GTK+ documentat
| ii  gtk2-engines                 1:2.20.1-1            theme engines for G
| ii  gtk2-engines-pixbuf          2.21.5-1              Pixbuf-based theme 
| ii  libavahi-glib-dev            0.6.27-1              Development headers
| ii  libavahi-glib1               0.6.27-1              Avahi glib integrat
| ii  libcanberra-gtk-module       0.24-1                translates Gtk+ wid
| ii  libcanberra-gtk0             0.24-1                Gtk+ helper for pla
| ii  libdbus-glib-1-2             0.86-1                simple interprocess
| ii  libdbus-glib-1-dev           0.86-1                simple interprocess
| ii  libglib-perl                 1:1.230-1             interface to the GL
| iF  libglib2.0-0                 2.25.12-1             The GLib library of
| iU  libglib2.0-0-dbg             2.25.12-1             The GLib libraries 
| ii  libglib2.0-bin               2.25.11-3             The programs for th
| ii  libglib2.0-data              2.25.11-3             Common files for GL
| ii  libglib2.0-dev               2.25.11-3             Development files f
| ii  libglibmm-2.4-1c2a           2.24.2-1              C++ wrapper for the
| ii  libgtk2-perl                 1:1.230-2             Perl interface to t
| ii  libgtk2.0-0                  2.21.5-1              The GTK+ graphical 
| ii  libgtk2.0-0-dbg              2.21.5-1              The GTK+ libraries 
| ii  libgtk2.0-bin                2.21.5-1              The programs for th
| ii  libgtk2.0-common             2.21.5-1              Common files for th
| ii  libgtk2.0-dev                2.21.5-1              Development files f
| ii  libgtkmm-2.4-1c2a            1:2.20.3-1            C++ wrappers for GT
| ii  libgtkspell-dev              2.0.16-1              Development files f
| ii  libgtkspell0                 2.0.16-1              a spell-checking ad
| ii  libjson-glib-1.0-0           0.10.2-2              GLib JSON manipulat
| ii  libpoppler-glib4             0.12.4-1              PDF rendering libra
| ii  libpulse-mainloop-glib0      0.9.21-3              PulseAudio client l
| ii  libupower-glib1              0.9.5-1               abstraction for pow
| ii  pinentry-gtk2                0.8.0-1               GTK+-2-based PIN or




Information forwarded to debian-bugs-dist@lists.debian.org, Loic Minier <lool@dooz.org>:
Bug#591075; Package libglib2.0-0. (Sun, 01 Aug 2010 21:33:04 GMT) (full text, mbox, link).


Acknowledgement sent to Erich Schubert <erich@debian.org>:
Extra info received and forwarded to list. Copy sent to Loic Minier <lool@dooz.org>. (Sun, 01 Aug 2010 21:33:04 GMT) (full text, mbox, link).


Message #15 received at 591075@bugs.debian.org (full text, mbox, reply):

From: Erich Schubert <erich@debian.org>
To: 591075@bugs.debian.org
Subject: glib2.0/experimental segfaults
Date: Sun, 01 Aug 2010 23:10:22 +0200
Hi,
Same here. libglib2.0-0 2.25.12-1 from experimental failed to install.
I commented the relevant line in the postinst, but this rendered my
system severely broken. Any glib-based application seems to segfault.
So I had to manually configure my network (NetworkManager also
segfaulted) in order to downgrade libglib2.0 again.

Regards,
Erich





Information forwarded to debian-bugs-dist@lists.debian.org, Loic Minier <lool@dooz.org>:
Bug#591075; Package libglib2.0-0. (Tue, 03 Aug 2010 08:51:12 GMT) (full text, mbox, link).


Acknowledgement sent to Marc-André Lureau <marcandre.lureau@gmail.com>:
Extra info received and forwarded to list. Copy sent to Loic Minier <lool@dooz.org>. (Tue, 03 Aug 2010 08:51:12 GMT) (full text, mbox, link).


Message #20 received at 591075@bugs.debian.org (full text, mbox, reply):

From: Marc-André Lureau <marcandre.lureau@gmail.com>
To: 591075@bugs.debian.org
Subject: glib2.0/experimental segfaults
Date: Tue, 3 Aug 2010 10:48:38 +0200
Hello,
Same issue.

-- 
Marc-André Lureau




Information forwarded to debian-bugs-dist@lists.debian.org, Loic Minier <lool@dooz.org>:
Bug#591075; Package libglib2.0-0. (Thu, 05 Aug 2010 00:27:03 GMT) (full text, mbox, link).


Acknowledgement sent to Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>:
Extra info received and forwarded to list. Copy sent to Loic Minier <lool@dooz.org>. (Thu, 05 Aug 2010 00:27:03 GMT) (full text, mbox, link).


Message #25 received at 591075@bugs.debian.org (full text, mbox, reply):

From: Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>
To: 591075@bugs.debian.org
Subject: glib2.0 segv
Date: Thu, 5 Aug 2010 01:39:41 +0200
Hi,

probably an optimization problem? Given the test program

====
extern void g_type_init(void);

int main(int an, char **ac) {
  (void)g_type_init();
  return 0;
}
====

I get this backtrace:

====
#0  g_bsearch_array_create ()
    at /build/buildd-glib2.0_2.25.12-1-i386-5iccNM/glib2.0-2.25.12/glib/gbsearcharray.h:137
#1  g_signal_init ()
    at /build/buildd-glib2.0_2.25.12-1-i386-5iccNM/glib2.0-2.25.12/gobject/gsignal.c:775
#2  0xb7fafaef in g_type_init_with_debug_flags (debug_flags=G_TYPE_DEBUG_NONE)
    at /build/buildd-glib2.0_2.25.12-1-i386-5iccNM/glib2.0-2.25.12/gobject/gtype.c:4349
#3  0xb7fafc2e in g_type_init ()
    at /build/buildd-glib2.0_2.25.12-1-i386-5iccNM/glib2.0-2.25.12/gobject/gtype.c:4367
#4  0x080484bf in main (an=1, ac=0xbffff614) at x.c:4
====

Now a close look at g_signal_init():

#1 C Source
==== g_signal_init()
   [...]
      g_handler_list_bsa_ht = g_hash_table_new (g_direct_hash, NULL);
      g_signal_key_bsa = g_bsearch_array_create (&g_signal_key_bconfig);
   [...]
==== [inline] g_bsearch_array_create()
static inline GBSearchArray*
g_bsearch_array_create (const GBSearchConfig *bconfig)
{
  GBSearchArray *barray;
  guint size;

  g_return_val_if_fail (bconfig != NULL, NULL);

  size = sizeof (GBSearchArray) + bconfig->sizeof_node;
  if (bconfig->flags & G_BSEARCH_ARRAY_ALIGN_POWER2)
    size = G_BSEARCH_UPPER_POWER2 (size);
  barray = (GBSearchArray *) g_malloc (size);
  memset (barray, 0, sizeof (GBSearchArray));

  return barray;
}
====

#2 Assembler
==== <g_signal_init>
   [...]
   0xb7fa5297 <+167>:   mov    eax,DWORD PTR [ebx-0x30]
   0xb7fa529d <+173>:   mov    DWORD PTR [esp+0x4],0x0
   0xb7fa52a5 <+181>:   mov    DWORD PTR [esp],eax
   0xb7fa52a8 <+184>:   call   0xb7f8c714 <g_hash_table_new@plt>
   0xb7fa52ad <+189>:   mov    DWORD PTR [esp],0x0
   0xb7fa52b4 <+196>:   mov    DWORD PTR [ebx+0x504],eax
   0xb7fa52ba <+202>:   call   0xb7f8c614 <g_malloc@plt>
=> 0xb7fa52bf <+207>:   mov    DWORD PTR [eax],0x0
   0xb7fa52c5 <+213>:   mov    DWORD PTR [eax+0x4],0x0
   [...]
====

This is effectively "*(GBSearchArray *)g_malloc(0) = {0, 0}" and MUST fail.
(Where the rest of the inlined function has gone is beyond my comprehension.)
Recompiling the package without optimization makes g_bsearch_array_create() a
proper function (no inlining), the generated assembler looks good, and the
bug disappears.


Regards,

Jan




Added indication that bug 591075 blocks 591492 Request was from Roland Mas <lolando@debian.org> to control@bugs.debian.org. (Thu, 05 Aug 2010 17:24:15 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Loic Minier <lool@dooz.org>:
Bug#591075; Package libglib2.0-0. (Fri, 06 Aug 2010 13:39:06 GMT) (full text, mbox, link).


Acknowledgement sent to "Ulrich Weigand" <uweigand@de.ibm.com>:
Extra info received and forwarded to list. Copy sent to Loic Minier <lool@dooz.org>. (Fri, 06 Aug 2010 13:39:06 GMT) (full text, mbox, link).


Message #32 received at 591075@bugs.debian.org (full text, mbox, reply):

From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: 591075@bugs.debian.org
Cc: lool@dooz.org
Subject: Re: glib2.0 segv
Date: Fri, 6 Aug 2010 15:37:30 +0200 (CEST)
Alexander Sack asked me to look into this.

I can reproduce the problem on Ubuntu maverick, and I fact I get this
compile-time warning that already indicates the problem:
In function 'memset',
    inlined from 'g_bsearch_array_create' at /home/uweigand/linaro/glib2.0-2.25.12/glib/gbsearcharray.h:137,
    inlined from 'g_signal_init' at /home/uweigand/linaro/glib2.0-2.25.12/gobject/gsignal.c:775:
//usr/include/bits/string3.h:86: warning: call to __builtin___memset_chk will always overflow destination buffer


What's going on here is that everything is inlined into g_signal_init,
and the whole computation of "size" can be done at compile time.  This means:

  size = sizeof (GBSearchArray) + bconfig->sizeof_node;
  if (bconfig->flags & G_BSEARCH_ARRAY_ALIGN_POWER2)
    size = G_BSEARCH_UPPER_POWER2 (size);

gets simplified to

  size = sizeof (GBSearchArray) + sizeof (SignalKey);
  size = G_BSEARCH_UPPER_POWER2 (size);

which becomes

  size = sizeof (GBSearchArray) + sizeof (SignalKey);
  size = 1 << g_bit_storage (size - 1);

which in turn is

  size = sizeof (GBSearchArray) + sizeof (SignalKey);
  size = 1 << (((GLIB_SIZEOF_LONG * 8 - 1) ^ __builtin_clzl (size - 1)) + 1);

Now the problem is that GLIB_SIZEOF_LONG is defined to 8,
even though this is a 32-bit build and sizeof (unsigned long) is 4.

This causes the shift size to be some value greater than 32,
and the result of the shift to be undefined, which happens to
be optimized to 0.

The reason for the wrong GLIB_SIZEOF_LONG seems to be a build issue.
The value is picked up from a file glib2.0-2.25.12/glib/glibconfig.h
which appears to have been generated on a 64-bit machine.

There is also another, apparently correct, version in
glib2.0-2.25.12/debian/build/deb/glib/glibconfig.h
but due to include path ordering, the one in glib/ gets picked up.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com




Reply sent to Sebastian Dröge <slomo@debian.org>:
You have taken responsibility. (Fri, 06 Aug 2010 18:21:03 GMT) (full text, mbox, link).


Notification sent to Axel Beckert <abe@debian.org>:
Bug acknowledged by developer. (Fri, 06 Aug 2010 18:21:03 GMT) (full text, mbox, link).


Message #37 received at 591075-close@bugs.debian.org (full text, mbox, reply):

From: Sebastian Dröge <slomo@debian.org>
To: 591075-close@bugs.debian.org
Subject: Bug#591075: fixed in glib2.0 2.25.12-2
Date: Fri, 06 Aug 2010 18:17:21 +0000
Source: glib2.0
Source-Version: 2.25.12-2

We believe that the bug you reported is fixed in the latest version of
glib2.0, which is due to be installed in the Debian FTP archive:

glib2.0_2.25.12-2.diff.gz
  to main/g/glib2.0/glib2.0_2.25.12-2.diff.gz
glib2.0_2.25.12-2.dsc
  to main/g/glib2.0/glib2.0_2.25.12-2.dsc
libglib2.0-0-dbg_2.25.12-2_amd64.deb
  to main/g/glib2.0/libglib2.0-0-dbg_2.25.12-2_amd64.deb
libglib2.0-0-refdbg_2.25.12-2_amd64.deb
  to main/g/glib2.0/libglib2.0-0-refdbg_2.25.12-2_amd64.deb
libglib2.0-0_2.25.12-2_amd64.deb
  to main/g/glib2.0/libglib2.0-0_2.25.12-2_amd64.deb
libglib2.0-bin_2.25.12-2_amd64.deb
  to main/g/glib2.0/libglib2.0-bin_2.25.12-2_amd64.deb
libglib2.0-data_2.25.12-2_all.deb
  to main/g/glib2.0/libglib2.0-data_2.25.12-2_all.deb
libglib2.0-dev_2.25.12-2_amd64.deb
  to main/g/glib2.0/libglib2.0-dev_2.25.12-2_amd64.deb
libglib2.0-doc_2.25.12-2_all.deb
  to main/g/glib2.0/libglib2.0-doc_2.25.12-2_all.deb
libglib2.0-udeb_2.25.12-2_amd64.udeb
  to main/g/glib2.0/libglib2.0-udeb_2.25.12-2_amd64.udeb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 591075@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sebastian Dröge <slomo@debian.org> (supplier of updated glib2.0 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 06 Aug 2010 18:50:27 +0200
Source: glib2.0
Binary: libglib2.0-0 libglib2.0-udeb libglib2.0-bin libglib2.0-dev libglib2.0-0-dbg libglib2.0-data libglib2.0-doc libgio-fam libglib2.0-0-refdbg
Architecture: source all amd64
Version: 2.25.12-2
Distribution: experimental
Urgency: low
Maintainer: Loic Minier <lool@dooz.org>
Changed-By: Sebastian Dröge <slomo@debian.org>
Description: 
 libgio-fam - GLib Input, Output and Streaming Library (fam module)
 libglib2.0-0 - The GLib library of C routines
 libglib2.0-0-dbg - The GLib libraries and debugging symbols
 libglib2.0-0-refdbg - The GLib library of C routines - refdbg library
 libglib2.0-bin - The programs for the GLib library
 libglib2.0-data - Common files for GLib library
 libglib2.0-dev - Development files for the GLib library
 libglib2.0-doc - Documentation files for the GLib library
 libglib2.0-udeb - The GLib library of C routines - minimal runtime (udeb)
Closes: 591075 591492
Changes: 
 glib2.0 (2.25.12-2) experimental; urgency=low
 .
   [ Sebastien Bacher ]
   * debian/rules:
     + clean the distributed glibconfig.h it has 64 bits values
       which leaded to the issues on 32 bits architectures
       (Closes: #591075, #591492).
   * debian/patches/90_git_glibconfig_build.patch:
     + git change to use the builddir glibconfig.h and not the srcdir one
 .
   [ Sebastian Dröge ]
   * debian/patches/99_autoreconf.patch:
     + Regenerated autotools files for the above patch.
   * debian/rules:
     + Call dh_installdirs to actually use the .dirs files.
Checksums-Sha1: 
 37d6813e5678eaa1fe27c8321907aa714c5ed26e 1697 glib2.0_2.25.12-2.dsc
 020035f9d38957d75dfd21002b722e6652ea1974 142591 glib2.0_2.25.12-2.diff.gz
 6ef82fd8e09637e2afb0ea38534ee44ebdff01a1 1065036 libglib2.0-data_2.25.12-2_all.deb
 1a8ddeccc6ef38c7528a953f92e3646a64968dab 1911724 libglib2.0-doc_2.25.12-2_all.deb
 acc7d55e91064c699fe1ee8d51b6a80156681915 1420268 libglib2.0-0_2.25.12-2_amd64.deb
 a7c765f01b3ab9808cb3d847976737ce46d034e9 2000634 libglib2.0-udeb_2.25.12-2_amd64.udeb
 a36f804bb82ac2cfb6fe91ea429f0a1698b3515a 280480 libglib2.0-bin_2.25.12-2_amd64.deb
 a6ce3cf9bad126890ec7f113a27a3a206c23684f 1510282 libglib2.0-dev_2.25.12-2_amd64.deb
 576a7c9de4306c76b770d5e62f2ce6f4b77135df 1794892 libglib2.0-0-dbg_2.25.12-2_amd64.deb
 66569833dfd85df80d18b66b6331ef5c00da388c 612064 libglib2.0-0-refdbg_2.25.12-2_amd64.deb
Checksums-Sha256: 
 8654f47d4272c938037fd97592c4978f4a67a38590bfe5be5e05ae39a1f455fa 1697 glib2.0_2.25.12-2.dsc
 4aaffc8e1f54b27e5442bfeeb99ed5d0834f18f6cffdd4a3007bab9d28186a18 142591 glib2.0_2.25.12-2.diff.gz
 3c77006a51c4f10eefe1d13b1af7b4830c21541a992ea3c7ccd30c6571a3b7ec 1065036 libglib2.0-data_2.25.12-2_all.deb
 f52e6d3f15e0d1c650a84c85707a148ed27a81b1897d57fc77542418e8cd1e79 1911724 libglib2.0-doc_2.25.12-2_all.deb
 d2636bab657c0e059c6c97198dcb4d1fa3ec9eb33b2db7e60345a2b8db648023 1420268 libglib2.0-0_2.25.12-2_amd64.deb
 9840dc1bcdfabd93ac84115999648121d28f768a217a159de59bab9af350a4e6 2000634 libglib2.0-udeb_2.25.12-2_amd64.udeb
 0ca3d65c282f0bb0fa18ce0367e61e6b6df0b6b038f5a59bbd83dbd90e69de24 280480 libglib2.0-bin_2.25.12-2_amd64.deb
 faf21d136cb1bf045a157523d28492f59e4ae559332469a8aee55b3da9771a4c 1510282 libglib2.0-dev_2.25.12-2_amd64.deb
 873f26c1e5799946a7d19f98f925444dcc954b7d4c8b0ea00299c49937706145 1794892 libglib2.0-0-dbg_2.25.12-2_amd64.deb
 46bc67cd16c34d1ea6364b40bf36879d5acb7530f80f4d0d977c8a86d42b4887 612064 libglib2.0-0-refdbg_2.25.12-2_amd64.deb
Files: 
 b1f5c67a4f6e6b11d0145d6104fde4ad 1697 libs optional glib2.0_2.25.12-2.dsc
 9c3ecd85663f864a4f1a0f55368e9de6 142591 libs optional glib2.0_2.25.12-2.diff.gz
 d1651506d5676a564f54228ba776ea18 1065036 libs optional libglib2.0-data_2.25.12-2_all.deb
 6ba2ac3dc8243e9ecca36c6a0aa061ec 1911724 doc optional libglib2.0-doc_2.25.12-2_all.deb
 886e100b7caeac2068eb53a167a94bf7 1420268 libs optional libglib2.0-0_2.25.12-2_amd64.deb
 67da5453b0cd59ad56c2b4d921324817 2000634 debian-installer optional libglib2.0-udeb_2.25.12-2_amd64.udeb
 40f9b368a2af020eb1ba67b335697bd5 280480 misc optional libglib2.0-bin_2.25.12-2_amd64.deb
 db74781d90beb5e1546f9944861ad2fa 1510282 libdevel optional libglib2.0-dev_2.25.12-2_amd64.deb
 a6f6a4a1ee7c3ccf7520790a97a083f9 1794892 debug extra libglib2.0-0-dbg_2.25.12-2_amd64.deb
 fbeaa898358356316586789515c70b0a 612064 debug extra libglib2.0-0-refdbg_2.25.12-2_amd64.deb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkxcTZkACgkQBsBdh1vkHyFOpgCfcJdoeM7aK2QZm3LhOCqIZ25k
lygAnjhWHzJiJT4yL54TItduwAdNeGgk
=HmBp
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 04 Sep 2010 07:36:00 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jan 7 07:08:05 2018; Machine Name: beach

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.