Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when indexing music #34

Closed
Seqularise opened this issue Sep 21, 2020 · 19 comments · Fixed by #43
Closed

Crash when indexing music #34

Seqularise opened this issue Sep 21, 2020 · 19 comments · Fixed by #43

Comments

@Seqularise
Copy link

Seqularise commented Sep 21, 2020

flatpak run org.gnome.Rhythmbox3 -d shows me this

  • (process:90921): WARNING **: 20:20:18.119: Invalid message header format
    (20:20:18) [0x55efd812ead0] [name_lost_cb] rb-mpris-plugin.c:1404: lost dbus name org.mpris.MediaPlayer2.rhythmbox
    (20:20:18) [0x55efd812ead0] [name_lost_cb] rb-dbus-media-server-plugin.c:2350: lost dbus name org.gnome.UPnP.MediaServer2.Rhythmbox
    (20:20:18) [0x559e65883000] [rb_metadata_load] rb-metadata-gst.c:197: found audio stream, media type audio/mpeg
    (20:20:18) [0x559e65883000] [rb_metadata_load] rb-metadata-gst.c:207: found tag type, ignoring
    (20:20:18) [0x559e65883000] [rb_gst_get_missing_plugin_type] rb-gst-media-types.c:67: no missing plugin details
    (20:20:18) [0x559e65883000] [rb_metadata_dbus_load] rb-metadata-dbus-service.c:77: metadata load finished (type audio/mpeg)
    (20:20:18) [0x559e65883000] [rb_gst_get_missing_plugin_type] rb-gst-media-types.c:67: no missing plugin details
    (20:20:18) [0x559e65883000] [rb_metadata_get] rb-metadata-gst.c:953: ignoring Pop
    (20:20:18) [0x559e65883000] [rb_metadata_get] rb-metadata-gst.c:953: ignoring Soundtrack
    (20:20:18) [0x559e65883000] [rb_metadata_get] rb-metadata-gst.c:953: ignoring Anime
    (20:20:18) [0x559e65883000] [connection_closed_cb] rb-metadata-dbus-service.c:218: client connection closed

flatpak-coredumpctl org.gnome.Rhythmbox3 shows me this

  • Executable /usr/lib/kdeconnectd doesn't seem to be a flatpaked application.
    Running: "flatpak" "run" "--filesystem=home" "--filesystem=/tmp" "--command=gdb" "--devel" "org.gnome.Rhythmbox3" "/usr/lib/kdeconnectd" "/tmp/tmpr8hmafgp"
    ошибка: runtime/org.gnome.Sdk/x86_64/3.34 не установлен
    Traceback (most recent call last):
    File "/usr/bin/flatpak-coredumpctl", line 83, in
    coredumper.run()
    File "/usr/bin/flatpak-coredumpctl", line 58, in run
    subprocess.check_call(flatpak_command)
    File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['flatpak', 'run', '--filesystem=home', '--filesystem=/tmp', '--command=gdb', '--devel', 'org.gnome.Rhythmbox3', '/usr/lib/kdeconnectd', '/tmp/tmpr8hmafgp']' returned non-zero exit status 1.
@hadess
Copy link
Collaborator

hadess commented Sep 21, 2020

You need to use flatpak-coredumpctl as root to get a backtrace. I'm afraid that I can't help you get that backtrace either.

@Seqularise
Copy link
Author

So, i need to install gnome sdk and rhythmbox as root?
Okay, will be right back

@Seqularise
Copy link
Author

** (process:94231): WARNING **: 20:38:25.995: Invalid message header format
(20:38:25) [0x55fb0068dcd0] [rhythmdb_property_model_insert] rhythmdb-property-model.c:813: adding "心が叫びたがってるんだ。 オリジナルサウンドトラック": refcount 3
(20:38:25) [0x55fb0068dcd0] [rhythmdb_property_model_insert] rhythmdb-property-model.c:813: adding "Japanese": refcount 41
(20:38:25) [0x55fb0068dcd0] [rhythmdb_property_model_insert] rhythmdb-property-model.c:813: adding "Japanese": refcount 41
(20:38:25) [0x55fb0068dcd0] [rhythmdb_property_model_insert] rhythmdb-property-model.c:825: adding new property "Natsumi Kiyoura"
(20:38:25) [0x55fb0068dcd0] [update_sort_string] rhythmdb-property-model.c:750: replacing current sort string NULL with Kiyoura, Natsumi (0 -> 0)
(20:38:25) [0x55fb0068dcd0] [rhythmdb_property_model_insert] rhythmdb-property-model.c:813: adding "心が叫びたがってるんだ。 オリジナルサウンドトラック": refcount 3
(20:38:25) [0x55fb0068dcd0] [rb_entry_view_row_inserted_cb] rb-entry-view.c:2177: row added
(20:38:25) [0x55fb0068dcd0] [rb_shell_clipboard_entries_changed_cb] rb-shell-clipboard.c:686: entryview changed
(20:38:25) [0x55fb0068dcd0] [rhythmdb_property_model_insert] rhythmdb-property-model.c:813: adding "Japanese": refcount 41
(20:38:25) [0x55fb0068dcd0] [rhythmdb_property_model_insert] rhythmdb-property-model.c:825: adding new property "Natsumi Kiyoura"
(20:38:25) [0x55fb0068dcd0] [update_sort_string] rhythmdb-property-model.c:750: replacing current sort string NULL with Kiyoura, Natsumi (0 -> 0)
(20:38:25) [0x55fb0068dcd0] [rhythmdb_property_model_insert] rhythmdb-property-model.c:813: adding "心が叫びたがってるんだ。 オリジナルサウンドトラック": refcount 3
(20:38:25) [0x55fb0068dcd0] [rb_entry_view_row_inserted_cb] rb-entry-view.c:2177: row added
(20:38:25) [0x55fb0068dcd0] [name_lost_cb] rb-mpris-plugin.c:1404: lost dbus name org.mpris.MediaPlayer2.rhythmbox
(20:38:25) [0x55fb0068dcd0] [name_lost_cb] rb-dbus-media-server-plugin.c:2350: lost dbus name org.gnome.UPnP.MediaServer2.Rhythmbox
(20:38:26) [0x5637d83a6810] [rb_metadata_load] rb-metadata-gst.c:197: found audio stream, media type audio/mpeg
(20:38:26) [0x5637d83a6810] [rb_metadata_load] rb-metadata-gst.c:207: found tag type, ignoring
(20:38:26) [0x5637d83a6810] [rb_gst_get_missing_plugin_type] rb-gst-media-types.c:67: no missing plugin details
(20:38:26) [0x5637d83a6810] [rb_metadata_dbus_load] rb-metadata-dbus-service.c:77: metadata load finished (type audio/mpeg)
(20:38:26) [0x5637d83a6810] [rb_gst_get_missing_plugin_type] rb-gst-media-types.c:67: no missing plugin details
(20:38:26) [0x5637d83a6810] [rb_metadata_get] rb-metadata-gst.c:953: ignoring Pop
(20:38:26) [0x5637d83a6810] [rb_metadata_get] rb-metadata-gst.c:953: ignoring Soundtrack
(20:38:26) [0x5637d83a6810] [rb_metadata_get] rb-metadata-gst.c:953: ignoring Anime
(20:38:26) [0x5637d83a6810] [connection_closed_cb] rb-metadata-dbus-service.c:218: client connection closed

✗ flatpak-coredumpctl org.gnome.Rhythmbox3
Executable /usr/lib/kdeconnectd doesn't seem to be a flatpaked application.
Running: "flatpak" "run" "--filesystem=home" "--filesystem=/tmp" "--command=gdb" "--devel" "org.gnome.Rhythmbox3" "/usr/lib/kdeconnectd" "/tmp/tmp492bumr2"
GNU gdb (GDB) 8.3.1
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
/usr/lib/kdeconnectd: Нет такого файла или каталога.
[New LWP 1431]
[New LWP 1624]
[New LWP 1627]
[New LWP 1625]
[New LWP 1660]
[New LWP 1662]
Core was generated by `/usr/lib/kdeconnectd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f77ac5fa62e in ?? ()
[Current thread is 1 (LWP 1431)]
(gdb)

@Seqularise
Copy link
Author

@hadess
Copy link
Collaborator

hadess commented Sep 22, 2020

Core was generated by `/usr/lib/kdeconnectd'.

There's nothing related to kdeconnect in Rhythmbox. I'm really not sure what you're doing there...

The file can be indexed and plays fine:
Screenshot from 2020-09-22 17-59-17

@hadess
Copy link
Collaborator

hadess commented Sep 22, 2020

What's the output of:

flatpak run --command=locale org.gnome.Rhythmbox3

on your system?

@Seqularise
Copy link
Author

What's the output of:

flatpak run --command=locale org.gnome.Rhythmbox3

on your system?

LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=

@Seqularise
Copy link
Author

I removed kdeconnect from the system but it is still in a output from coredumpctl

@crvigh
Copy link

crvigh commented Apr 1, 2021

  1. Created a new user ( russian ) with russian language and login.
  2. Import the above dropbox file ( copy checkbox selected )
  3. Import again the same file ( copy checkbox not selected )
  4. Crashes with "Invalid message header format"

rhythmbox.log

gdb bt full.txt

gdb.txt

@hadess
Copy link
Collaborator

hadess commented Apr 2, 2021

Created a new user ( russian ) with russian language and login.

What locale is that? You'll also want to please verify your gdb output, the lines appear jumbled up. It would be useful if you could test the fix in https://gitlab.gnome.org/GNOME/rhythmbox/-/merge_requests/48

@crvigh
Copy link

crvigh commented Apr 2, 2021

What locale is that?

ru_RU.UTF-8

You'll also want to please verify your gdb output, the lines appear jumbled up.

what do you recommend here ...

It would be useful if you could test the fix in https://gitlab.gnome.org/GNOME/rhythmbox/-/merge_requests/48

I didn't build and publish to test the fix. Rather I called setlocale (6, "") directly from main () of rhythmbox-metadata and the issue still happens.

Note 1: In the below gdb session the first main() breakpoint from rhythmbox is ignored.
Note 2: LC_ALL = 6

$ gdb  /app/bin/rhythmbox 

(gdb)

(gdb) set follow-fork-mode child

(gdb) run
Starting program: /app/bin/rhythmbox 

(gdb) break main
Breakpoint 2, main (argc=1, argv=0x7fffffffde98) at main.c:52
52	{
(gdb) c

Thread 3.1 "rhythmbox-metad" hit Breakpoint 2, main (argc=2, argv=0x7fffffffde38) at rb-metadata-dbus-service.c:353
353	{
(gdb) call setlocale(6, 0)
$3 = 0x7ffff7a2fb76 <_nl_C_name> "C"

(gdb) call setlocale(6, "")
$4 = 0x5555555a5940 "ru_RU.UTF-8"

(gdb) c

<perform the steps mentioned in above comment>

** (process:7875): WARNING **: 15:40:31.084: Invalid message header format

Thread 3.1 "rhythmbox-metad" received signal SIGTERM, Terminated.
raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
50	  return ret;

(gdb) bt
#0  raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
#4  0x00007ffff7c34da3 in <emit signal ??? on instance 0x7fffe800b060 [GDBusConnection]> (instance=<optimized out>, signal_id=<optimized out>, detail=detail@entry=0) at ../gobject/gsignal.c:3551
    #1  0x00007ffff7c1b8fa in g_closure_invoke
    (closure=closure@entry=0x7fffe8009940, return_value=return_value@entry=0x0, n_param_values=3, param_values=param_values@entry=0x7fffffffd8b0, invocation_hint=invocation_hint@entry=0x7fffffffd830)
    at ../gobject/gclosure.c:810
    #2  0x00007ffff7c2df0e in signal_emit_unlocked_R
    (node=node@entry=0x7fffe8006800, detail=detail@entry=0, instance=instance@entry=0x7fffe800b060, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd8b0)
    at ../gobject/gsignal.c:3777
    #3  0x00007ffff7c34c41 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffda60) at ../gobject/gsignal.c:3495
#5  0x00007ffff7ec1c76 in emit_closed_in_idle (user_data=0x7fffec005440) at ../gio/gdbusconnection.c:1379
#6  0x00007ffff7b2743f in g_main_dispatch (context=0x55555573b4e0) at ../glib/gmain.c:3325
#7  g_main_context_dispatch (context=0x55555573b4e0) at ../glib/gmain.c:4043
#8  0x00007ffff7b277e8 in g_main_context_iterate (context=0x55555573b4e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4119
#9  0x00007ffff7b27b03 in g_main_loop_run (loop=0x555555730670) at ../glib/gmain.c:4317
#10 0x000055555555f8bb in main (argc=<optimized out>, argv=<optimized out>) at rb-metadata-dbus-service.c:442

Also, adding breakpoint on setlocale() function with condition locale != 0, revealed that setlocale (LC_ALL, "") is done by some gtk option code, and python code via rhythmbox python plugins already. So, just before pressing the import button for the first import, call setlocale(6, 0) returned "ru_RU.UTF-8".

That would explain why this has not happened more frequently, and hence my question at https://gitlab.gnome.org/GNOME/rhythmbox/-/merge_requests/48#note_1072251.

@hadess
Copy link
Collaborator

hadess commented Apr 2, 2021

Also, adding breakpoint on setlocale() function with condition locale != 0, revealed that setlocale (LC_ALL, "") is done by some gtk option code, and python code via rhythmbox python plugins already.

The Python plugins and GTK aren't used in the metadata D-Bus service...

@crvigh
Copy link

crvigh commented Apr 2, 2021

The Python plugins and GTK aren't used in the metadata D-Bus service...

That's right. When the crash ( without fix ) happens, the rhythmbox-metadata process was having the 'C' locale.

But, the exact same crash happens with the fix too.

@hadess
Copy link
Collaborator

hadess commented Apr 2, 2021

That's fine, the fix is still useful...

@hadess
Copy link
Collaborator

hadess commented Apr 2, 2021

I've managed to reproduce the problem locally, without having to create a whole session in Russian.

After opening a bash script inside the Rhythmbox container:

$ flatpak run -d --command=bash org.gnome.Rhythmbox3

I launch the rhythmbox-metadata helper:

$ LC_ALL=ru_RU.UTF-8 valgrind /app/libexec/rhythmbox-metadata --debug &
<snip>
(16:35:37) [0x5ecbdb0] [main] rb-metadata-dbus-service.c:433: D-BUS server listening on address unix:abstract=/tmp/dbus-c8CJTVMg
unix:abstract=/tmp/dbus-c8CJTVMg

And copy the bus address, which I pass to rhythmbox as an envvar. Rhythmbox will crash when I try to import the file from dropbox above:

$ RB_DBUS_METADATA_ADDRESS=unix:abstract=/tmp/dbus-c8CJTVMg rhythmbox
<snip>
** (process:1014359): WARNING **: 16:36:15.563: Invalid message header format
Terminated

I need to poke at this some more, to make reproducing the bug easier.

hadess added a commit that referenced this issue Apr 2, 2021
hadess added a commit that referenced this issue Apr 2, 2021
It will cause D-Bus disconnections when importing certain files in
certain locales.

Closes: #34
@hadess
Copy link
Collaborator

hadess commented Apr 2, 2021

Disabling the MediaServer2 plugin makes it go away, so I filed:
https://gitlab.gnome.org/GNOME/rhythmbox/-/issues/1882
and I removed the plugin that nothing seems to consume:
#43

hadess added a commit that referenced this issue Jun 15, 2021
It will cause D-Bus disconnections when importing certain files in
certain locales.

Closes: #34
hadess added a commit that referenced this issue Jun 15, 2021
It will cause D-Bus disconnections when importing certain files in
certain locales.

Closes: #34
@hadess
Copy link
Collaborator

hadess commented Jul 20, 2023

The root cause of the bug should be fixed in: flatpak/xdg-dbus-proxy#50

@phako
Copy link

phako commented Jul 20, 2023

FWIW, Rygel can consume that and expose your Rhythmbox collection as an UPnP server

@hadess
Copy link
Collaborator

hadess commented Jul 20, 2023

FWIW, Rygel can consume that and expose your Rhythmbox collection as an UPnP server

I doubt that we're setup for Rygel outside the sandbox talking to Rhythmbox inside the sandbox, and having the same view of files...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants