Bug 1045384 - chroot - Illegal instruction
Summary: chroot - Illegal instruction
Keywords:
Status: CLOSED DUPLICATE of bug 1002077
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: 20
Hardware: ppc64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-20 10:03 UTC by František Dvořák
Modified: 2014-01-23 11:36 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-23 11:36:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description František Dvořák 2013-12-20 10:03:26 UTC
Description of problem:

Doing 'chroot /mnt/sysimage' in rescue mode under qemu-system-ppc64 leads to "Illegal instruction" error.


Version-Release number of selected component (if applicable):

chroot (GNU coreutils) 8.21

Linux version 3.11.10-301.fc20.ppc64


How reproducible:
Always.


Steps to Reproduce:
1. boot in qemu-system-ppc64 using installation DVD

qemu-system-ppc64 -m 2048 -net nic -net user,net=192.168.167.0/24 -hdb swap.img root.img -cdrom Fedora-20-ppc64-DVD.iso

2. try "chroot /mnt/sysimage"

Actual results:

Illegal instruction


Expected results:


Additional info:

Running 'strace chroot /mnt/sysimage' ends with:

chroot("/mnt/sysimage") = 0
chdir("/") = 0
execve("/bin/bash", ["/bin/bash", "-i"], [/* 19 vars */]) = 0
--- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPC, si_addr=0x1ffffffb7bc4}
+++ killed by SIGILL +++
Illegal instruction

Comment 1 Ondrej Vasik 2013-12-22 23:44:48 UTC
Adding Karsten/Dan to cc, as they take care of secondary arches. Any idea? I don't see anything strange in code - just execvp() and then exit.

Comment 2 Dan Horák 2013-12-23 08:12:44 UTC
What's on the root.img? It sounds like either a QEMU bug (or rather being incomplete with ppc64 emulation) or the bash from the root.img isn't a ppc64 binary.

Comment 3 Richard W.M. Jones 2013-12-23 08:31:57 UTC
Could be VSX?  (bug 887978)

Note that upstream qemu has seen patches posted to add VSX support
earlier this month.  Not sure if they went upstream yet or not.

Comment 4 František Dvořák 2013-12-23 14:56:59 UTC
1) content on the root.img:

/tmp/mnt/usr/bin/bash: ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x26685a161df8985d7281ced4e89d323ce73be86c, stripped

2) 'objdump -d' shows lxvd2x and stxvd2x instructions in libc.so.6 and ld64.so.1 libraries (not sure if it is VSX?).

Tested on qemu 1.6.1 and Fedora's qemu 1.7.0-1, SIGILL is returned in both.

Comment 5 Karsten Hopp 2014-01-07 14:53:53 UTC
Does it work when you add the parameters '-cpu POWER7 -machine pseries' ?

Comment 6 František Dvořák 2014-01-11 02:23:43 UTC
It is the same with -cpu/-machine arguments.


I've tried also following commands in rescue shell:

/bin/bash
# -> OK

/mnt/sysimage/bin/bash
# -> OK

LD_LIBRARY_PATH=/mnt/sysimage/lib64 /mnt/sysimage/bin/bash
# -> Illegal instruction


(some libraries between /lib64 and /mnt/sysimage/lib64 differs, but the bash binaries are identical)

Comment 7 Paolo Bonzini 2014-01-23 11:36:08 UTC

*** This bug has been marked as a duplicate of bug 1002077 ***


Note You need to log in before you can comment on or make changes to this bug.