From owner-freebsd-questions Wed Oct 24 14: 0:54 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mx01-a.netapp.com (mx01-a.netapp.com [198.95.226.53]) by hub.freebsd.org (Postfix) with ESMTP id 95D2537B403 for ; Wed, 24 Oct 2001 14:00:49 -0700 (PDT) Received: from frejya.corp.netapp.com (mh01 [10.10.20.91]) by mx01-a.netapp.com (8.11.1/8.11.1/NTAP-1.2) with ESMTP id f9OL1Hu05686 for ; Wed, 24 Oct 2001 14:01:17 -0700 (PDT) Received: from cranford-fe.eng.netapp.com (localhost [127.0.0.1]) by frejya.corp.netapp.com (8.12.1/8.12.1/NTAP-1.3) with ESMTP id f9OL0iIg000992 for ; Wed, 24 Oct 2001 14:00:44 -0700 (PDT) Received: from localhost (kmacy@localhost) by cranford-fe.eng.netapp.com (8.8.8+Sun/8.8.8) with ESMTP id OAA17774 for ; Wed, 24 Oct 2001 14:00:43 -0700 (PDT) Date: Wed, 24 Oct 2001 14:00:43 -0700 (PDT) From: Kip Macy To: freebsd-questions@freebsd.org Subject: does longjmp not working using uthreads? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Can one not use longjmp when using FreeBSD's uthreads? -Kip It's just trying to jump up the call stack a couple frames. /etc/modules/sample.mod : can't open : Device not configured Fatal error 'longjmp()ing between thread contexts is undefined by POSIX 1003.1' at line ? in file /usr/src/lib/libc_r/uthread/uthread_jmp.c (errno = ?) Abort trap (core dumped) raidclient1% man longjmp No manual entry for longjmp raidclient1% fg r gdb maytag.Rd maytag.Rd.core (gdb) core-file maytag.Rd.core Core was generated by `maytag.Rd'. Program terminated with signal 6, Abort trap. #0 0x28f19928 in kill () from /usr/lib/libc_r.so.4 (gdb) bt #0 0x28f19928 in kill () from /usr/lib/libc_r.so.4 #1 0x28f63e02 in abort () from /usr/lib/libc_r.so.4 #2 0x28f3051a in _thread_exit () from /usr/lib/libc_r.so.4 #3 0x28ef070e in longjmp () from /usr/lib/libc_r.so.4 #4 0x81b69cd in dlm_fatal (format=0x8c8810d "can't open : %s\n") at ../common/dlm/dlm.c:37 #5 0x81b6e21 in dlm_load (name=0x8cedad9 "/etc/modules/sample.mod") at ../common/dlm/dlm.c:192 #6 0x832c3a1 in main_proc (dummy1=0x0, dummy2=0x0) at ../common/main/init_main.c:380 #7 0x8b5179d in sk_invoke_thread (f=0x832c310 , arg1=0x0, arg2=0x0) at ../cpu/i386/sk/sk.c:27 #8 0x8b517a8 in sk_stack_top () at ../cpu/i386/sk/sk.c:28 (gdb) f 5 #5 0x81b6e21 in dlm_load (name=0x8cedad9 "/etc/modules/sample.mod") at ../common/dlm/dlm.c:192 192 dlm_fatal("can't open : %s\n", strerror(errno)); (gdb) list 187 * Look for the object first in the boot-time filesystem, and then 188 * in the regular file system (if that's been initialized). 189 */ 190 if ((bfs_fd = bfs_fio_open(name, 0)) == -1) { 191 if (!fio_initialized || (fio_fd = fio_open(name, 0)) == -1) { 192 dlm_fatal("can't open : %s\n", strerror(errno)); 193 } 194 } 195 196 memset(&dlm_modules[dlm_current], 0, sizeof(dlm_module_t)); (gdb) f 4 #4 0x81b69cd in dlm_fatal (format=0x8c8810d "can't open : %s\n") at ../common/dlm/dlm.c:37 37 longjmp(dlm_exit, 1); (gdb) list 32 33 va_start(ap, format); 34 dbg_vprintf(format, ap); 35 va_end(ap); 36 37 longjmp(dlm_exit, 1); 38 } 39 40 void 41 dlm_init(void) (gdb) f 6 #6 0x832c3a1 in main_proc (dummy1=0x0, dummy2=0x0) at ../common/main/init_main.c:380 380 dlm_load("/etc/modules/sample.mod"); (gdb) list 375 376 #if defined(DEBUG) && !defined(BOOTSTRAP) && !defined(MFGDIAG) && !defined(FWUPDATE) 377 /* 378 * Load sample module (check DLM functionality) 379 */ 380 dlm_load("/etc/modules/sample.mod"); 381 #endif /* DEBUG && !BOOTSTRAP && !MFGDIAG && !FWUPDATE */ 382 383 /* 384 * BEGIN OBSOLETE (gdb) f 5 #5 0x81b6e21 in dlm_load (name=0x8cedad9 "/etc/modules/sample.mod") at ../common/dlm/dlm.c:192 192 dlm_fatal("can't open : %s\n", strerror(errno)); (gdb) list - 182 183 dlm_error_file_name = name; 184 dlm_current++; 185 186 /* 187 * Look for the object first in the boot-time filesystem, and then 188 * in the regular file system (if that's been initialized). 189 */ 190 if ((bfs_fd = bfs_fio_open(name, 0)) == -1) { 191 if (!fio_initialized || (fio_fd = fio_open(name, 0)) == -1) { (gdb) list - 172 volatile int bfs_fd = -1; 173 174 #if defined(__alpha__) 175 long *gp_p; 176 #endif /* __alpha__ */ 177 178 if (setjmp(dlm_exit) != 0) { 179 dlm_current--; 180 goto out; 181 } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message