buzztrax icon indicating copy to clipboard operation
buzztrax copied to clipboard

'make check' reports failure

Open rffontenelle opened this issue 8 years ago • 32 comments

After building successfully, make -k check reports failure in tests/bt-cmd-info.sh and tests/bt-cmd-info.sh. I kindly ask to take a look in the logs and let me know if these messages are relevant.

buzztrax-0.10.2-1-x86_64-check.log.txt buzztrax-0.10.2-1-x86_64-build.log.txt test-suite.log.txt

rffontenelle avatar Jun 20 '16 20:06 rffontenelle

It seems that the binaries you built crash right away :/ If you run this from your build dir:

G_DEBUG="fatal_warnings" libtool --mode=execute gdb --args ./buzztrax-cmd --command=play --input-file=tests/songs/test-simple1.xml

this will enter gdb, type 'r' to run. Does it play a beep (for 1:20 sec) without crashing? If it crashes, please type 'bt' to get a backtrace.

ensonic avatar Jun 21 '16 07:06 ensonic

It plays a beep without crashing. (gbd-log.txt)

p.s.: when I added --enable-debug to ./configure and the compilation failed. Could this be related? See: buzztrax-build-log.txt and my PKGBUILD (rules for building packaging in Arch)

rffontenelle avatar Jun 21 '16 12:06 rffontenelle

Maybe don't activate '-Werror=misleading-indentation' if that causes build errors. This is apparently a new gcc warning and it is a bit silly.

ensonic avatar Jun 24 '16 19:06 ensonic

I added a travis build for without --enable-debug and it passes: https://travis-ci.org/Buzztrax/buzztrax/jobs/140203433

ensonic avatar Jun 25 '16 11:06 ensonic

Yep, without --enable-debug flag it passes. I have no intention on using it, but I assumed it could be useful for you to debug something, or to to make sure symbols are not stripped (who knows...).

Hey, I've finally got some crashes! The attached log crash-1.txt shows gdb > 'bt' without buzztrax software installed (complained about schema missing). On the other hand, in crash-2.txt, with buzztrax installed (ignored make -k check and built and installed the package).

Please let me know if you need me to preserve symbol of any of buzztrax's dependencies.

rffontenelle avatar Jun 25 '16 21:06 rffontenelle

Thanks for keeping testing. Crash should be prevented by the test setup (See https://github.com/Buzztrax/buzztrax/blob/master/Makefile.tests.am#L45). There is a strange design designing in gsetting, where one function in glib crashes is the setting schema is not installed. Now I wonder why this is not working in your case.

The log crash-2.txt is actually working (not crashing, right?). If that is the case then I think some of the tests don't get the TESTS_ENVIRONMENT. I researched a bit and I think something changed in automake, where this variable has to be called AM_TESTS_ENVIRONMENT now. Testing and sending a change in a sec. Would be awesome, if you could try that one your side too.

ensonic avatar Jun 26 '16 10:06 ensonic

Indeed, crash-2 isn't a crash. Now it make sense: every time I ignored tests instructions and installed the package, tests wouldn't report fails.

I patched your commit and it still crashes, now with a little bit different output. Please see: crash-3.txt

rffontenelle avatar Jun 26 '16 13:06 rffontenelle

The uninstalled tests should now work, running a test directly would need to be changed and set even more envvars:

  GSETTINGS_BACKEND=memory GSETTINGS_SCHEMA_DIR=$PWD LC_ALL=C G_DEBUG="fatal_warnings" libtool --mode=execute gdb --args ./buzztrax-cmd --command=play --input-file=tests/songs/test-simple1.xml

ensonic avatar Jun 26 '16 16:06 ensonic

Still crashes with what seems to be the same output. See crash-4.txt

rffontenelle avatar Jun 26 '16 17:06 rffontenelle

Yes that is helpful: this one is flaky (it mostly passes), there is probably some race: tests/lib/core/e-sequence.c:457:F:BtSequenceExamples:test_bt_sequence_ticks:0: Assertion 'data.values[1] == 1' failed: data.values[1] == 0, 1 == 1 I just run the test 20 times and here it passes :/

make bt_core.loop LOOPS=20 BT_CHECKS=test_bt_sequence_ticks

This one is not happending for me, something related to your newer gtk/gdk lt-bt_edit: cairo-surface.c:1653: cairo_surface_mark_dirty_rectangle: Assertion `! _cairo_surface_has_mime_data (surface)' failed.

What you could try here, so that I can check with the gtk-folks is to run:

BT_CHECKS=test_bt_edit_application_create G_DEBUG="fatal_warnings" make bt_edit.gdb

and in gdb type 'r' and when it stops 'bt' to get a backtrace.

ensonic avatar Jun 28 '16 12:06 ensonic

GDB complains: "/home/rffontenelle/aur/buzztrax/src/buzztrax-0.10.2/./bt_edit": not in executable format: File format not recognized. See output gdb-output.txt

rffontenelle avatar Jun 28 '16 17:06 rffontenelle

Sorry, pushed the wrong file previously.

ensonic avatar Jul 06 '16 12:07 ensonic

Oh, ok. I thought you were planing what to fix, so I was waiting :) Now I was able to run it and get the backtrace: gdb-output.txt

rffontenelle avatar Jul 07 '16 00:07 rffontenelle

The backtraces would be nicer if you had debug symbols installed fro glib/gio. But the failure is this the missing schema (bt_settings_make). Unfortunately I missed a bit when renaming the env var in the Makefile for new automake version. Could you retry?

ensonic avatar Jul 10 '16 19:07 ensonic

I patched with your latest commit, but it didn't change the result. However, I enabled debug symbols for glib2 and have got more information which I hope to be useful. See gdb-output.txt

rffontenelle avatar Jul 11 '16 11:07 rffontenelle

We'd need debug symbols for glib and gtk+3. Once the debug symbols are actually picked up the backtraces:

#0  0x00007ffff4f7b6eb in g_logv () from /usr/lib/libglib-2.0.so.0
#1  0x00007ffff4f7b85f in g_log () from /usr/lib/libglib-2.0.so.0
#2  0x00007ffff6290fa4 in ?? () from /usr/lib/libgtk-3.so.0

should have file + line info like in

#12 0x000000000048664e in on_theme_notify (settings=<optimized out>, arg=arg@entry=0x0, user_data=user_data@entry=0x0)
    at src/ui/edit/ui-resources.c:91
#13 0x000000000048696f in bt_ui_resources_constructor (type=<optimized out>, n_construct_params=<optimized out>, construct_params=<optimized out>)
    at src/ui/edit/ui-resources.c:424

It seems that my last change helped though, since it does not crash in bt_settings_make() anymore (that was the issue with GSettings not working uninstalled and is fixed by using AM_TEST_ENVIRONMENT). The issue you are now seeing is something related to a newer version of gtk related to theme loading. Having gtk+3 debug symbols and knowing your gtk version would really help.

Thanks for keep trying.

ensonic avatar Jul 11 '16 13:07 ensonic

Great to hear we are having results! Well, now I built with gtk+ having debug symbols enabled as well: gdb-output.txt. How is it?

rffontenelle avatar Jul 11 '16 15:07 rffontenelle

Found it, gtk-3.14 deprecated the two css attributes below.

  /* deprecated in 3.14, should use outline-{width,padding} */
  -GtkWidget-focus-line-width: 0;
  -GtkWidget-focus-padding: 0;

I am using this in bt-edit.css. I'll have to come up with a way to handle version gtk dependent style-sheets :/

ensonic avatar Jul 12 '16 11:07 ensonic

@josephgbr any better now?

ensonic avatar Jul 19 '16 19:07 ensonic

Sorry, I didn't see the commit before. I applied it and still get error, as you can see: gdb-output.txt and test-suite.log.txt

rffontenelle avatar Jul 19 '16 20:07 rffontenelle

This looks like another gtk+3 css deprecation :/ Seems to be https://mail.gnome.org/archives/commits-list/2015-December/msg06135.html, released in 3.19.6 I have to replace 'prelight' with 'hover'. Submitted another patch. Sorry for the troubles.

ensonic avatar Jul 19 '16 20:07 ensonic

Don't worry! However, it still fails. This time, running gdb resulted in the binary hanging (a GNOME dialog prompted to force close or cancel) and I wasn't able to get backtrace: gdb-output.txt and test-suite.log.txt

rffontenelle avatar Jul 19 '16 22:07 rffontenelle

This is progress again, the deprecation issues are fixed. You could not Ctrl-C in dgb? If you can Ctrl-C and get the gdb-prompt again, you could type 'bt' to get a backtrace. I will set up a vm over the weekend to test with never libraries.

ensonic avatar Jul 20 '16 19:07 ensonic

Dumb me. I just had to hit Alt+Tab to focus on Terminal instead of the tested interface. Here is the gdb-output.txt

If you want to set a testing environment, feel free to use my testing srcpackage tarball: buzztrax-0.10.2-1.src.tar.gz. It is a slightly changed version of the one I published in AUR. For every test I edited added a patch and ran makepkg -fsC. I believe all you need is the base, base-devel, gnome and gnome-extra package groups, install VM guest addons, probably groups, start the graphic interface (use systemd to start GDM), decompress the attached srcpackage and build it. Let me know if you want help on this matter.

rffontenelle avatar Jul 21 '16 02:07 rffontenelle

The UI tests take screenshots (to /tmp) of various dialogs. Something changed in cairo/gtk to cause this assertion. Can you retry with the cairo debug symbols as well?

ensonic avatar Jul 21 '16 20:07 ensonic

Sure! There you go: gdb.output.txt

rffontenelle avatar Jul 22 '16 01:07 rffontenelle

Hi there. Did my last gdb output help?

rffontenelle avatar Aug 17 '16 12:08 rffontenelle

Not really. One thing you could try is to run the test as

BT_CHECK_NO_XVFB=1 BT_CHECKS=test_bt_edit_application_create G_DEBUG="fatal_warnings" make bt_edit.gdb

The tests normally run with a hidden x-server. With BT_CHECK_NO_XVFB=1 the tests will pop up real windows, which is annoying. But if that works, it might help to pinpoint the issue further.

Ultimately I need to setup an environment with newer versions of the libraries. The backtrace hints that something is not fully drawn when I am taking a screenshot of the window. But there is no api to check for this conditions :/

ensonic avatar Aug 17 '16 20:08 ensonic

Here is the output log for the above command line: gdb-output.txt

For the record notice no window popped up when running this command line, but it indeed happened during the make -k checks if I have check package installed (which I have). By the way, I always build run the whole PKGBUILD script (see content of buzztrax-0.10.2-1.src.tar.gz attachment above) before running your GDB command lines. Please let me know if I should do it another way.

rffontenelle avatar Aug 18 '16 20:08 rffontenelle