From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 17 Nov 2001 21:14:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 17 Nov 2001 21:14:29 -0500 Received: from cygnus.veloxia.com ([213.0.31.24]:25486 "HELO cygnus.veloxia.com") by vger.kernel.org with SMTP id convert rfc822-to-8bit; Sat, 17 Nov 2001 21:14:22 -0500 Message-Id: <5.1.0.14.2.20011118025147.035feb08@pop.veloxia.com> X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 18 Nov 2001 03:20:35 +0100 To: linux-kernel@vger.kernel.org From: David Sanchez Subject: Possible bug; latest kernels with LinuxThreads Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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 , 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 , 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