Bug#377205: libc6: pthread_setcanceltype() hangs intermittent after setlocale().
Package: libc6
Version: 2.3.2.ds1-22
Severity: normal
Tags: l10n
Here is the stack of the hanging process:
#0 0x40326321 in pthread_setcanceltype () from /lib/tls/libc.so.6
#1 0x40261819 in setlocale () from /lib/tls/libc.so.6
#2 0x080c1f93 in lmd (sourcename=0x80d1b11 "grmmain.c", line=634,
actlevel=11, messtr=0x80d1d60 "Sohn (grmevt) mit PID %d terminiert:")
at lmd.c:417
#3 0x0804d9a0 in handle_sig_cld (dummy=17) at grmmain.c:634
#4 <signal handler called>
#5 0x402b4d06 in mallopt () from /lib/tls/libc.so.6
#6 0x402b3c43 in malloc () from /lib/tls/libc.so.6
#7 0x402a310f in fgets () from /lib/tls/libc.so.6
#8 0x402a31cf in fopen () from /lib/tls/libc.so.6
#9 0x4051c579 in XcursorLibraryPath () from /usr/lib/libXcursor.so.1
#10 0x4051c775 in XcursorLibraryLoadImages () from /usr/lib/libXcursor.so.1
#11 0x4051c97d in XcursorShapeLoadImages () from /usr/lib/libXcursor.so.1
#12 0x4051ccbe in XcursorTryShapeCursor () from /usr/lib/libXcursor.so.1
#13 0x4016afde in XGContextFromGC () from /usr/X11R6/lib/libX11.so.6
#14 0x4016b399 in XCreateGlyphCursor () from /usr/X11R6/lib/libX11.so.6
#15 0x4016b809 in XCreateFontCursor () from /usr/X11R6/lib/libX11.so.6
#16 0x0805f5b9 in l_set_cursor (dp_nr=9, cursor_nr=0, cursor_fcolor=2,
cursor_bcolor=0) at grmlctrl.c:1193
#17 0x0805ee31 in l_exit_dp (dp=0x815bca8, reset=1) at grmlctrl.c:1053
#18 0x0804e8ff in exit_graphik_dp (dp_list=0x815a940, dp_nr=10, reset_dp=1)
at grmcomm.c:304
#19 0x0804cbb5 in main_loop () at grmmain.c:191
#20 0x0804c20c in main (argc=10, argv=0xbffff9d4) at grmmain.c:139
The function 'lmd' is called in the signal handler (sigchild).
Here the affected source lines in this function:
void lmd(const char *sourcename, int line, int actlevel, const char *messtr, ...)
{
long t;
struct tm *tmptr;
char *date;
WORD err, j, i = 1;
va_list ap;
...
if (lmd_lvlrng[actlevel - 1]) {
time(&t);
tmptr = localtime(&t);
date = asctime(tmptr);
if (!lmdinit) {
...
} else {
...
/* get locale setting */
strcpy(m_current_locale, setlocale(LC_CTYPE, NULL));
/* set locale to "C" because of %s in format messtr -
not all languages have UTF8 :-( */
/* during the setlocale the process is hanging */
setlocale(LC_CTYPE, "C"); /* <<-- */
vfprintf(lmd_fp, messtr, ap);
/* set locale to the old value */
setlocale(LC_CTYPE, m_current_locale);
fprintf(lmd_fp, "\n");
(void)fflush(lmd_fp);
lmd_byteswritten = ftell(lmd_fp);
va_end(ap);
}
}
return;
}
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.11.3
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Versions of packages libc6 depends on:
ii libdb1-compat 2.1.3-7 The Berkeley database routines [gl
-- no debconf information
Reply to: