Hello Joachim,
I got the idea that I should be able to produce a broken setup too ;-)
And yes, just by installing nvidia-driver into my test VM I get the crash below.
It is caused by trying to retrieve GL_NUM_EXTENSIONS.
This fails due to our broken setup and leaves the
variable that should store it uninitialized
and is then used for the alloction attempt.
I was not able to reproduce it that way in a
Buster/testing VM - abiword just opens after two libEGL warnings.
Therefore it looks like upstream have fixed this already.
Kind regards,
Bernhard
Stretch: ###
$ abiword
pci id for fd 5: 1234:, driver (null)
(abiword:30203): GLib-ERROR **:
/build/glib2.0-YYXhFA/glib2.0-2.50.3/./glib/gmem.c:100: failed to allocate
4272896292 bytes
Trace/Breakpoint ausgelöst (Speicherabzug geschrieben)
root@debian:~# coredumpctl gdb
...
Core was generated by `abiword'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0 _g_log_abort (breakpoint=1) at ././glib/gmessages.c:509
509 ././glib/gmessages.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt
#0 0xb4d8ae40 in _g_log_abort (breakpoint=1) at ././glib/gmessages.c:509
#1 0xb4d8bdd3 in g_log_default_handler (log_domain=0xb4dcff6e "GLib",
log_level=6, message=0xb0f00470
"/build/glib2.0-YYXhFA/glib2.0-2.50.3/./glib/gmem.c:100: failed to allocate
4290460004 bytes", unused_data=0x0) at ././glib/gmessages.c:2896
#2 0xb4d8c114 in g_logv (log_domain=0xb4dcff6e "GLib",
log_level=G_LOG_LEVEL_ERROR, format=0xb4dd8abc "%s: failed to allocate %u
bytes", args=0xbfeecdfc "\204\212ݴd9\273\377\020\227{\267") at
././glib/gmessages.c:1297
#3 0xb4d8c2e5 in g_log (log_domain=0xb4dcff6e "GLib",
log_level=G_LOG_LEVEL_ERROR, format=0xb4dd8abc "%s: failed to allocate %u
bytes") at ././glib/gmessages.c:1359
#4 0xb4d8a8e0 in g_malloc (n_bytes=4290460004) at ././glib/gmem.c:99
#5 0xb5e4abf6 in _cogl_context_get_gl_extensions (context=0x988688) at
cogl-context.c:686
#6 0xb5e46426 in _cogl_driver_update_features (ctx=0x988688, error=0xbfeecfa8)
at driver/gl/gl/cogl-driver-gl.c:380
#7 0xb5e8431a in _cogl_winsys_context_init (context=0x988688,
error=0xbfeecfa8) at winsys/cogl-winsys-stub.c:110
#8 0xb5e49fe4 in cogl_context_new (display=0x9829d0, error=0xbfeecfa8) at
cogl-context.c:237
#9 0xb5f6b12f in clutter_backend_do_real_create_context (error=0xbfeecfa4,
driver_id=, backend=0x985c18 [ClutterBackendGdk]) at
clutter-backend.c:331
#10 0xb5f6b12f in clutter_backend_real_create_context (backend=0x985c18
[ClutterBackendGdk], error=0xbfeed108) at clutter-backend.c:414
#11 0xb5f8563d in _clutter_feature_init (error=0xbfeed108) at
clutter-feature.c:107
#12 0xb5f96c1c in clutter_init_real (error=error@entry=0xbfeed108) at
clutter-main.c:1406
#13 0xb5f96e41 in post_parse_hook (context=0x990170, group=0x98eb80, data=0x0,
error=0xbfeed108) at clutter-main.c:1572
#14 0xb4d91760 in g_option_context_parse (context=0x990170, argc=0xbfeed254,
argv=0xbfeed17c, error=0xbfeed108) at ././glib/goption.c:2175
#15 0xb5f97ced in clutter_parse_args (error=0xbfeed104, argv=0xbfeed17c,
argc=0xbfeed254) at clutter-main.c:1792
#16 0xb5f97ced in clutter_init (argc=0xbfeed254, argv=0xbfeed17c) at
clutter-main.c:1854
#17 0xb60f65f2 in gtk_clutter_init (argc=0xbfeed254, argv=0xbfeed17c) at
./gtk-clutter-util.c:233
#18 0xb7241a1f in AP_UnixApp::main(char const*, int, char**)
(szAppName=0x42e710 "abiword", argc=, argv=) at
ap_UnixApp.cpp:1301
#19 0x0042e50e in main(int, char**) (argc=1, argv=0xbfeed314) at
../src/wp/main/gtk/UnixMain.cpp:30
(gdb) bt full
...
#5 0xb5e4abf6 in _cogl_context_get_gl_extensions (context=0x988688) at
cogl-context.c:686
num_extensions = -1074868648
i =
env_disabled_extensions =
ret =
...
(gdb) list _cogl_context_get_gl_extensions
...
681 {
682 int num_extensions, i;
683
684 context->glGetIntegerv (GL_NUM_EXTENSIONS, &num_extensions);
685
686 ret = g_malloc (sizeof (char *) * (num_extensions + 1));
<--
687
Buster/testing: ###
benutzer@debian:~$ abiword
pci id for fd 5: 1234:, driver (null)
libEGL warning: DRI3: No driver found
libEGL warning: DRI2: failed to authenticate
apt update
apt install mc htop systemd-coredump xserver-xorg xdm openbox xterm dpkg-dev
devscripts strace gdb valgrind nvidia-driver abiword abiword-dbgsym
libabiword-3.0-dbgsym libclutter-gtk-1.0-0-dbgsym libclutter-1.0-dbg
libglib2.0-0-dbg libcogl20-dbgsym libgtk-3-0-dbgsym
apt build-dep cogl
systemctl start xdm
mkdir cogl/orig -p
cdcogl/orig
apt source cogl
cd ../..
mkdir libclutter-1.0-0/orig -p
cdlibclutter-1.0-0/orig
apt source libclutter-1.0-0
cd ../..
export DISPLAY=:0
#export CLUTTER_ENABLE_DIAGNOSTIC=1
#export CLUTTER_DEBUG=1
#not compiled in
$ abiword
pci id for fd 5: 1234:, driver (null)
(abiword:30203): GLib-ERROR **:
/build/glib2.0-YYXhFA/glib2.0-2.50.3/./glib/gmem.c:100: failed to allocate
4272896292 bytes
Trace/Break