From owner-freebsd-toolchain@freebsd.org Wed Aug 30 23:32:41 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C3FDE0CAB4; Wed, 30 Aug 2017 23:32:41 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (unknown [IPv6:2602:304:b010:ef20::f2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gw.catspoiler.org", Issuer "gw.catspoiler.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D150184A01; Wed, 30 Aug 2017 23:32:40 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.15.2/8.15.2) with ESMTP id v7UNWSVY073465; Wed, 30 Aug 2017 16:32:32 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201708302332.v7UNWSVY073465@gw.catspoiler.org> Date: Wed, 30 Aug 2017 16:32:28 -0700 (PDT) From: Don Lewis Subject: Re: FYI: qemu-ppc64-static and qemu-ppc-static "live-hang" when I attempt use with poudriere; qemu-arm-static and qemu-aarch64-static work To: markmi@dsl-only.net cc: linimon@lonesome.com, freebsd-toolchain@freebsd.org, freebsd-ports@freebsd.org, freebsd-ppc@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2017 23:32:41 -0000 On 30 Aug, Mark Millard wrote: > On 2017-Aug-30, at 4:00 AM, Mark Linimon wrote: > >> On Wed, Aug 30, 2017 at 03:09:40AM -0700, Mark Millard wrote: >>> It appears that qemu-ppc64-static and qemu-ppc-static from >>> emulators/qemu-user-static are broken. >> >> Correct, and known for some time. (fwiw sparc64 hangs as well.) > > Looks like qemu-ppc64-static is stuck in a loop, calling > repeatedly: > > do_freebsd_syscall (cpu_env=0x860ea3ac0, num=58, arg1=14, arg2=35995509911, arg3=1024, arg4=268435904, arg5=281494784, arg6=35985701568, arg7=515, arg8=35985668288) > at /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-17977d0/bsd-user/syscall.c:210 > 210 /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-17977d0/bsd-user/syscall.c: No such file or directory. > > Which is for: > > 58 AUE_READLINK STD { ssize_t readlink(char *path, char *buf, \ > size_t count); } > > As confirmed by (note the "callq 0x60207360 " ): > > (gdb) > lock_user_string (guest_addr=14) at /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-17977d0/bsd-user/qemu.h:508 > 508 /wrkdirs/usr/ports/emulators/qemu-user-static/work/qemu-bsd-user-17977d0/bsd-user/qemu.h: No such file or directory. > > (gdb) x/64i 0x0000000060045d3e > => 0x60045d3e : callq 0x6004fd20 > 0x60045d43 : test %rax,%rax > 0x60045d46 : js 0x6004b99c > 0x60045d4c : inc %rax > 0x60045d4f : mov $0x1,%edx > 0x60045d54 : mov %rbx,%rdi > 0x60045d57 : mov %rax,%rsi > 0x60045d5a : callq 0x6003c430 > 0x60045d5f : test %eax,%eax > 0x60045d61 : jne 0x6004bce4 > 0x60045d67 : add 0x26d91b2(%rip),%rbx # 0x6271ef20 > 0x60045d6e : je 0x6004bce4 > 0x60045d74 : mov $0x3,%edx > 0x60045d79 : mov -0x2a8(%rbp),%r14 > 0x60045d80 : mov %r14,%rdi > 0x60045d83 : mov %r12,%rsi > 0x60045d86 : callq 0x6003c430 > 0x60045d8b : test %eax,%eax > 0x60045d8d : jne 0x6004bce4 > 0x60045d93 : add 0x26d9186(%rip),%r14 # 0x6271ef20 > 0x60045d9a : mov -0x294(%rbp),%r10d > 0x60045da1 : mov $0xfffffffffffffff2,%r13 > 0x60045da8 : je 0x6004bcf2 > 0x60045dae : mov $0x602b93da,%esi > 0x60045db3 : mov %rbx,%rdi > 0x60045db6 : callq 0x60230af0 > 0x60045dbb : test %eax,%eax > 0x60045dbd : je 0x6004c566 > 0x60045dc3 : mov %rbx,%rdi > 0x60045dc6 : callq 0x60158660 > 0x60045dcb : mov %rax,%rdi > 0x60045dce : mov %r14,%rsi > 0x60045dd1 : mov %r12,%rdx > 0x60045dd4 : callq 0x60207360 > > But note that the "lock_user_string (guest_addr=14)" and > "do_freebsd_syscall (cpu_env=0x860ea3ac0, num=58, arg1=14," > indicate that the "readlink(char *path," is using a really > small address for the path string. > > > I've not figured a way for poudriere bulk builds to leave > behind the source code automatically. So far I've not > looked at the qemu-bsd-user source code. I do build with > both debug and optimization turned on via bsd.port.mk > having: The -w option will create a tarball of the work directory if the package build fails. I also often use the testport -i option I want to poke around in the WRKDIR after a build.