[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] why does qemu i386 userspace emulation crashes when pth
Re: [Qemu-devel] why does qemu i386 userspace emulation crashes when pthread used?
Fri, 22 Apr 2011 11:29:21 -0700
I have found the problem and fix. NEW_STACK_SIZE for clone() should be increased from the default 16384 (x86_64) to 256 KiB.
On Tue, Apr 19, 2011 at 6:33 PM, Yale Zhang <address@hidden>
Hi. I'm want to run some pthread programs using qemu userspace emulation (target=i386, host=x86_64,arm), but see NPTL support isn't supported for the i386 target. I have applied a patch from here http://patchwork.ozlabs.org/patch/45206/
and used it to run a simple pthread fork, join program. The program is able to launch multiple threads, but the 1st thread that exits causes the program to crash inside the pthread library.
What are the reasons NPTL isn't supported for i386 and was it ever supported in the past? I even wrote another simple program that does the equivalent, but with using fork(), waitpid() instead of pthread_create(), pthread_join(), and it works correctly. This seems to suggest thread local storage wasn't implemented correctly?