linux-user clone() can't handle glibc posix_spawn() (causes locale-gen to assert)

This bug has been copied automatically from: https://bugs.launchpad.net/qemu/+bug/1673976
Reported by 'l3iggs' on 2017-03-18 :

I'm running a command (locale-gen) inside of an armv7h chroot mounted on
my x86_64 desktop by putting qemu-arm-static into /usr/bin/ of the chroot
file system and I get a core dump.

locale-gen
Generating locales...
  en_US.UTF-8...localedef: ../sysdeps/unix/sysv/linux/spawni.c:360:
__spawnix: Assertion `ec >= 0' failed.
qemu: uncaught target signal 6 (Aborted) - core dumped
/usr/bin/locale-gen: line 41:    34 Aborted                 (core dumped)
localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias
$locale

I've done this same thing successfully for years, but this breakage has
appeared some time in the last 3 or so months. Possibly with the update to
qemu version 2.8.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information