Re: trouble with NGPT + Linux 2.5.40 + glibc 2.2.93
"Dr. Uwe Girlich" <[email protected]>
| Newsgroups | gmane.linux.ngpt.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello list! > Thanks! Uwe for your findings. I also noticed this on RH8.0. So I'm not alone. > To fix this, I commented out the libc_internal_tsd_get and > libc_internal_tsd_set routines in pth_tcb.c (everything after line 350). > With that, the initial core dump problem is gone. This change is too hard. It removes all thread dependend code from all glibc. My first proposal (init __libc_internal_tsd_get after all the rest is ready) seems to be a bit better and a patch file to this effect is attached. > However, > the program hangs at final exit() for maxnativethreads > 1. > Looks like the LDT part is not working properly with new Glibc > (NATIVE_SELF, etc), so I also commented out that in useldt.h > and use the pth_get_native_descr() directly, which fixes the exit() > problem. > I think we need to look at the glibc 2.3 changes closely and need > to make appropriate changes in NGPT to use new features like TLS, etc. There is a brand new useldt.h file in the glibc code. Maybe I can produce a file which fits our use. Bye, Uwe -- Dr. Uwe Girlich email: [email protected] Philosys Software GmbH www: www.philosys.de Edisonstrasse 6 phone: +49 89 321407-44 D-85716 Unterschleissheim fax: +49 89 321407-12
library-glibc23init.diff
(text/plain, 1.6 KB)
diff -u -r --exclude-from=diff-exclude ngpt-2.0.3-orig/pth_lib.c ngpt-2.0.3-production/pth_lib.c
--- ngpt-2.0.3-orig/pth_lib.c 2002-09-24 17:01:27.000000000 +0200
+++ ngpt-2.0.3-production/pth_lib.c 2002-10-13 22:54:13.000000000 +0200
@@ -280,6 +280,13 @@
}
memset(&pth_atfork_list, 0x0, PTH_ATFORK_MAX * sizeof(struct pth_atfork_st));
+ /* activate C library entry points */
+ extern int libc_internal_tsd_set(enum __libc_tsd_key_t key, const void * p);
+ extern void * libc_internal_tsd_get(enum __libc_tsd_key_t key);
+
+ __libc_internal_tsd_set = libc_internal_tsd_set;
+ __libc_internal_tsd_get = libc_internal_tsd_get;
+
/* Now we're done initializing... */
pth_initializing = FALSE;
diff -u -r --exclude-from=diff-exclude ngpt-2.0.3-orig/pth_tcb.c ngpt-2.0.3-production/pth_tcb.c
--- ngpt-2.0.3-orig/pth_tcb.c 2002-09-19 19:45:44.000000000 +0200
+++ ngpt-2.0.3-production/pth_tcb.c 2002-10-13 22:54:19.000000000 +0200
@@ -349,7 +349,7 @@
/* Thread specific data for libc. */
-static int libc_internal_tsd_set(enum __libc_tsd_key_t key, const void * p)
+int libc_internal_tsd_set(enum __libc_tsd_key_t key, const void * p)
{
pth_t tid = pth_get_current();
@@ -362,9 +362,9 @@
}
int (*__libc_internal_tsd_set)(enum __libc_tsd_key_t key, const void * p)
- = libc_internal_tsd_set;
+ = NULL;
-static void * libc_internal_tsd_get(enum __libc_tsd_key_t key)
+void * libc_internal_tsd_get(enum __libc_tsd_key_t key)
{
pth_t tid = pth_get_current();
@@ -376,4 +376,4 @@
}
void * (*__libc_internal_tsd_get)(enum __libc_tsd_key_t key)
- = libc_internal_tsd_get;
+ = NULL;