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

[Bug]: unable to do an update of flatpaks: g_file_get_child: assertion '!g_path_is_absolute (name)' failed #4805

Closed
4 tasks done
TomasTomecek opened this issue Mar 12, 2022 · 5 comments · Fixed by #4806
Closed
4 tasks done
Labels

Comments

@TomasTomecek
Copy link

TomasTomecek commented Mar 12, 2022

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.
  • If this is an issue with a particular app, I have tried filing it in the appropriate issue tracker for the app (e.g. under https://github.com/flathub/) and determined that it is an issue with Flatpak itself.
  • This issue is not a report of a security vulnerability (see here if you need to report a security issue).

Flatpak version

flatpak-1.12.6-1.fc35.x86_64

What Linux distribution are you using?

Fedora Linux

Linux distribution version

rawhide

What architecture are you using?

x86_64

How to reproduce

flatpak update

Expected Behavior

all my installed flatpaks are updated

Actual Behavior

Updating 1/10… ████████████████████ 100%
(flatpak update:20476): GLib-GIO-CRITICAL **: 10:30:16.028: g_file_get_child: assertion '!g_path_is_absolute (name)' failed

(flatpak update:20476): GLib-GIO-CRITICAL **: 10:30:16.028: g_file_query_info: assertion 'G_IS_FILE (file)' failed

(flatpak update:20476): GLib-CRITICAL **: 10:30:16.028: g_propagate_error: assertion 'src != NULL' failed

(flatpak update:20476): GLib-CRITICAL **: 10:30:16.028: g_error_copy: assertion 'error != NULL' failed

(flatpak update:20476): GLib-CRITICAL **: 10:30:16.028: g_propagate_error: assertion 'src != NULL' failed
**
GLib:ERROR:../glib/gerror.c:1152:g_propagate_prefixed_error: assertion failed: (*dest != NULL)
Bail out! GLib:ERROR:../glib/gerror.c:1152:g_propagate_prefixed_error: assertion failed: (*dest != NULL)
zsh: IOT instruction (core dumped)  flatpak update

Additional Information

I tried repair, different flatpak versions (1.11, 1.12.1), tried reinstall fuse2 - none of those helped. Should I purge my /var/lib/flatpak and start from scratch?

[pid 11410] read(32</var/lib/flatpak/repo/objects/60/cbe1da79614a625a1e437f9c3f6ed4bc2b96581ec8ea2c0a8a5c5e2615dfaf.dirtree>, "", 117) = 0
[pid 11410] close(32</var/lib/flatpak/repo/objects/60/cbe1da79614a625a1e437f9c3f6ed4bc2b96581ec8ea2c0a8a5c5e2615dfaf.dirtree>) = 0
[pid 11410] openat(22</var/lib/flatpak/repo/objects>, "44/6a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488.dirmeta", O_RDONLY|O_CLOEXEC) = 32</var/lib/flatpak/repo/objects/44/6a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488.dirmeta>
[pid 11410] newfstatat(32</var/lib/flatpak/repo/objects/44/6a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488.dirmeta>, "", {st_mode=S_IFREG|0644, st_size=12, ...}, AT_EMPTY_PATH) = 0
[pid 11410] newfstatat(32</var/lib/flatpak/repo/objects/44/6a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488.dirmeta>, "", {st_mode=S_IFREG|0644, st_size=12, ...}, AT_EMPTY_PATH) = 0
[pid 11410] lseek(32</var/lib/flatpak/repo/objects/44/6a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488.dirmeta>, 0, SEEK_SET) = 0
[pid 11410] newfstatat(32</var/lib/flatpak/repo/objects/44/6a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488.dirmeta>, "", {st_mode=S_IFREG|0644, st_size=12, ...}, AT_EMPTY_PATH) = 0
[pid 11410] read(32</var/lib/flatpak/repo/objects/44/6a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488.dirmeta>, "\0\0\0\0\0\0\0\0\0\0A\355", 12) = 12
[pid 11410] read(32</var/lib/flatpak/repo/objects/44/6a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488.dirmeta>, "", 12) = 0
[pid 11410] close(32</var/lib/flatpak/repo/objects/44/6a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488.dirmeta>) = 0
[pid 11410] getpeername(2</dev/pts/0<char 136:0>>, 0x7ffec148bc30, [128]) = -1 ENOTSOCK (Socket operation on non-socket)
[pid 11410] futex(0x7f8c8675afa8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
[pid 11410] ioctl(2</dev/pts/0<char 136:0>>, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
[pid 11410] getpid()                    = 11410
[pid 11410] newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644, st_size=2301, ...}, 0) = 0
[pid 11410] write(2</dev/pts/0<char 136:0>>, "\n(flatpak update:11410): GLib-GIO-\33[1;35mCRITICAL\33[0m **: \33[34m10:20:45.390\33[0m: g_file_get_child: assertion '!g_path_is_absolute (name)' failed\n", 145
(flatpak update:11410): GLib-GIO-CRITICAL **: 10:20:45.390: g_file_get_child: assertion '!g_path_is_absolute (name)' failed
) = 145
[pid 11410] ioctl(2</dev/pts/0<char 136:0>>, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
[pid 11410] getpid()                    = 11410
[pid 11410] newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644, st_size=2301, ...}, 0) = 0
[pid 11410] write(2</dev/pts/0<char 136:0>>, "\n(flatpak update:11410): GLib-GIO-\33[1;35mCRITICAL\33[0m **: \33[34m10:20:45.391\33[0m: g_file_query_info: assertion 'G_IS_FILE (file)' failed\n", 136
(flatpak update:11410): GLib-GIO-CRITICAL **: 10:20:45.391: g_file_query_info: assertion 'G_IS_FILE (file)' failed
) = 136
[pid 11410] fcntl(31</var/lib/flatpak/repo-lock>, F_OFD_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
[pid 11410] unlinkat(AT_FDCWD, "/var/lib/flatpak/repo-lock", 0) = 0
[pid 11410] close(31</var/lib/flatpak/repo-lock (deleted)>) = 0
[pid 11410] unlinkat(AT_FDCWD, "/var/lib/flatpak/lock", 0) = 0
[pid 11410] close(29</var/lib/flatpak/lock (deleted)>) = 0
[pid 11410] ioctl(2</dev/pts/0<char 136:0>>, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
[pid 11410] getpid()                    = 11410
[pid 11410] newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644, st_size=2301, ...}, 0) = 0
[pid 11410] write(2</dev/pts/0<char 136:0>>, "\n(flatpak update:11410): GLib-GIO-\33[1;35mCRITICAL\33[0m **: \33[34m10:20:45.390\33[0m: g_file_get_child: assertion '!g_path_is_absolute (name)' failed\n", 145
(flatpak update:11410): GLib-GIO-CRITICAL **: 10:20:45.390: g_file_get_child: assertion '!g_path_is_absolute (name)' failed
) = 145
[pid 11410] ioctl(2</dev/pts/0<char 136:0>>, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
[pid 11410] getpid()                    = 11410
[pid 11410] newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644, st_size=2301, ...}, 0) = 0
[pid 11410] write(2</dev/pts/0<char 136:0>>, "\n(flatpak update:11410): GLib-GIO-\33[1;35mCRITICAL\33[0m **: \33[34m10:20:45.391\33[0m: g_file_query_info: assertion 'G_IS_FILE (file)' failed\n", 136
(flatpak update:11410): GLib-GIO-CRITICAL **: 10:20:45.391: g_file_query_info: assertion 'G_IS_FILE (file)' failed
) = 136
[pid 11410] fcntl(31</var/lib/flatpak/repo-lock>, F_OFD_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
[pid 11410] unlinkat(AT_FDCWD, "/var/lib/flatpak/repo-lock", 0) = 0
[pid 11410] close(31</var/lib/flatpak/repo-lock (deleted)>) = 0
[pid 11410] unlinkat(AT_FDCWD, "/var/lib/flatpak/lock", 0) = 0
[pid 11410] close(29</var/lib/flatpak/lock (deleted)>) = 0
[pid 11410] ioctl(2</dev/pts/0<char 136:0>>, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
[pid 11410] getpid()                    = 11410
[pid 11410] newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644, st_size=2301, ...}, 0) = 0
[pid 11410] write(2</dev/pts/0<char 136:0>>, "\n(flatpak update:11410): GLib-\33[1;35mCRITICAL\33[0m **: \33[34m10:20:45.391\33[0m: g_propagate_error: assertion 'src != NULL' failed\n", 127
(flatpak update:11410): GLib-CRITICAL **: 10:20:45.391: g_propagate_error: assertion 'src != NULL' failed
) = 127
[pid 11410] ioctl(1</dev/pts/0<char 136:0>>, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
[pid 11410] ioctl(2</dev/pts/0<char 136:0>>, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
[pid 11410] getpid()                    = 11410
[pid 11410] newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644, st_size=2301, ...}, 0) = 0
[pid 11410] write(2</dev/pts/0<char 136:0>>, "\n(flatpak update:11410): GLib-\33[1;35mCRITICAL\33[0m **: \33[34m10:20:45.391\33[0m: g_error_copy: assertion 'error != NULL' failed\n", 124
(flatpak update:11410): GLib-CRITICAL **: 10:20:45.391: g_error_copy: assertion 'error != NULL' failed
) = 124
[pid 11410] ioctl(2</dev/pts/0<char 136:0>>, TCGETS, {B38400 opost isig -icanon -echo ...}) = 0
[pid 11410] getpid()                    = 11410
[pid 11410] newfstatat(AT_FDCWD, "/etc/localtime", {st_mode=S_IFREG|0644, st_size=2301, ...}, 0) = 0
[pid 11410] write(2</dev/pts/0<char 136:0>>, "\n(flatpak update:11410): GLib-\33[1;35mCRITICAL\33[0m **: \33[34m10:20:45.392\33[0m: g_propagate_error: assertion 'src != NULL' failed\n", 127
(flatpak update:11410): GLib-CRITICAL **: 10:20:45.392: g_propagate_error: assertion 'src != NULL' failed
) = 127
[pid 11410] write(2</dev/pts/0<char 136:0>>, "**\nGLib:ERROR:../glib/gerror.c:1152:g_propagate_prefixed_error: assertion failed: (*dest != NULL)\n", 98**
GLib:ERROR:../glib/gerror.c:1152:g_propagate_prefixed_error: assertion failed: (*dest != NULL)
) = 98
[pid 11410] write(1</dev/pts/0<char 136:0>>, "Bail out! GLib:ERROR:../glib/gerror.c:1152:g_propagate_prefixed_error: assertion failed: (*dest != NULL)\n", 105Bail out! GLib:ERROR:../glib/gerror.c:1152:g_propagate_prefixed_error: assertion failed: (*dest != NULL)
) = 105
@smcv
Copy link
Collaborator

smcv commented Mar 12, 2022

This sounds like the libostree bug that was fixed in ostreedev/ostree#2476. What version of libostree do you have?

@smcv
Copy link
Collaborator

smcv commented Mar 12, 2022

If it's the bug I think it is, then it's triggered by using libostree older than 2021.6 with GLib >= 2.71. Upgrading to libostree >= 2021.6 should fix it.

@TomasTomecek
Copy link
Author

@smcv you're correct! Just did a full update of my system (now having ostree-libs-2022.1-2.fc36.x86_64) and all works just fine

Thank you!

smcv added a commit to smcv/flatpak that referenced this issue Mar 12, 2022
The subpath is resolved relative to the root of the commit, so we can
use either an absolute or a relative path interchangeably. When using
libostree < 2021.6 with GLib >= 2.71, absolute paths cause an assertion
failure here; that was a libostree bug and was fixed in 2021.6, but we
can interoperate with more versions by sticking to relative paths, and
there's no real reason to prefer absolute.

Resolves: flatpak#4805
Co-authored-by: Corentin Noël <[email protected]>
Signed-off-by: Simon McVittie <[email protected]>
smcv added a commit that referenced this issue Mar 14, 2022
The subpath is resolved relative to the root of the commit, so we can
use either an absolute or a relative path interchangeably. When using
libostree < 2021.6 with GLib >= 2.71, absolute paths cause an assertion
failure here; that was a libostree bug and was fixed in 2021.6, but we
can interoperate with more versions by sticking to relative paths, and
there's no real reason to prefer absolute.

Resolves: #4805
Co-authored-by: Corentin Noël <[email protected]>
Signed-off-by: Simon McVittie <[email protected]>
smcv added a commit that referenced this issue Mar 14, 2022
The subpath is resolved relative to the root of the commit, so we can
use either an absolute or a relative path interchangeably. When using
libostree < 2021.6 with GLib >= 2.71, absolute paths cause an assertion
failure here; that was a libostree bug and was fixed in 2021.6, but we
can interoperate with more versions by sticking to relative paths, and
there's no real reason to prefer absolute.

Resolves: #4805
Co-authored-by: Corentin Noël <[email protected]>
Signed-off-by: Simon McVittie <[email protected]>
(cherry picked from commit 2df1b16)
@smcv
Copy link
Collaborator

smcv commented Mar 14, 2022

This was really a libostree bug, but Flatpak 1.13.2 and 1.12.7 have a workaround that should make them avoid this, even if libostree and GLib are at affected versions.

@311298
Copy link

311298 commented Jul 10, 2022

(flatpak update:4977): GLib-GIO-CRITICAL **: 22:50:09.741: g_task_get_cancellable: assertion 'G_IS_TASK (task)' failed
I am getting above error on flatpak update version is 1.12.7 and using fedora linux
How to resolve the above issue ?
Can you point me to correct direction? thanks

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

Successfully merging a pull request may close this issue.

3 participants