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

flatpak segfaults on remote-add on aarch64 musl #24783

Closed
duncancmt opened this issue Sep 9, 2020 · 13 comments
Closed

flatpak segfaults on remote-add on aarch64 musl #24783

duncancmt opened this issue Sep 9, 2020 · 13 comments
Labels
bug Something isn't working

Comments

@duncancmt
Copy link

duncancmt commented Sep 9, 2020

System

  • xuname:
    Void 5.7.0_1 aarch64-musl Unknown uptodate rFFF
  • package:
    flatpak-1.6.3_1

Expected behavior

$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
<something>

Actual behavior

$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Segmentation fault
$ echo $?
139

Steps to reproduce the behavior

see above

I have tried building from source with debugging symbols and running it under gdb, but gdb itself aborts (and running flatpak under gdb under gdb similarly crashes).

@duncancmt duncancmt changed the title flatpak segfaults on remote-add flatpak segfaults on remote-add on aarch64 musl Sep 9, 2020
@ericonr
Copy link
Member

ericonr commented Sep 9, 2020

You can also download the flatpak-dbg package from the void-repo-debug repository.

Did this drop a core dump or anything of the sort?

@duncancmt
Copy link
Author

Where would be the appropriate place to submit a coredump?

@ericonr
Copy link
Member

ericonr commented Sep 9, 2020

xbps-install $(xdbg flatpak) -> installs all debug packages related to flatpak, then you can generate a backtrace from the core dump. Otherwise you'd need to upload the coredump and hope someone is invested enough to assemble the backtrace for you.

@duncancmt
Copy link
Author

Thanks for the help. I have a coredump and all the *-dbg packages installed. However gdb itself aborts when running flatpak or when analyzing the coredump:

$ gdb `which flatpak` core.12507
GNU gdb (GDB) 9.2
Copyright (C) 2020 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 "aarch64-linux-musl".
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"...
Reading symbols from /bin/flatpak...
Reading symbols from /usr/lib/debug//usr/bin/flatpak...
[New LWP 12512]
[New LWP 12507]
[New LWP 12511]
[New LWP 12509]

warning: Can't read pathname for load map: No error information.
Core was generated by `/usr/bin/flatpak remote-add --if-not-exists flathub https://flathub.org/repo/fl'.
Program terminated with signal SIGSEGV, Segmentation fault.
Aborted
$ echo $?
134

@ericonr
Copy link
Member

ericonr commented Sep 9, 2020

Very long shot, can you try gdb -c core.12507 ?

@duncancmt
Copy link
Author

That does give me something! Probably not very useful, though:

$ gdb -c core.12507
GNU gdb (GDB) 9.2
Copyright (C) 2020 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 "aarch64-linux-musl".
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".
[New LWP 12512]
[New LWP 12507]
[New LWP 12511]
[New LWP 12509]
Core was generated by `/usr/bin/flatpak remote-add --if-not-exists flathub https://flathub.org/repo/fl'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000ffffae3497dc in ?? ()
[Current thread is 1 (LWP 12512)]
(gdb) bt
#0  0x0000ffffae3497dc in ?? ()
#1  0x0000ffffac9c171c in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

@duncancmt
Copy link
Author

duncancmt commented Sep 9, 2020

Maybe the bigger issue is that gdb doesn't work:

$ gdb
GNU gdb (GDB) 9.2
Copyright (C) 2020 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 "aarch64-linux-musl".
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".
(gdb) help symbol
Load symbol table from executable file FILE.
Usage: symbol-file [-readnow | -readnever] [-o OFF] FILE
OFF is an optional offset which is added to each section address.
The `file' command can also load symbol tables, as well as setting the file
to execute.
The '-readnow' option will cause GDB to read the entire symbol file
immediately.  This makes the command slower, but may make future operations
faster.
The '-readnever' option will prevent GDB from reading the symbol file's
symbolic debug information.
(gdb) help symbols
Aborted
$ echo $?
134
$ gdb gdb
GNU gdb (GDB) 9.2
Copyright (C) 2020 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 "aarch64-linux-musl".
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"...
Reading symbols from gdb...
(No debugging symbols found in gdb)
(gdb) run
Starting program: /usr/bin/gdb
[Detaching after fork from child process 5230]
GNU gdb (GDB) 9.2
Copyright (C) 2020 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 "aarch64-linux-musl".
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".
(gdb) help symbols

Program received signal SIGSEGV, Segmentation fault.
Aborted
$ echo $?
134

@ericonr
Copy link
Member

ericonr commented Sep 9, 2020

Ohh boy, that could have been caused by some cross compile issue. Last I remember, I could use gdb fine on armv6l-musl, at least.

@ericonr
Copy link
Member

ericonr commented Sep 9, 2020

Can you check if all your files are fine? xbps-pkgdb -a

@duncancmt
Copy link
Author

$ sudo xbps-pkgdb -a
ERROR: device-mapper: hash mismatch for /etc/sv/dmeventd/run.
ERROR: device-mapper: files check FAILED.
ERROR: mdocml: hash mismatch for /etc/cron.daily/makewhatis.
ERROR: mdocml: files check FAILED.
ERROR: pinebookpro-base: hash mismatch for /var/lib/alsa/asound.state.
ERROR: pinebookpro-base: files check FAILED.
ERROR: linux-firmware: /usr/lib/firmware/rockchip/dptx.bin mtime mismatch (current: 1598729144, stored 1590307167)
ERROR: linux-firmware: files check FAILED.

Those are all files I manually edited as part of installing my system.

@ericonr
Copy link
Member

ericonr commented Sep 9, 2020

As a tip, you might want to configure xbps so those files aren't overwritten on updates. (see xbps.d(5))

@ericonr
Copy link
Member

ericonr commented Sep 9, 2020

Still, none of that should influence flatpak, afaik.

@duncancmt
Copy link
Author

duplicates #25535

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants