linux - What is the significance of "error: symbol lookup error: undefined symbol:" when loading libglib in debug mode? -


the following command succeeds without errors: python3 -c 'from gi.repository import glib'.

however, when debugging glib-related segmentation faults, ran same command ld_debug=files (on multiple versions of debian , ubuntu) , bunch of errors related libglib , libgobject.

these unmodified libraries directly repositories (see "environment" below details).

question: significance of these errors? can safely ignored, , if so, why? or can contribute errors later on in program, , if so, there workaround fix this, or packages broken , must fixed modifying source?

an example of errors:

 16306: opening file=/lib/x86_64-linux-gnu/libglib-2.0.so.0 [0]; direct_opencount=1  16306:  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_module_check_init (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_module_unload (fatal) 

environment

  • tested on 5 different computers 4 different distros: ubuntu 14.04, ubuntu 15.10, debian 8.4, , someone's custom distro
  • relevant package versions (for 15.10 ubuntu distro only):
    • python3 3.4.3-4ubuntu1 (also: python3-all python3-all-dev python3-dbg python3-dev)
    • python3-gi 3.16.2-1build1 (also: python3-gi-cairo python3-gi-dbg)
    • gir1.2-glib-2.0:amd64 1.44.0-1
    • libgirepository-1.0-1:amd64 1.44.0-1
    • libglib2.0-0:amd64 2.46.2-1ubuntu2

full command output:

$ ld_debug=files python3 -c 'from gi.repository import glib'  16306:   16306: file=libpthread.so.0 [0];  needed python3 [0]  16306: file=libpthread.so.0 [0];  generating link map  16306:   dynamic: 0x00007f74ce030d50  base: 0x00007f74cde19000   size: 0x000000000021c490  16306:     entry: 0x00007f74cde1ff10  phdr: 0x00007f74cde19040  phnum:                  9  16306:   16306:   16306: file=libdl.so.2 [0];  needed python3 [0]  16306: file=libdl.so.2 [0];  generating link map  16306:   dynamic: 0x00007f74cde17d88  base: 0x00007f74cdc15000   size: 0x0000000000203110  16306:     entry: 0x00007f74cdc15ed0  phdr: 0x00007f74cdc15040  phnum:                  9  16306:   16306:   16306: file=libutil.so.1 [0];  needed python3 [0]  16306: file=libutil.so.1 [0];  generating link map  16306:   dynamic: 0x00007f74cdc13dc0  base: 0x00007f74cda12000   size: 0x0000000000202118  16306:     entry: 0x00007f74cda12f10  phdr: 0x00007f74cda12040  phnum:                  9  16306:   16306:   16306: file=librt.so.1 [0];  needed python3 [0]  16306: file=librt.so.1 [0];  generating link map  16306:   dynamic: 0x00007f74cda10d70  base: 0x00007f74cd80a000   size: 0x0000000000207c18  16306:     entry: 0x00007f74cd80c350  phdr: 0x00007f74cd80a040  phnum:                  9  16306:   16306:   16306: file=libexpat.so.1 [0];  needed python3 [0]  16306: file=libexpat.so.1 [0];  generating link map  16306:   dynamic: 0x00007f74cd808dc0  base: 0x00007f74cd5e1000   size: 0x0000000000228088  16306:     entry: 0x00007f74cd5e4b90  phdr: 0x00007f74cd5e1040  phnum:                  7  16306:   16306:   16306: file=libz.so.1 [0];  needed python3 [0]  16306: file=libz.so.1 [0];  generating link map  16306:   dynamic: 0x00007f74cd5dfdd0  base: 0x00007f74cd3c6000   size: 0x000000000021a228  16306:     entry: 0x00007f74cd3c8220  phdr: 0x00007f74cd3c6040  phnum:                  7  16306:   16306:   16306: file=libm.so.6 [0];  needed python3 [0]  16306: file=libm.so.6 [0];  generating link map  16306:   dynamic: 0x00007f74cd3c4da8  base: 0x00007f74cd0c5000   size: 0x0000000000300158  16306:     entry: 0x00007f74cd0ca580  phdr: 0x00007f74cd0c5040  phnum:                  9  16306:   16306:   16306: file=libc.so.6 [0];  needed python3 [0]  16306: file=libc.so.6 [0];  generating link map  16306:   dynamic: 0x00007f74cd0beba0  base: 0x00007f74ccd1a000   size: 0x00000000003aaa20  16306:     entry: 0x00007f74ccd3bc50  phdr: 0x00007f74ccd1a040  phnum:                 10  16306:   16306:   16306: calling init: /lib/x86_64-linux-gnu/libpthread.so.0  16306:   16306:   16306: calling init: /lib/x86_64-linux-gnu/libc.so.6  16306:   16306:   16306: calling init: /lib/x86_64-linux-gnu/libm.so.6  16306:   16306:   16306: calling init: /lib/x86_64-linux-gnu/libz.so.1  16306:   16306:   16306: calling init: /lib/x86_64-linux-gnu/libexpat.so.1  16306:   16306:   16306: calling init: /lib/x86_64-linux-gnu/librt.so.1  16306:   16306:   16306: calling init: /lib/x86_64-linux-gnu/libutil.so.1  16306:   16306:   16306: calling init: /lib/x86_64-linux-gnu/libdl.so.2  16306:   16306:   16306: initialize program: python3  16306:   16306:   16306: transferring control: python3  16306:   16306:   16306: file=/usr/lib/python3/dist-packages/gi/_gi.cpython-34m-x86_64-linux-gnu.so [0];  dynamically loaded python3 [0]  16306: file=/usr/lib/python3/dist-packages/gi/_gi.cpython-34m-x86_64-linux-gnu.so [0];  generating link map  16306:   dynamic: 0x00007f74ccb1f9e8  base: 0x00007f74cc8da000   size: 0x000000000024e648  16306:     entry: 0x00007f74cc8ea4f0  phdr: 0x00007f74cc8da040  phnum:                  7  16306:   16306:   16306: file=libgthread-2.0.so.0 [0];  needed /usr/lib/python3/dist-packages/gi/_gi.cpython-34m-x86_64-linux-gnu.so [0]  16306: file=libgthread-2.0.so.0 [0];  generating link map  16306:   dynamic: 0x00007f74cc8d8de8  base: 0x00007f74cc6d8000   size: 0x0000000000201048  16306:     entry: 0x00007f74cc6d86d0  phdr: 0x00007f74cc6d8040  phnum:                  7  16306:   16306:   16306: file=libgirepository-1.0.so.1 [0];  needed /usr/lib/python3/dist-packages/gi/_gi.cpython-34m-x86_64-linux-gnu.so [0]  16306: file=libgirepository-1.0.so.1 [0];  generating link map  16306:   dynamic: 0x00007f74cc6d6ce0  base: 0x00007f74cc4a5000   size: 0x0000000000232688  16306:     entry: 0x00007f74cc4ac380  phdr: 0x00007f74cc4a5040  phnum:                  7  16306:   16306:   16306: file=libgobject-2.0.so.0 [0];  needed /usr/lib/python3/dist-packages/gi/_gi.cpython-34m-x86_64-linux-gnu.so [0]  16306: file=libgobject-2.0.so.0 [0];  generating link map  16306:   dynamic: 0x00007f74cc4a3b80  base: 0x00007f74cc252000   size: 0x0000000000252fc8  16306:     entry: 0x00007f74cc25d330  phdr: 0x00007f74cc252040  phnum:                  7  16306:   16306:   16306: file=libglib-2.0.so.0 [0];  needed /usr/lib/python3/dist-packages/gi/_gi.cpython-34m-x86_64-linux-gnu.so [0]  16306: file=libglib-2.0.so.0 [0];  generating link map  16306:   dynamic: 0x00007f74cc24fd40  base: 0x00007f74cbf43000   size: 0x000000000030e6a8  16306:     entry: 0x00007f74cbf5d580  phdr: 0x00007f74cbf43040  phnum:                  7  16306:   16306:   16306: file=libffi.so.6 [0];  needed /usr/lib/python3/dist-packages/gi/_gi.cpython-34m-x86_64-linux-gnu.so [0]  16306: file=libffi.so.6 [0];  generating link map  16306:   dynamic: 0x00007f74cbf41de8  base: 0x00007f74cbd3b000   size: 0x0000000000207668  16306:     entry: 0x00007f74cbd3c870  phdr: 0x00007f74cbd3b040  phnum:                  7  16306:   16306:   16306: file=libgmodule-2.0.so.0 [0];  needed /usr/lib/x86_64-linux-gnu/libgirepository-1.0.so.1 [0]  16306: file=libgmodule-2.0.so.0 [0];  generating link map  16306:   dynamic: 0x00007f74cbd39de8  base: 0x00007f74cbb37000   size: 0x00000000002031b8  16306:     entry: 0x00007f74cbb381b0  phdr: 0x00007f74cbb37040  phnum:                  7  16306:   16306:   16306: file=libgio-2.0.so.0 [0];  needed /usr/lib/x86_64-linux-gnu/libgirepository-1.0.so.1 [0]  16306: file=libgio-2.0.so.0 [0];  generating link map  16306:   dynamic: 0x00007f74cbb32c68  base: 0x00007f74cb7bd000   size: 0x0000000000379ac8  16306:     entry: 0x00007f74cb7f0c50  phdr: 0x00007f74cb7bd040  phnum:                  7  16306:   16306:   16306: file=libpcre.so.3 [0];  needed /lib/x86_64-linux-gnu/libglib-2.0.so.0 [0]  16306: file=libpcre.so.3 [0];  generating link map  16306:   dynamic: 0x00007f74cb7bbc90  base: 0x00007f74cb54f000   size: 0x000000000026d168  16306:     entry: 0x00007f74cb550710  phdr: 0x00007f74cb54f040  phnum:                  7  16306:   16306:   16306: file=libselinux.so.1 [0];  needed /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 [0]  16306: file=libselinux.so.1 [0];  generating link map  16306:   dynamic: 0x00007f74cb54bd68  base: 0x00007f74cb32a000   size: 0x00000000002248f0  16306:     entry: 0x00007f74cb330310  phdr: 0x00007f74cb32a040  phnum:                  8  16306:   16306:   16306: file=libresolv.so.2 [0];  needed /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 [0]  16306: file=libresolv.so.2 [0];  generating link map  16306:   dynamic: 0x00007f74cb326d88  base: 0x00007f74cb113000   size: 0x0000000000216a68  16306:     entry: 0x00007f74cb116a90  phdr: 0x00007f74cb113040  phnum:                  9  16306:   16306:   16306: calling init: /lib/x86_64-linux-gnu/libresolv.so.2  16306:   16306:   16306: calling init: /lib/x86_64-linux-gnu/libpcre.so.3  16306:   16306:   16306: calling init: /lib/x86_64-linux-gnu/libselinux.so.1  16306:   16306:   16306: calling init: /lib/x86_64-linux-gnu/libglib-2.0.so.0  16306:   16306:   16306: calling init: /usr/lib/x86_64-linux-gnu/libffi.so.6  16306:   16306:   16306: calling init: /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0  16306:   16306:   16306: calling init: /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0  16306:   16306:   16306: calling init: /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0  16306:   16306:   16306: calling init: /usr/lib/x86_64-linux-gnu/libgirepository-1.0.so.1  16306:   16306:   16306: calling init: /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0  16306:   16306:   16306: calling init: /usr/lib/python3/dist-packages/gi/_gi.cpython-34m-x86_64-linux-gnu.so  16306:   16306: opening file=/usr/lib/python3/dist-packages/gi/_gi.cpython-34m-x86_64-linux-gnu.so [0]; direct_opencount=1  16306:   16306:   16306: file=/usr/lib/python3.4/lib-dynload/_opcode.cpython-34m-x86_64-linux-gnu.so [0];  dynamically loaded python3 [0]  16306: file=/usr/lib/python3.4/lib-dynload/_opcode.cpython-34m-x86_64-linux-gnu.so [0];  generating link map  16306:   dynamic: 0x00007f74caff0df8  base: 0x00007f74cadf0000   size: 0x00000000002011f0  16306:     entry: 0x00007f74cadf0990  phdr: 0x00007f74cadf0040  phnum:                  7  16306:   16306:   16306: calling init: /usr/lib/python3.4/lib-dynload/_opcode.cpython-34m-x86_64-linux-gnu.so  16306:   16306: opening file=/usr/lib/python3.4/lib-dynload/_opcode.cpython-34m-x86_64-linux-gnu.so [0]; direct_opencount=1  16306:   16306: opening file=/lib/x86_64-linux-gnu/libglib-2.0.so.0 [0]; direct_opencount=1  16306:   16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_module_check_init (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_module_unload (fatal)  16306: opening file=/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 [0]; direct_opencount=1  16306:   16306: /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0: error: symbol lookup error: undefined symbol: g_module_check_init (fatal)  16306: /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0: error: symbol lookup error: undefined symbol: g_module_unload (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_io_condition_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_main_loop_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_main_loop_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_main_loop_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_main_loop_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_main_context_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_main_context_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_main_context_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_main_context_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_source_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_source_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_source_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_source_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_source_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_source_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_io_channel_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_io_channel_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_io_channel_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_io_channel_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_pollfd_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_pollfd_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_pollfd_get_type (fatal)  16306: /lib/x86_64-linux-gnu/libglib-2.0.so.0: error: symbol lookup error: undefined symbol: g_pollfd_get_type (fatal)  16306:   16306: calling fini: python3 [0]  16306:   16306:   16306: calling fini: /lib/x86_64-linux-gnu/libutil.so.1 [0]  16306:   16306:   16306: calling fini: /lib/x86_64-linux-gnu/librt.so.1 [0]  16306:   16306:   16306: calling fini: /lib/x86_64-linux-gnu/libexpat.so.1 [0]  16306:   16306:   16306: calling fini: /usr/lib/python3/dist-packages/gi/_gi.cpython-34m-x86_64-linux-gnu.so [0]  16306:   16306:   16306: calling fini: /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 [0]  16306:   16306:   16306: calling fini: /usr/lib/x86_64-linux-gnu/libgirepository-1.0.so.1 [0]  16306:   16306:   16306: calling fini: /lib/x86_64-linux-gnu/libm.so.6 [0]  16306:   16306:   16306: calling fini: /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 [0]  16306:   16306:   16306: calling fini: /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 [0]  16306:   16306:   16306: calling fini: /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 [0]  16306:   16306:   16306: calling fini: /usr/lib/x86_64-linux-gnu/libffi.so.6 [0]  16306:   16306:   16306: calling fini: /lib/x86_64-linux-gnu/libglib-2.0.so.0 [0]  16306:   16306:   16306: calling fini: /lib/x86_64-linux-gnu/libz.so.1 [0]  16306:   16306:   16306: calling fini: /lib/x86_64-linux-gnu/libselinux.so.1 [0]  16306:   16306:   16306: calling fini: /lib/x86_64-linux-gnu/libpcre.so.3 [0]  16306:   16306:   16306: calling fini: /lib/x86_64-linux-gnu/libdl.so.2 [0]  16306:   16306:   16306: calling fini: /lib/x86_64-linux-gnu/libresolv.so.2 [0]  16306:   16306:   16306: calling fini: /usr/lib/python3.4/lib-dynload/_opcode.cpython-34m-x86_64-linux-gnu.so [0]  16306:   16306:   16306: calling fini: /lib/x86_64-linux-gnu/libpthread.so.0 [0]  16306:  

i seeing same thing python app uses glib , gstreamer. ran ld_files=true , piped output:

$ ./testlib.sh lib/hls.py 2>&1 | grep fatal |awk '{ print $(nf-1) }' | sort -u __dridrivergetextensions_swrast g_io_channel_get_type g_io_condition_get_type g_main_context_get_type g_main_loop_get_type g_module_check_init g_module_unload g_pollfd_get_type g_source_get_type 

__dridrivergetextensions_swrast() seems little special, others can found on gnome developer boxed types page or in dyanmic loading of modules.

i'm still not sure whether reason app segfaults every time run now. section gmodulecheckinit() says:

if module contains function named g_module_check_init() called automatically when module loaded.

so it's possible normal g_module_check_init() not found , related error message harmless. wonder if that's reason module loading continues, instead of exiting error code.

for while, building , installing gstreamer libs , command-line tools myself latest stable version (gstreamer 1.10.4). when started segfaulting, wiped every gstreamer lib find under /usr , installed version comes ubuntu distro, gstreamer 1.2. it's still seg-faulting, maybe still missing.

i know partial answer, it's long comment. maybe can add something.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo