lkml.org 
[lkml]   [2001]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPossible bug; latest kernels with LinuxThreads
Hi,

I don't know if this could be a kernel bug or it's only caused by my bad
programming and poor knowledge :-), but the fact is I can't get a threaded
daemon I'm developing run on latest kernels.

It has been tested on 2.4.9 and lower releases successfully, but it doesn't
work on 2.4.13, 2.4.14 and 2.4.15-pre4. Linux distribution is RedHat 6.2
and I've tested on several machines, including SMP and non-SMP.

The daemon listen to a port and creates a new thread when a new client
connects to it. It also has a thread which is listening to a SIGALRM signal
to implement a timer. When SIGALRM is raised the function handler creates a
new thread, and here's when the daemon crashes with segmentation fault
using latest kernels.

Linking with ElectricFence I'm able to coredump the daemon in this moment,
and with gdb this is what a get:

# gdb chsld --core core.7655
GNU gdb 19991004
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `chsld'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/libiodbc.so.2...done.
Reading symbols from /usr/local/lib/mysql/libmysqlclient.so.9...done.
Reading symbols from /lib/libpthread.so.0...done.
Reading symbols from /usr/lib/libstdc++-libc6.1-1.so.2...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libz.so.1...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
#0 0x40053f0f in __pthread_create_2_1 (thread=0x40244fc4, attr=0x40244fc8,
start_routine=0x804ae20 <gMantThread(void *)>, arg=0x40244fc4) at pthread.c:488
488 pthread.c: No such file or directory.
(gdb) bt
#0 0x40053f0f in __pthread_create_2_1 (thread=0x40244fc4, attr=0x40244fc8,
start_routine=0x804ae20 <gMantThread(void *)>, arg=0x40244fc4) at pthread.c:488
#1 0x80730f3 in MCThread::Create () at chsld.cc:130
#2 0x804f13d in MCVXLocaldApp::TimerEvent (this=0x8090260, p=0x80796b4) at
chsld.cc:162
#3 0x80570d0 in MCSimpleApp::OnTimer () at chsld.cc:130
#4 0x8056e31 in AppTimer (n=14) at chsld.cc:75
#5 0x40054552 in pthread_sighandler (signo=14, ctx={gs = 0, __gsh = 0, fs =
0, __fsh = 0, es = 43,
__esh = 0, ds = 43, __dsh = 0, edi = 3212835916, esi = 3212835640, ebp =
3212836044, esp = 3212835588,
ebx = 3212835640, edx = 1075507692, ecx = 3212835640, eax = 4294967292,
trapno = 0, err = 0,
eip = 1075121249, cs = 35, __csh = 0, eflags = 582, esp_at_signal =
3212835588, ss = 43, __ssh = 0,
fpstate = 0xbf7ff888, oldmask = 2147483648, cr2 = 0}) at signals.c:96
#6 0x400ddc68 in __restore () at
../sysdeps/unix/sysv/linux/i386/sigaction.c:127
#7 0x805683b in MCVXLocaldApp::StartTimer (this=0x8090260) at chsld.cc:812
#8 0x8056cf0 in gTimerThread () at chsld.cc:106
#9 0x40051b85 in pthread_start_thread (arg=0xbf7ffe40) at manager.c:241
(gdb)


Any ideas? any help would be appreciated :-) thanks in advance.


David Sánchez
Veloxia Network,S.L.

dsanchez@veloxia.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.073 / U:1.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site