Bug 1090978 - Audacity 2.2.2-1.3 doesn't start
Audacity 2.2.2-1.3 doesn't start
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other
Current
x86-64 Other
: P5 - None : Normal (vote)
: ---
Assigned To: Dave Plater
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-04-25 23:20 UTC by Berndt Tobias
Modified: 2018-05-14 08:09 UTC (History)
7 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
showcase on TW (212.82 KB, image/png)
2018-04-29 08:14 UTC, Jan Engelhardt
Details
Output of strace audacity (103.11 KB, text/plain)
2018-05-08 21:26 UTC, Berndt Tobias
Details
Output of strace audacity on a new user account (109.22 KB, text/plain)
2018-05-09 21:40 UTC, Berndt Tobias
Details
Xauthority File (68 bytes, application/octet-stream)
2018-05-11 20:50 UTC, Berndt Tobias
Details
/etc/sysconfig/displaymanager (2.96 KB, text/plain)
2018-05-11 20:54 UTC, Berndt Tobias
Details
Output of strace audacity using lightdm (102.95 KB, text/plain)
2018-05-13 11:41 UTC, Berndt Tobias
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Berndt Tobias 2018-04-25 23:20:35 UTC
After running zypper dup, which updated the Audacity packages to V2.2.2-1.3, the application refuses to start.

How to reproduce?
- Run zypper dup to update Tumbleweed to Release 20180424-124.1
- Try to start Audacity from your desktop environment or from a console window.
- This will give you a result like:

@highlander:~> audacity
No protocol specified
No protocol specified

(Audacity:11383): Gtk-WARNING **: 00:08:29.768: cannot open display: :0
@highlander:~> 

Is this reproducable?
- Yes, on all of my machines that updated Tumbleweed to 20180424
Comment 1 Dave Plater 2018-04-27 14:47:27 UTC
Audacity 2.2.2 is two months old, did you have it installed prior to your update to snapshot 20180424?
Do you have any of these apps installed, if so do the run properly? :
   0ad
   4pane
   CorsixTH
   DVDStyler
   OpenSceneGraph
   aegisub
   amanda
   boinc-client
   codelite
   diff-pdf
   erlang
   erlang-rebar-testsuite
   espeakedit
   filezilla
   fityk
   flamerobin
   gnuplot
   gnuradio
   hugin
   kicad
   leptonica
   limesuite
   mathgl
   mediainfo
   megaglest
   octave
   openbabel
   paraview
   pepper
   plee-the-bear
   plplot
   poedit
   scummvm-tools
   sffview
   slade
   tintii
   urbanlightscape
   usbprog
   vtk
   wammu
   wxEphe
   wxMaxima
   wxhexeditor
   wxlua
   wxmp3gain
   wxsqlite3
   wxstedit
   wxsvg
   xylib
   youtube-dl-gui
   zerobranestudio
Comment 2 Berndt Tobias 2018-04-27 20:26:51 UTC
Yes, I've been using Audacity for about 8 years and have installed some of the other applications from your list.

I've tested

OpenSceneGraph
FileZilla
Hugin
MediaInfo
wxmp3gain

they all work fine.
Comment 3 Dave Plater 2018-04-29 06:19:09 UTC
I'm speculating that this is caused by the recent wxWidgets update as the timing is right.
Comment 4 Jan Engelhardt 2018-04-29 08:14:45 UTC
Created attachment 768604 [details]
showcase on TW

works for me. See if you can run an other X program (like xterm), because unable to connect to :0 seems like something much more fundamental than wxWidgets.
Comment 5 Dave Plater 2018-04-29 09:24:39 UTC
There's a possibility of a library mismatch some where. Can you try a zypper dup to Tumbleweed snapshot 20180425.
If audacity still fails can you please install and run audacity-2.2.2-141.1 or newer from:
https://download.opensuse.org/repositories/home:/plater/openSUSE_Tumbleweed
and also note if other packages are also pulled in.
Comment 6 Dave Plater 2018-04-29 09:33:20 UTC
(In reply to Jan Engelhardt from comment #4)
> Created attachment 768604 [details]
> showcase on TW
> 
> works for me. See if you can run an other X program (like xterm), because
> unable to connect to :0 seems like something much more fundamental than
> wxWidgets.

The reporter has other wxWidgets programs installed :
OpenSceneGraph
FileZilla
Hugin
MediaInfo
wxmp3gain

and they work, this makes me suspect something in the NOSTL wxWidgets. The update to 3.0.4 would have made audacity rebuild.
The only thing I can see is Tumbleweed audacity is forced to use gcc-7 and g++-7 instead of gcc and g++ this could cause a problem when we change to gcc8 but shouldn't be a problem now.
Comment 7 Berndt Tobias 2018-04-30 06:09:33 UTC
(In reply to Dave Plater from comment #5)
> There's a possibility of a library mismatch some where. Can you try a zypper
> dup to Tumbleweed snapshot 20180425.
> If audacity still fails can you please install and run audacity-2.2.2-141.1
> or newer from:
> https://download.opensuse.org/repositories/home:/plater/openSUSE_Tumbleweed
> and also note if other packages are also pulled in.

I did so. As I installed Audacity from your repo, no other packages were updated/installed, only Audacity and Audacity-lang. The matching libwx* libraries should be installed, too:

@highlander:~> rpm -q audacity
audacity-2.2.2-143.1.x86_64
@highlander:~> ldd /usr/bin/audacity | grep libwx
        libwx_gtk2u_html-suse-nostl.so.3.0.4 => /usr/lib64/libwx_gtk2u_html-suse-nostl.so.3.0.4 (0x00007f6786188000)
        libwx_gtk2u_qa-suse-nostl.so.3.0.4 => /usr/lib64/libwx_gtk2u_qa-suse-nostl.so.3.0.4 (0x00007f6785f5a000)
        libwx_gtk2u_adv-suse-nostl.so.3.0.4 => /usr/lib64/libwx_gtk2u_adv-suse-nostl.so.3.0.4 (0x00007f6785ba1000)
        libwx_gtk2u_core-suse-nostl.so.3.0.4 => /usr/lib64/libwx_gtk2u_core-suse-nostl.so.3.0.4 (0x00007f67853ec000)
        libwx_baseu_net-suse-nostl.so.3.0.4 => /usr/lib64/libwx_baseu_net-suse-nostl.so.3.0.4 (0x00007f67851af000)
        libwx_baseu-suse-nostl.so.3.0.4 => /usr/lib64/libwx_baseu-suse-nostl.so.3.0.4 (0x00007f6784d76000)
        libwx_baseu_xml-suse-nostl.so.3.0.4 => /usr/lib64/libwx_baseu_xml-suse-nostl.so.3.0.4 (0x00007f678023f000)
@highlander:~> audacity
No protocol specified
No protocol specified

(Audacity:4994): Gtk-WARNING **: 08:07:15.202: cannot open display: :0
@highlander:~>

This does not solve the issue.
Comment 8 Dave Plater 2018-04-30 13:43:52 UTC
After a refresh, can you execute:
zypper -v in -f --from http://download.opensuse.org/repositories/home:/plater/openSUSE_Tumbleweed "audacity*" "wxWidgets-3_0-nostl-debug*" "libwx_baseu-*nostl3_0_4*" "libwx_gtk2u_adv-suse-nostl3_0_4*" "libwx_gtk2u_core-suse-nostl3_0_4*" "libwx_gtk2u_html-suse-nostl3_0_4*" "libwx_gtk2u_qa-suse-nostl3_0_4*"

Then execute gdb audacity and hopefully we can find where we go wrong with your installation.
Comment 9 Berndt Tobias 2018-05-06 20:08:19 UTC
Well, here we go. I'm not very experienced in command-line-debugging of applications I haven't coded myself, please excuse any noob questions from now on.

I've installed only the debug symbols from your repo you mentioned above, so GDB mentions a lot of missing debug informations for other libaries. Putting that aside, running Audacity in GDB results in:

(gdb) run
Starting program: /usr/bin/audacity 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
No protocol specified
No protocol specified

(Audacity:8256): Gtk-WARNING **: 22:07:37.156: cannot open display: :0
[Inferior 1 (process 8256) exited with code 01]
(gdb)
Comment 10 Dave Plater 2018-05-08 06:46:37 UTC
Can you run "strace audacity" and post the output.
Comment 11 Berndt Tobias 2018-05-08 21:26:24 UTC
Created attachment 769461 [details]
Output of strace audacity

Output of strace audacity
Comment 12 Dave Plater 2018-05-09 06:23:37 UTC
Can you create a new user and see if audacity runs under that user.
If not post a strace audacity file from that user.
Comment 13 Berndt Tobias 2018-05-09 21:40:13 UTC
Created attachment 769655 [details]
Output of strace audacity on a new user account

Sorry, but the result remains the same even on a new user account:

testuser@highlander:~> audacity
No protocol specified
No protocol specified

(Audacity:11189): Gtk-WARNING **: 23:31:21.876: cannot open display: :0
testuser@highlander:~>

I've attached the output of strace audacity.
Comment 14 Dave Plater 2018-05-10 07:03:32 UTC
Can you try running audacity as root.
I'm assuming you have sddm as your window manager and your ui is kde plasma5, is this correct?
Comment 15 Jan Engelhardt 2018-05-10 08:49:20 UTC
Access to X displays is granted by cookies (cf. XAUTHORITY), not UID.
Comment 16 Dave Plater 2018-05-10 15:12:42 UTC
(In reply to Jan Engelhardt from comment #15)
> Access to X displays is granted by cookies (cf. XAUTHORITY), not UID.

I can see where x is denied in the straces but I'm lost as to why:

getpeername(3, {sa_family=AF_UNIX, sun_path=@"/tmp/.X11-unix/X0"}, [124->20]) = 0
uname({sysname="Linux", nodename="highlander.oberkommando", ...}) = 0
access("/home/testuser/.local/share/sddm/.Xauthority", R_OK) = 0
openat(AT_FDCWD, "/home/testuser/.local/share/sddm/.Xauthority", O_RDONLY) = -1 EACCES (Keine Berechtigung)
fcntl(3, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="l\0\v\0\0\0\0\0\0\0\0\0", iov_len=12}, {iov_base="", iov_len=0}], 2) = 12
recvfrom(3, "\0\26\v\0\0\0\6\0", 8, 0, NULL, NULL) = 8
recvfrom(3, "No protocol specified\n\0\0", 24, 0, NULL, NULL) = 24
write(2, "No protocol specified\n", 22No protocol specified
) = 22
shutdown(3, SHUT_RDWR)                  = 0
close(3)                                = 0

Any suggestions.
Comment 17 Jan Engelhardt 2018-05-10 16:55:27 UTC
An sddm bug maybe? lightdm for example creates and sets XAUTHORITY=/home/u123/.Xauthority, and it makes sure it is belonging to me, 0600. Otherwise I'd be quite in trouble.
Comment 18 Berndt Tobias 2018-05-10 18:22:24 UTC
Running Audacity as root = same error.

Yes, it's sddm and KDE Plasma 5 (5.12.4) / KDE Framework 5.45.0
Comment 19 Dave Plater 2018-05-11 08:04:58 UTC
Three things to do next, post ~/.local/share/sddm/.Xauthority then post /etc/sysconfig/displaymanager then make sure you have lightdm installed, edit /etc/sysconfig/displaymanager and change DISPLAYMANAGER="sddm" to DISPLAYMANAGER="lightdm"
If audacity still fails post another strace.
Comment 20 Berndt Tobias 2018-05-11 20:50:25 UTC
Created attachment 769957 [details]
Xauthority File
Comment 21 Berndt Tobias 2018-05-11 20:54:13 UTC
Created attachment 769958 [details]
/etc/sysconfig/displaymanager
Comment 22 Berndt Tobias 2018-05-11 21:04:25 UTC
(In reply to Dave Plater from comment #19)
> Three things to do next, post ~/.local/share/sddm/.Xauthority then post
> /etc/sysconfig/displaymanager then make sure you have lightdm installed,
> edit /etc/sysconfig/displaymanager and change DISPLAYMANAGER="sddm" to
> DISPLAYMANAGER="lightdm"
> If audacity still fails post another strace.

Have a look at the attachments for the two files.

I have installed lightdm from repo and replaced sddm with it in /etc/sysconfig/displaymanager: 

@highlander:~> rpm -q lightdm
lightdm-1.24.1-1.1.x86_64
@highlander:~> cat /etc/sysconfig/displaymanager | grep DISPLAYMANAGER=
DISPLAYMANAGER="lightdm"
@highlander:~>

Anyway, lightdm seems not to be in use after a reboot if I look at systemctl:

@highlander:~> su
Passwort: 
highlander:/ # systemctl status display-manager
● display-manager.service - X Display Manager
   Loaded: loaded (/usr/lib/systemd/system/display-manager.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-05-11 22:40:07 CEST; 21min ago
 Main PID: 2184 (sddm)
    Tasks: 4 (limit: 4716)
   CGroup: /system.slice/display-manager.service
           ├─2184 /usr/bin/sddm
           └─2416 /usr/bin/X -nolisten tcp -auth /run/sddm/{2a37f935-b498-4977-ab50-766dc066e0f3} -background none

I don't get why this happens. Anything I've missed?
Comment 23 Dave Plater 2018-05-12 11:04:22 UTC
I'm not much of an expert on display managers or xorg, this started happening at the same time as sddm changes from bug#1089287 Why this only affects audacity is a mystery. Can either Stefan or Fabian help.
The reporter can't even get lightdm to work to confirm whether sddm is at fault or not.
Comment 24 Fabian Vogt 2018-05-12 11:10:34 UTC
The strace is interesting:

> access("/home/tobias/.local/share/sddm/.Xauthority", R_OK) = 0
> openat(AT_FDCWD, "/home/tobias/.local/share/sddm/.Xauthority", O_RDONLY) = -1 EACCES (Keine Berechtigung)

This implies that audacity is running with the real UID != effective UID.
Why?

What does stat /home/tobias/.local/share/sddm/.Xauthority say?
Comment 25 Stefan Dirsch 2018-05-12 11:37:29 UTC
Since sle15/Leap15/TW you need to use 

  update-alternatives

to configure DM instead of /etc/sysconfig/displaymanager ...
Comment 26 Berndt Tobias 2018-05-13 11:41:44 UTC
Created attachment 769992 [details]
Output of strace audacity using lightdm

I've changed to lightdm but Audacity still fails with the same error.

stat of .Xauthority files:

@highlander:~> stat /home/tobias/.Xauthority
  Datei: /home/tobias/.Xauthority
  Größe: 68             Blöcke: 8          EA Block: 4096   reguläre Datei
Gerät: 841h/2113d       Inode: 4456971     Verknüpfungen: 1
Zugriff: (0600/-rw-------)  Uid: ( 1000/  tobias)   Gid: (  100/   users)
Zugriff    : 2018-05-13 11:27:32.054482003 +0200
Modifiziert: 2018-05-13 11:27:28.982544366 +0200
Geändert   : 2018-05-13 11:27:28.982544366 +0200
 Geburt    : -
@highlander:~> stat /home/tobias/.local/share/sddm/.Xauthority
  Datei: /home/tobias/.local/share/sddm/.Xauthority
  Größe: 68             Blöcke: 8          EA Block: 4096   reguläre Datei
Gerät: 841h/2113d       Inode: 4588503     Verknüpfungen: 1
Zugriff: (0600/-rw-------)  Uid: ( 1000/  tobias)   Gid: (  100/   users)
Zugriff    : 2018-05-13 13:10:51.467686713 +0200
Modifiziert: 2018-05-13 13:10:49.987714818 +0200
Geändert   : 2018-05-13 13:10:49.987714818 +0200
 Geburt    : -

Output of strace when using lightdm is in attachment. Seems to be pretty much the same as with sddm.
Comment 27 Fabian Vogt 2018-05-13 12:17:12 UTC
Does "xauth" work?

Do you use AppArmor or SELinux?
Comment 28 Berndt Tobias 2018-05-13 15:22:53 UTC
Apparmor was the clue.

For some reason, there was an Apparmor profile for /usr/bin/audacity (Why did this show up?) and it was set to enforce-mode, so access to .Xauthority was blocked.

Thanks a lot, I'd never had thought of that!
Comment 29 Dave Plater 2018-05-14 08:03:08 UTC
Thanks for help with this bug.
Comment 30 Fabian Vogt 2018-05-14 08:09:42 UTC
(In reply to Dave Plater from comment #29)
> Thanks for help with this bug.

The question is where the AppArmor profile came from - audacity itself?