Bug 30730 - telepathy-glib-0.12.0 fails test
Summary: telepathy-glib-0.12.0 fails test
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: 0.12
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Simon McVittie
QA Contact: Telepathy bugs list
URL: http://people.freedesktop.org/~smcv/t...
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2010-10-09 06:36 UTC by Hans de Graaff
Modified: 2010-10-25 11:10 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Hans de Graaff 2010-10-09 06:36:17 UTC
Doing configure; make; make check with telepathy-glib-0.12.0 fails for me:

============================================================================================================
1 of 48 tests failed
Please report to https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=tp-glib&version=0.12
============================================================================================================


The output for the test that fails:

(process:9536): tp-glib/proxy-DEBUG: tp_proxy_constructor: 0x2467020: request 0x2455e50 represents core features
(process:9536): tp-glib/proxy-DEBUG: tp_dbus_daemon_watch_name_owner: Adding match rule type='signal',sender='org.free
desktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='org.freede
sktop.Telepathy.ConnectionManager.example_no_protocols'
(process:9536): tp-glib/manager-DEBUG: tp_connection_manager_find_manager_file: in XDG_DATA_HOME: trying /home/graaff/
playground/test/telepathy-glib-0.12.0/tests/dbus/telepathy/managers/example_no_protocols.manager
(process:9536): tp-glib/manager-DEBUG: tp_connection_manager_find_manager_file: in XDG_DATA_DIRS: trying /home/graaff/
playground/test/telepathy-glib-0.12.0/tests/dbus/telepathy/managers/example_no_protocols.manager
(process:9536): tp-glib/proxy-DEBUG: tp_proxy_poll_features: 0x2467020: core features not ready yet, nothing prepared
(process:9536): tp-glib/proxy-DEBUG: _tp_dbus_daemon_get_name_owner_idle: GetNameOwner(org.freedesktop.Telepathy.Conne
ctionManager.example_no_protocols) raised org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.
freedesktop.Telepathy.ConnectionManager.example_no_protocols': no such name
(process:9536): tp-glib/manager-DEBUG: tp_connection_manager_idle_read_manager_file: no .manager file or failed to par
se it, trying to activate CM instead
(process:9536): tp-glib/manager-DEBUG: tp_connection_manager_continue_introspection: calling GetAll on CM
(process:9536): tp-glib/proxy-DEBUG: tp_proxy_borrow_interface_by_id: 0x2467020: org.freedesktop.DBus.Properties DBusG
Proxy is 0x2462720
(process:9536): tp-glib/manager-DEBUG: tp_connection_manager_get_all_cb: Ignoring error getting ConnectionManager prop
erties: dbus-glib-error-quark 2: The name org.freedesktop.Telepathy.ConnectionManager.example_no_protocols was not pro
vided by any .service files
(process:9536): tp-glib/manager-DEBUG: tp_connection_manager_continue_introspection: calling ListProtocols on CM
(process:9536): tp-glib/proxy-DEBUG: tp_proxy_borrow_interface_by_id: 0x2467020: org.freedesktop.Telepathy.ConnectionM
anager DBusGProxy is 0x2462890
(process:9536): tp-glib/manager-DEBUG: tp_connection_manager_got_protocols: Failed: The name org.freedesktop.Telepathy
.ConnectionManager.example_no_protocols was not provided by any .service files
(process:9536): tp-glib/manager-DEBUG: tp_connection_manager_end_introspection: End of introspection, info source 0
(process:9536): tp-glib/proxy-DEBUG: tp_proxy_poll_features: 0x2467020: temporarily failed, ending all requests
(process:9536): tp-glib/proxy-DEBUG: tp_proxy_prepare_request_finish: 0x2455e50
(process:9536): tp-glib/proxy-DEBUG: tp_proxy_prepare_request_finish: 0x2455d30
FAIL: test-example-no-protocols
Comment 1 Simon McVittie 2010-10-11 03:35:46 UTC
This test starts up one of the example connection managers with g_spawn_async() and does stuff with it. It's hard to tell from the debug output, but the test may have some sort of race condition resulting from that?
Comment 2 Hans de Graaff 2010-10-11 09:02:18 UTC
I seem to be able to hit it consistently, so if it's a race condition then it may be influenced by the environment. Hints on further debugging are appreciated.
Comment 3 Simon McVittie 2010-10-21 05:57:38 UTC
I can't see an actual failure in that debug output: could it have happened earlier? On failure, there should be a line that says "ERROR", "WARNING" or "CRITICAL".

If you're logging the output to a file, you'll need both stdout and stderr (e.g. by running it with "2>&1 | tee output.log").

If you run the test under gdb, like this, you might be able to get a better idea why it's failing:

abs_top_builddir=/home/graaff/playground/test/telepathy-glib-0.12.0 \
libtool --mode=execute gdb tests/dbus/test-example-no-protocols

If it fails, you'll get normal output, followed by a gdb prompt; use the command "bt full" to find out where you are and why, and "quit" to quit.

It might also be interesting to add

    g_message ("in wait_for_name_owner_cb");

to the beginning of wait_for_name_owner_cb() in tests/dbus/example-no-protocols.c, and similar for early_cm_exited().
Comment 4 Hans de Graaff 2010-10-23 03:04:35 UTC
Running the test manually gets me an ERROR:

tp-glib:ERROR:base-connection-manager.c:255:tp_base_connection_manager_constructor: assertion failed: (cls->protocol_params != NULL)

gdb isn't helpful n this case because it ends up in a timeout.



(process:32658): tp-glib/proxy-DEBUG: _tp_dbus_daemon_get_name_owner_idle: GetNameOwner(org.freedesktop.Telepathy.ConnectionManager.example_no_protocols) raised org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.freedesktop.Telepathy.ConnectionManager.example_no_protocols': no such name
(process:32658): tp-glib/manager-DEBUG: tp_connection_manager_idle_read_manager_file: no .manager file or failed to parse it, trying to activate CM instead
(process:32658): tp-glib/manager-DEBUG: tp_connection_manager_continue_introspection: calling GetAll on CM
(process:32658): tp-glib/proxy-DEBUG: tp_proxy_borrow_interface_by_id: 0x618020: org.freedesktop.DBus.Properties DBusGProxy is 0x613320
(process:32658): tp-glib/manager-DEBUG: tp_connection_manager_get_all_cb: Ignoring error getting ConnectionManager properties: dbus-glib-error-quark 2: The name org.freedesktop.Telepathy.ConnectionManager.example_no_protocols was not provided by any .service files
(process:32658): tp-glib/manager-DEBUG: tp_connection_manager_continue_introspection: calling ListProtocols on CM
(process:32658): tp-glib/proxy-DEBUG: tp_proxy_borrow_interface_by_id: 0x618020: org.freedesktop.Telepathy.ConnectionManager DBusGProxy is 0x613490
(process:32658): tp-glib/manager-DEBUG: tp_connection_manager_got_protocols: Failed: The name org.freedesktop.Telepathy.ConnectionManager.example_no_protocols was not provided by any .service files
(process:32658): tp-glib/manager-DEBUG: tp_connection_manager_end_introspection: End of introspection, info source 0
(process:32658): tp-glib/proxy-DEBUG: tp_proxy_poll_features: 0x618020: temporarily failed, ending all requests
(process:32658): tp-glib/proxy-DEBUG: tp_proxy_prepare_request_finish: 0x606f50
(process:32658): tp-glib/proxy-DEBUG: tp_proxy_prepare_request_finish: 0x606ac0
**
tp-glib:ERROR:base-connection-manager.c:255:tp_base_connection_manager_constructor: assertion failed: (cls->protocol_params != NULL)
Comment 5 Simon McVittie 2010-10-25 03:44:49 UTC
That assertion failure can't happen in version 0.12, and indeed line 255 isn't an assertion any more! I think I know what's happening here now, though: for some reason the example CM that's being run is using your installed version of telepathy-glib, but it requires the newer version 0.12.

Could you please tell me what output these commands produce, when you're in the top-level telepathy-glib source directory and have the same environment you've been using to compile it:

    echo ${LD_LIBRARY_PATH+not_set}

    ./libtool --mode=execute ldd \
    examples/cm/no-protocols/telepathy-example-no-protocols

    make -C examples/cm/no-protocols \
    -W main.c \
    -n telepathy-example-no-protocols

Also, what telepathy-glib version(s) do you have installed system-wide, and where are they? (/usr/lib, /usr/local/lib, /opt/whatever, etc.)
Comment 7 Simon McVittie 2010-10-25 04:51:19 UTC
Could you try out this snapshot version, please? I believe it will probably fix this bug.

http://people.freedesktop.org/~smcv/telepathy-glib-0.12.2rc1.tar.gz

Thanks!
Comment 8 Hans de Graaff 2010-10-25 10:55:32 UTC
(In reply to comment #5)

> Could you please tell me what output these commands produce, when you're in the
> top-level telepathy-glib source directory and have the same environment you've
> been using to compile it:
> 
>     echo ${LD_LIBRARY_PATH+not_set}

empty

>     ./libtool --mode=execute ldd \
>     examples/cm/no-protocols/telepathy-example-no-protocols

	libtelepathy-glib.so.0 => /usr/lib64/libtelepathy-glib.so.0 (0x00007f2e39cf4000)

aka "theory confirmed"

>     make -C examples/cm/no-protocols \
>     -W main.c \
>     -n telepathy-example-no-protocols

make: Entering directory `/home/graaff/playground/test/telepathy-glib-0.12.0/examples/cm/no-protocols'
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../..    -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare -Wnested-externs -Wpointer-arith -Wformat-security -Winit-self -Wno-missing-field-initializers -Wno-unused-parameter -Wno-deprecated-declarations -pthread -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I../../.. -I../../.. -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
rm -f telepathy-example-no-protocols
/bin/sh ../../../libtool  --tag=CC   --mode=link gcc -std=gnu99 -Wall -Wextra -Wdeclaration-after-statement -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wsign-compare -Wnested-externs -Wpointer-arith -Wformat-security -Winit-self -Wno-missing-field-initializers -Wno-unused-parameter -Wno-deprecated-declarations -pthread -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I../../.. -I../../.. -g -O2  -Wl,-O1 -o telepathy-example-no-protocols connection-manager.o main.o -pthread -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0   -pthread -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0   -pthread -ldbus-glib-1 -ldbus-1 -lpthread -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0   ../../../telepathy-glib/libtelepathy-glib.la 
make: Leaving directory `/home/graaff/playground/test/telepathy-glib-0.12.0/examples/cm/no-protocols'


> Also, what telepathy-glib version(s) do you have installed system-wide, and
> where are they? (/usr/lib, /usr/local/lib, /opt/whatever, etc.)

I have telepathy-glib-0.10.7 installed in /usr/lib64 (which is the default /usr/lib on a stock Gentoo amd64 system).
Comment 9 Hans de Graaff 2010-10-25 10:59:30 UTC
(In reply to comment #7)

> http://people.freedesktop.org/~smcv/telepathy-glib-0.12.2rc1.tar.gz

Woohoo!

===================
All 48 tests passed
===================

Thanks!
Comment 10 Simon McVittie 2010-10-25 11:10:49 UTC
Excellent. In that case, this is already fixed in git, and will be fixed in the 0.12.2 and 0.13.3 releases. Thanks for your help!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.