summary refs log tree commit diff stats
path: root/results/classifier/zero-shot/105/mistranslation/1054831
blob: a839ef001d9ef8cf2f3a5d08da0b627af6d3d19b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
mistranslation: 0.198
network: 0.173
device: 0.169
other: 0.150
instruction: 0.142
semantic: 0.116
vnc: 0.106
socket: 0.104
graphic: 0.058
KVM: 0.054
boot: 0.046
assembly: 0.043

qemu-user-static for sparc32plus : bash: fork: Invalid argument

On Debian x86-64 host system I setup a sparc chroot using:

host $ mkdir sparc 
host $ sudo debootstrap --arch=sparc --foreign wheezy sparc http://ftp.au.debian.org/debian
host $ sudo cp ~/Git/qemu/sparc32plus-linux-user/qemu-sparc32plus sparc/usr/bin/qemu-sparc32plus-static
host $ LANG=C sudo chroot sparc/ /usr/bin/qemu-sparc32plus-static /bin/bash

When I then run the second stage of debootstrap I get:

target $ /debootstrap/debootstrap --second-stage
bash: fork: Invalid argument

The above procedures works perfectly for armhf.

This is with current git HEAD (commit 93b6599734f81328ee3d608f57667742cafeea72).

This is due to QEMU sparc32plus-linux-user not being compiled with NPTL support.

Dillon Amburgey wrote:

> This is due to QEMU sparc32plus-linux-user not being compiled with NPTL
> support.

I just check, and NPTL is enabled. I also did this on the binary I
compiled:

    $ strings  /usr/bin/qemu-sparc32plus-static | grep nptl
    ../nptl/sysdeps/pthread/createthread.c
    ../nptl/pthread_mutex_lock.c
    nptl-init.c
    ../nptl/sysdeps/unix/sysv/linux/x86_64/../fork.c

which suggests that it has been compiled with NPTL.


What I mean is that QEMU isn't compiled with guest support for NPTL on every architecture.

If you look in the configure script around line 3900, you'll see some architectures have target_nptl="yes" while others (including sparc) do not.

Unfortunately it looks like the code isn't complete for sparc support, so it isn't a simple matter of enabling it in the configure script.

The reason you get "bash: fork: Invalid argument" is because glibc makes a call to clone() with NPTL arguments that aren't supported.

This bug should be fixed by a combination of:
 * the enable-NPTL-everywhere patchset: http://lists.nongnu.org/archive/html/qemu-devel/2013-07/msg02614.html
 * a fix for pipe() on sparc: http://lists.nongnu.org/archive/html/qemu-devel/2013-07/msg01072.html
which I hope will make it into QEMU 1.6.


This was fixed years ago...