buntu@P9g-LPAR05:~$ /usr/bin/qemu-s390x  -strace -D /tmp/qstrace.log 
/bin/busybox ash -c '/usr/bin/qemu-s390x /bin/busybox ls -dCFl debian/*[t]*'
/bin/busybox: error while loading shared libraries: libresolv.so.2: failed to 
map segment from shared object
ubuntu@P9g-LPAR05:~$ cat /tmp/qstrace.log
12381 brk(NULL) = 0x000002aa000f3000
12381 access("/etc/ld.so.preload",R_OK) = -1 errno=2 (No such file or directory)
12381 openat(AT_FDCWD,"/etc/ld.so.cache",O_RDONLY|O_CLOEXEC) = 4
12381 fstat(4,0x0000606e39d2dec0) = 0
12381 mmap(NULL,36503,PROT_READ,MAP_PRIVATE,4,0) = 0x0000606e394c0000
12381 close(4) = 0
12381 munmap(0x0000606e394c0000,36503) = 0
12381 
openat(AT_FDCWD,"/lib/s390x-linux-gnu/glibc-hwcaps/z13/libresolv.so.2",O_RDONLY|O_CLOEXEC)
 = -1 errno=2 (No such file or directory)
12381 
newfstatat(AT_FDCWD,"/lib/s390x-linux-gnu/glibc-hwcaps/z13/",0x0000606e39d2df50,0)
 = -1 errno=2 (No such file or directory)
12381 openat(AT_FDCWD,"/lib/s390x-linux-gnu/libresolv.so.2",O_RDONLY|O_CLOEXEC) 
= 4
12381 read(4,0x39d2e108,832) = 832
12381 fstat(4,0x0000606e39d2df48) = 0
12381 mmap(NULL,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 
0x0000606e394c0000
12381 mmap(NULL,75792,PROT_EXEC|PROT_READ,MAP_PRIVATE|MAP_DENYWRITE,4,0) = 
0x0000606e394a0000
12381 
mmap(0x0000606e394af000,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_DENYWRITE|MAP_FIXED,4,0xe000)
 = -1 errno=14 (Bad address)
12381 close(4) = 0
12381 writev(2,0x606e39d2d880,0xa) = 109
12381 exit_group(127)


This triggers only when a PT_GNU_RELRO/data segment of a loaded library lands 
so that the MAP_FIXED range has one guest page on each side of a 64 KiB host 
boundary, as here. The new glibc build shifted libresolv's segment layout onto 
that unlucky placement. 

Some upstream ref : https://gitlab.com/qemu-
project/qemu/-/work_items/1591

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2170563

Title:
  qemu-user: s390x libresolv.so loading fails on 64 KiB-page ppc64el
  hosts when a mapping fragment overlaps a file-backed page beyond EOF

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/2170563/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to