View Issue Details

IDCategoryLast Update
0008754bugs2021-08-19 13:32
ReporterkuonAssigned Tox42 
Reproducibilitysometimes 
Status closedResolutionno change required 
PlatformArchOSLinuxOS Version(any)
Product Version6.7 
Fixed in Version 
Summary0008754: Ardour sometimes crash when using pipewire
DescriptionI am using ardour with pipewire jack emulation layer and ardour crashes after a few hours of utilisation.

I am unable to reproduce the issue, but it does happen eventually after a few hours of use.

Ardour is mixing in the background and I am not touching Ardour's UI when it happens.

I ran Ardour with gdb attached, and I was able to pinpoint it to the following callback:

https://github.com/Ardour/ardour/blob/95215ff405bf4c2bd5a8600c79a96c87b905683a/libs/backends/jack/jack_portengine.cc#L303

jack_port_name is called with NULL and there is an assertion in pipewire that check for NULL.

Pipewire side of the discussion: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1265#note_964914
TagsNo tags attached.

Activities

x42

2021-06-20 13:47

administrator   ~0025974

Can you try if this happens if you don't use pipewire? -- If so it is a bug in pipewire.

kuon

2021-06-21 23:35

reporter   ~0025984

It is a very hard to reproduce bug, it happens like once every day, and as I actually uses ardour, it is hard for me to have it run in a "debug setup" for that long.

I was running with Jack before, and never had that bug, so it it is entirely possible it is caused by pipewire, but I am not sure because I did upgrade ardour when switching from jack to pipewire.

x42

2021-06-21 23:53

administrator   ~0025985

This is definitely a pipewire bug. jack_port_name() must not be NULL during the callback.

A guess: it happens when the port goes away. First there's a disconnect callback and then the port is removed. but by the time pipewire calls Ardour it likely already has internally removed the port.

Nothing we can do no our side.

paul

2021-06-21 23:58

administrator   ~0025987

the code in the callback in question:

    GET_PRIVATE_JACK_POINTER (_priv_jack);

    jack_port_t* a = jack_port_by_id (_priv_jack, id_a);
    jack_port_t* b = jack_port_by_id (_priv_jack, id_b);

    manager.connect_callback (jack_port_name (a), jack_port_name (b), conn == 0 ? false : true);

so the only way that jack_port_name() can get a null pointer is if jack_port_by_id() returns null when given a port ID by a connect callback. That's not possible, so this appears to be a pipewire issue.

anonymous

2021-08-19 13:32

viewer   ~0026117

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2021-06-20 13:32 kuon New Issue
2021-06-20 13:47 x42 Note Added: 0025974
2021-06-21 23:35 kuon Note Added: 0025984
2021-06-21 23:53 x42 Note Added: 0025985
2021-06-21 23:54 x42 Assigned To => x42
2021-06-21 23:54 x42 Status new => resolved
2021-06-21 23:54 x42 Resolution open => no change required
2021-06-21 23:58 paul Note Added: 0025987
2021-08-19 13:32 anonymous Note Added: 0026117
2021-08-19 13:32 anonymous Status resolved => closed