FS#25060 - [ardour] redland-1:1.0.13-4 causes segfault

Attached to Project: Arch Linux
Opened by Gary Hollis (ghollisjr) - Thursday, 07 July 2011, 22:00 GMT
Last edited by Ray Rashif (schivmeister) - Thursday, 14 July 2011, 23:59 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Kieslich (tobias)
Andrea Scarpino (BaSh)
Ray Rashif (schivmeister)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Ardour segfaults on startup when using this redland library (see temporary fix below).

Additional info:
* package version(s):
redland-1:1.0.13-4
ardour-2.8.11-3

Example of program session:

$ ardour2
Ardour 2.8.11
(built using 7387 and GCC version 4.5.2 20110127 (prerelease))
Copyright (C) 1999-2008 Paul Davis
Some portions Copyright (C) Steve Harris, Ari Johnson, Brett Viren, Joel Baker

Ardour comes with ABSOLUTELY NO WARRANTY
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This is free software, and you are welcome to redistribute it
under certain conditions; see the source for copying conditions.
loading default ui configuration file /etc/ardour2/ardour2_ui_default.conf
loading user ui configuration file /home/ghollisjr/.ardour2/ardour2_ui.conf
Loading ui configuration file /etc/ardour2/ardour2_ui_dark.rc
theme_init() called from internal clearlooks engine
ardour: [INFO]: Ardour will be limited to 1024 open files
loading system configuration file /etc/ardour2/ardour_system.rc
loading user configuration file /home/ghollisjr/.ardour2/ardour.rc
ardour: [INFO]: No H/W specific optimizations in use
raptor_sequence.c:385: (raptor_sequence_get_at) assertion failed: object pointer of type raptor_sequence is NULL.
raptor_sequence.c:385: (raptor_sequence_get_at) assertion failed: object pointer of type raptor_sequence is NULL.
Segmentation fault


Steps to reproduce:
Run ardour2 as above; this is the only program I use regularly which uses the redland libraries.

Temporary Fix:
I've found that downgrading to redland-1:1.0.12-1, rasqal-1:0.9.21-1, and db-5.1.25-1 stops the segfault from occurring.
This task depends upon

Closed by  Ray Rashif (schivmeister)
Thursday, 14 July 2011, 23:59 GMT
Reason for closing:  Fixed
Additional comments about closing:  Please test -5 in [testing]
Comment by Andreas Radke (AndyRTR) - Friday, 08 July 2011, 06:02 GMT
ardour is heavily broken. we need to add a gcc46 fix that is available in the fedora git: http://pkgs.fedoraproject.org/gitweb/?p=ardour.git;a=blob_plain;f=ardour-gcc46.patch;hb=master

the needs more fixes for the rdf changes. maybe  FS#25005  can help here, not sure if slv2 also needs additional fixes.

Andrea, can you please have a look?
Comment by Ray Rashif (schivmeister) - Friday, 08 July 2011, 07:00 GMT
Sorry, I should've done some testing while the redland updates were still in testing. I worked with this last night but the patch by itself was not sufficient, as noted by Andreas. The GCC issue is actually old and the patch was accepted a couple of months ago or so - I just didn't catch it since there was no report of build failures. Now, there are more problems.

I know to an extent for output like this it is usually just the redland/raptor/rasqal stuff that needs to be fixed - slv2 should not need ammendments. But that's for later to figure out.

I am also taking a look at replacing slv2 and the redland functionality for it with a different suite of implementations [1].

[1] http://drobilla.net/2011/05/25/new-lv2-host-implementation-stack/
Comment by Ray Rashif (schivmeister) - Friday, 08 July 2011, 11:24 GMT
Building with system libraries (sigc++ mainly; SYSLIBS=1) proves that there are some sigc++ issues internally (ardour) with our (gcc) toolchain. The other problems (rubberband) are solved by GCC 4.6 compatibility. So this part of the chapter can be closed in the meantime.

ardour->liblrdf->raptor1 is not an issue, as long as raptor1 exists. This is because ardour is hardcoded for raptor1. Even if this resolves and ardour is patched for raptor2, we would still have the ardour->slv2->redland->rasqal->raptor problem, explained below.

What cannot be solved now, unfortunately, is the rasqal issue [1]. Ardour needs an older rasqal (before the API/ABI change), and an older rasqal requires an older raptor, and is supported by an older redland, which probably also requires an older db.

Three things we can do with immediate effect:

1. Provide or bring back compatibility packages for rasqal (rasqal-compat?) and (in turn) redland, db

2. Remove SLV2 support for an indefinite period (since we don't know when this would be fixed)

3. Drop ardour

Opinions, please.


[1] https://ardour.org/node/4301
Comment by Andreas Radke (AndyRTR) - Friday, 08 July 2011, 12:47 GMT
1, not an option. The rasqal libs are named identically. We haven't found an easy way to install them along each other.

2. I don't know ardour software at all. If it doesn't make it unusable this sounds to be the best option.

3. only if 2nd option is not helpful.
Comment by Ray Rashif (schivmeister) - Friday, 08 July 2011, 13:17 GMT
No SLV2 means no support for LV2 plug-ins, that's all. I will post a news announcement for this, in case there are people affected.
Comment by Anton (angri) - Saturday, 09 July 2011, 08:57 GMT
Can be fixed the following way:

1. In package liblrdf: apply patch from https://bugs.archlinux.org/task/25005 and rebuild with raptor2
2. In package ardour2: add "export LD_PRELOAD=/usr/lib/liblrdf.so.2.0.0" to the beginning of runner script /usr/bin/ardour2

For me it works this way.
Comment by Andreas Radke (AndyRTR) - Saturday, 09 July 2011, 09:49 GMT
liblrdf built with new raptor is in testing now.
Comment by Ray Rashif (schivmeister) - Saturday, 09 July 2011, 14:12 GMT
Should we just go ahead and patch the ardour buildsystem for raptor2? It should be trivial. Let me see if that helps in any way.
Comment by Ray Rashif (schivmeister) - Saturday, 09 July 2011, 18:44 GMT
OK, got ardour to accept raptor2 *, but there are now problems with liblrdf which I don't understand and will describe below.

The proper libraries are linked but the redland stuff cannot find raptor.h - shouldn't that be fixed by now?

It looks like every single reference to raptor.h needs to be replaced by raptor2/(raptor|raptor2).h (don't know which would be correct). I tried raptor2/raptor2.h for the few files that are affected, and it appeared to build (and run as well!), but I don't know if I'm taking the right approach. If I am, then we'll need to go patch more packages and let upstream redland know.

Here are the reproduction steps:

1. install raptor(2)-patched liblrdf
2. uninstall raptor1 *
3. apply gcc46.patch
4. apply attached patch
5. run scons SYSLIBS=1

Could someone please have a look?

* We have to completely drop (any kind of support for) raptor1, because if it exists alongside raptor2 (and yes it can), redland _will_ bail. This means getting rawstudio patched (here or upstream) for raptor2. You can verify this by running scons with and without raptor1 installed.
Comment by Ray Rashif (schivmeister) - Saturday, 09 July 2011, 23:42 GMT
Forget the complication, tl;dr. Solving  FS#25090  and  FS#25005  would hopefully allow us to solve this and bring back ardour to its previous state and functionality, aside from using SYSLIBS and patching for raptor2.
Comment by Ray Rashif (schivmeister) - Wednesday, 13 July 2011, 10:12 GMT
Latest progress:

NOT a problem with redland/rasqal/raptor headers. Solving for the missing -I/usr/include/raptor2 would fix this. That needs to be in either slv2's pkg-config file or ardour's buildsystem. I'll see where it's more appropriate.

edit: It is indeed slv2. Stupid me, a simple rebuild was all that was needed.
Comment by Ray Rashif (schivmeister) - Thursday, 14 July 2011, 23:58 GMT
Somewhere along the way the redland rebuilds of slv2 did not have any effect on the pkg-config cflags (or a later update to one of the rdf packages fixed that; or required yet another rebuild which we missed). A rebuild now + raptor2 compatibility for scons resolves this issue once and for all.

Loading...