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

[rawhide]: s390x: qemu-x86_64-static segfaults #1846

Open
nikita-dubrovskii opened this issue Dec 2, 2024 · 3 comments
Open

[rawhide]: s390x: qemu-x86_64-static segfaults #1846

nikita-dubrovskii opened this issue Dec 2, 2024 · 3 comments
Labels
jira for syncing to jira kind/bug pipeline failure This issue or pull request is derived from CI failures

Comments

@nikita-dubrovskii
Copy link

Describe the bug

qemu-x86_64-static fails with Segmentation fault (core dumped).

The kola test ext.config.binfmt.qemu fails

Reproduction steps

$ qemu-x86_64-static --version

Expected behavior

$ qemu-x86_64-static --version
SOME_VERISON_HERE

Actual behavior

$ qemu-x86_64-static --version
Segmentation fault (core dumped)

System details

  • QEMU
  • FCOS 42 rawhide

Butane or Ignition config

No response

Additional information

Installed rpm: qemu-user-static-x86-9.2.0-0.1.rc1.fc42.s390x

@nikita-dubrovskii nikita-dubrovskii added kind/bug jira for syncing to jira labels Dec 2, 2024
@nikita-dubrovskii nikita-dubrovskii self-assigned this Dec 2, 2024
@nikita-dubrovskii nikita-dubrovskii added the pipeline failure This issue or pull request is derived from CI failures label Dec 2, 2024
@nikita-dubrovskii nikita-dubrovskii removed their assignment Dec 3, 2024
@iii-i
Copy link

iii-i commented Dec 3, 2024

Backtrace:

(gdb) bt
#0  0x000003ffaeaa903e in resolve_g_str_is_ascii ()
#1  0x000003ffaeb4c0e6 in _dl_relocate_static_pie ()
#2  0x000003ffaeae2f8c in __libc_start_main_impl ()
#3  0x000003ffae8c610a in _start ()

Disassembly:

Dump of assembler code for function resolve_g_str_is_ascii:
   0x000003ffaeaa9020 <+0>:     stmg    %r14,%r15,112(%r15)
   0x000003ffaeaa9026 <+6>:     ear     %r4,%a0
   0x000003ffaeaa902a <+10>:    lay     %r15,-224(%r15)
   0x000003ffaeaa9030 <+16>:    sllg    %r14,%r4,32
   0x000003ffaeaa9036 <+22>:    ear     %r14,%a1
   0x000003ffaeaa903a <+26>:    la      %r5,168(%r15)
=> 0x000003ffaeaa903e <+30>:    mvc     216(8,%r15),40(%r14)

This is an ifunc resolver, which tries to use thread-local storage. I think thread-local storage is not available this early on s390x. @stliibm may have a more precise explanation for this.

In any case, resolve_g_str_is_ascii() has been removed by https://gitlab.gnome.org/GNOME/glib/-/commit/96205fc7fe938df268735a3c7d78fa85924f8fc7, so as a short-term solution I would suggest adding this patch to glib.

@iii-i
Copy link

iii-i commented Dec 3, 2024

A bit more info from a private conversation with @stliibm:

If this is an ifunc-resolver, this looks like stack-protector?
In glibc the ifunc-resolvers are marked with: inhibit_stack_protector
https://sourceware.org/git/?p=glibc.git;a=blob;f=include/libc-symbols.h;h=4367aa6740bff6fc6b42b562f5d9a95b6690bc50;hb=HEAD#l365

So an alternative approach would be to add this annotation to glib's resolve_g_str_is_ascii().

@nikita-dubrovskii
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira for syncing to jira kind/bug pipeline failure This issue or pull request is derived from CI failures
Projects
None yet
Development

No branches or pull requests

2 participants