Date: Wed, 24 Oct 2001 14:00:43 -0700 (PDT) From: Kip Macy <kmacy@netapp.com> To: freebsd-questions@freebsd.org Subject: does longjmp not working using uthreads? Message-ID: <Pine.GSO.4.10.10110241358270.12319-100000@cranford-fe.eng.netapp.com>
next in thread | raw e-mail | index | archive | help
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 <main_proc>, 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10110241358270.12319-100000>
