On 03/29/2016 10:04 PM, Christian Seiler wrote: > Unfortunately, apt-get update fails with illegal instruction in this > image (but other binaries such as bash work). QEMU_CPU is set > correctly, just in case you were wondering.
Yeah, I just tried to reproduce it and it affects the latest qemu git snapshot as well. > (sid-powerpcspe-sbuild)root@...:/# apt-get --help > apt 1.0.9.9 for powerpcspe compiled on Apr 28 2015 23:27:12 > Usage: apt-get [options] command > apt-get [options] install|remove pkg1 [pkg2 ...] > apt-get [options] source pkg1 [pkg2 ...] > [...] > This APT has Super Cow Powers. > > (This means that apt-get in principle works.) And it means that the CPU type is set correctly. Otherwise you wouldn't have been able to chroot into the base system. > If I run qemu-ppc-static with -strace on that binary, I get the following > before the invalid instruction message: > > 2540 execve("/usr/lib/apt/methods/http",{"/usr/lib/apt/methods/http",NULL}) = > 0x00000001 ([5,],[],[],NULL) > 2531 read(5,0xf6fbe68c,64000) = 64 > 2531 > stat64("/var/lib/apt/lists/192.168.178.15:3142_debian-ports_dists_sid_InRelease",0xf6fce060) > = -1 errno=2 (No such file or directory) > 2531 > stat64("/var/lib/apt/lists/partial/192.168.178.15:3142_debian-ports_dists_sid_InRelease.reverify",0xf6fce060) > = -1 errno=2 (No such file or directory) > 2531 > stat64("/var/lib/apt/lists/192.168.178.15:3142_debian_dists_sid_InRelease",0xf6fce060) > = -1 errno=2 (No such file or directory) > 2531 > stat64("/var/lib/apt/lists/partial/192.168.178.15:3142_debian_dists_sid_InRelease.reverify",0xf6fce060) > = -1 errno=2 (No such file or directory) > 2531 gettimeofday(-151198432,0,0,1919236640,1695156746,2) = 0 > 2531 gettimeofday(-151198424,0,0,1919236640,1695156746,2) = 0 > 2531 _newselect(9,[5,],[8,],[],{0,500000}) = 0x00000001 > ([],[8,],[],{0,499998}) > 2531 write(8,0xf669df8c,4979) = 4979 > 2531 gettimeofday(-151201560,0,-160863132,0,0,0) = 0 > Invalid instruction That's where I suspected it to fail. > Don't know if that could help or not. I only changed the APT mirror > to my local apt-cacher-ng instance, and copied in qemu-ppc-static to > /usr/bin, nothing else, the rest of the image is identical to your > tarball. Of course, this could be a bug in QEMU... (I'm using the > version from jessie-backports btw.) Yeah, all that is according to documentation, so it really seems like a bug to me. It's actually possible that the instruction pointer contains non-sense and points to an address which actually doesn't contain a valid instruction. Or the opcode table might have been corrupted when running a multi-threaded application. We have seen similar issues with the m68k emulation in qemu where a bug caused the opcode table to be destroyed when a second thread was started, so it's absolutely possible that qemu has a bug here. > Maybe the best thing is to just wait a few weeks until more stuff is > compiled in sid and try bootstrapping again... I'm very sorry, but > unless you can give me a tarball with gcc5 that works with qemu-user > or an image (with gcc5 + ssh) + a kernel that works with qemu-system, > I'm afraid that I don't think I'm using my time productively. No worries. There isn't much you can do at the moment. The bug in qemu needs to be traced down and fixed first. > I'll gladly help with porting the package itself once I have a > working base setup for this. Thanks. > PS: Just a heads-up: I had submitted a porterbox request to nm@d.o > a while back for dietlibc, for a couple of platforms, but ppcspe > was among them (I only started this thread later on after I was told > in IRC that ppcspe may possible not have any porterboxes yet). myon > forwarded my request to DSA today, so if they contact you w.r.t. it > don't be surprised. Ok, thanks for the heads up! So far, I didn't receive any request. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
signature.asc
Description: OpenPGP digital signature