ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/README.linux-glibc
(Generate patch)

Comparing Coro/README.linux-glibc (file contents):
Revision 1.3 by root, Thu May 8 00:55:28 2003 UTC vs.
Revision 1.5 by pcg, Thu Apr 1 02:29:05 2004 UTC

1If Coro causes segfaults a lot on calls to libc functions, the cause is 1If Coro causes segfaults a lot on calls to libc functions, the cause is
2probably a glibc compiled for i386 and kernel 2.2. 2probably a glibc compiled for i386 and kernel 2.2 (for example, debian
3only supplies 2.2 and 2.6-optimized libraries, not 2.4).
3 4
4Glibc contains a bug that causes any program linked against pthreads AND 5Glibc contains a bug that causes any program linked against pthreads AND
5using coroutines (of any kind, not only Coro, but including most userspace 6using coroutines (of any kind, not only Coro, but including most userspace
6thread libraries like gnu-pth) or alternate stacks to segfault on calls to 7thread libraries like gnu-pth) or alternate stacks to segfault on calls to
7pthread functions. And glibc happens to do a lot of these calls. 8pthread functions. And glibc happens to do a lot of these calls.
8 9
9(Even if you pelr is not compiled against pthreads, Time::HiRes links 10(Even if you perl is not compiled against pthreads, Time::HiRes links
10against -lrt, which drags in pthreads. The same is true for other modules, 11against -lrt, which drags in pthreads. The same is true for other modules,
11so watch out). 12so watch out).
12 13
13The bug is rather difficult to fix. This is not a problem, however, since 14The bug is rather difficult to fix. This is not a problem, however, since
14glibcs compiled for linux-2.4 use a much more efficient method to locate 15glibcs compiled for linux-2.4 use a much more efficient method to locate
15their data, which happens to work with coroutines. 16their data, which happens to work with coroutines.
16 17
17So the easy fix is to install a libc which was compiled for linux-2.4, 18So the easy fix is to install a libc which was compiled for linux-2.4 (or
18using the "--enable-kernel=2.4 i586-pc-linux-gnu" configure options. 192.6) using the "--enable-kernel=2.4 i586-pc-linux-gnu" configure options.
19 20
20WARNING: This libc will no longer run on linux-2.2 or lower! 21WARNING: This libc will no longer run on linux-2.2 or lower!
21 22
22UPDATE: I am no longer able to compile glibc-2.3.2 in this way. The reason 23UPDATE: Time::HiRes in current perl snapshots does no longer link against
23is most probably that the glibc folks work on an enhanced thread local 24-lrt. That still means you need to patch it until 5.9.x gets out.
24storage facility, and it might be that you need a 2.5 or 2.6 kernel to
25make it work. Glibc-2.3.1 works fine, though.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines