Skip to content

xfce4-about SEGVs on Solaris

In Xfce 4.20pre1, xfce4-about SEGVs on Solaris. This seems to go back as far as 4.16, while 4.14 was ok. gdb shows

Thread 2 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0x00007fffa7c0ef05 in glibtop_open_s () from /usr/lib/64/libgtop-2.0.so.11
(gdb) bt
#0  0x00007fffa7c0ef05 in glibtop_open_s () from /usr/lib/64/libgtop-2.0.so.11
#1  0x00007fffa7c0ae14 in glibtop_init_s () from /usr/lib/64/libgtop-2.0.so.11
#2  0x00007fffa7c109d0 in glibtop_get_sysinfo_s ()
   from /usr/lib/64/libgtop-2.0.so.11
#3  0x0000000000415e59 in xfce_about_system (builder=0x57bda0)
    at /vol/xfce/src/xfce-4.20pre1/libxfce4ui-4.19.6/xfce4-about/main.c:158
#4  main (argc=<optimized out>, argv=<optimized out>)
    at /vol/xfce/src/xfce-4.20pre1/libxfce4ui-4.19.6/xfce4-about/main.c:564

When using a debug build of libgtop-2.0.so.11 instead, I find

Thread 2 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
glibtop_open_s (server=0x7fffa5515b60 <_glibtop_global_server>, 
    program_name=0x7fffa54095e9 "glibtop", features=1, flags=0)
    at /vol/X11/src/gtop/libgtop-2.41.2-sul/sysdeps/solaris/open.c:145
145	    server->machine->pagesize = i - 1;
(gdb) bt
#0  glibtop_open_s (server=0x7fffa5515b60 <_glibtop_global_server>, 
    program_name=0x7fffa54095e9 "glibtop", features=1, flags=0)
    at /vol/X11/src/gtop/libgtop-2.41.2-sul/sysdeps/solaris/open.c:145
#1  0x00007fffa540b827 in glibtop_init_s (server_ptr=0x7fffbfffeca8, 
    features=1, flags=0) at /vol/X11/src/gtop/libgtop-2.41.2-sul/lib/init.c:247
#2  0x00007fffa541276d in init_sysinfo (
    server=0x7fffa5515b60 <_glibtop_global_server>)
    at /vol/X11/src/gtop/libgtop-2.41.2-sul/sysdeps/solaris/sysinfo.c:46
#3  0x00007fffa5412bec in glibtop_get_sysinfo_s (
    server=0x7fffa5515b60 <_glibtop_global_server>)
    at /vol/X11/src/gtop/libgtop-2.41.2-sul/sysdeps/solaris/sysinfo.c:135
#4  0x00007fffa540f90c in glibtop_get_sysinfo ()
    at /vol/X11/src/gtop/libgtop-2.41.2-sul/sysdeps/common/default.c:120
#5  0x0000000000415e59 in xfce_about_system (builder=0x57bda0)
    at /vol/xfce/src/xfce-4.20pre1/libxfce4ui-4.19.6/xfce4-about/main.c:158
#6  main (argc=<optimized out>, argv=<optimized out>)
    at /vol/xfce/src/xfce-4.20pre1/libxfce4ui-4.19.6/xfce4-about/main.c:564

server->machine is NULL at that point. However, the libgtop examples/sysinfo works just fine on Solaris. Comparing the two, I see that the example code (every single one in there) calls glibtop_init, which in turn initializes server->machine using glibtop_machine_new while there's not a single call to glibtop_init in the whole Xfce code base.