Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Feb 2002 19:45:42 +0100 (CET)
From:      Nicolas Fritsch <nfritsch@enition.com>
To:        freebsd-bugs@freebsd.org
Subject:   malloc going into tsleep with M_NOWAIT
Message-ID:  <20020228193950.D361-100000@mexico.nettoll.com>

next in thread | raw e-mail | index | archive | help

Hi!

I'm working on a kernel module, and have problems with malloc. When
calling with M_NOWAIT, it seems sometimes to go into tsleep(), which
generates a kernel panic.
Here's a backtrace of such a call:

#10 0xc035ee57 in trap (frame={tf_fs = 16, tf_es = -955187184, tf_ds =
1648230416, tf_edi = 0, tf_esi = -1059473000,
      tf_ebp = -1069684708, tf_isp = -1069684764, tf_ebx = 0, tf_edx = -1,
tf_ecx = 432485, tf_eax = -1, tf_trapno = 12,
      tf_err = 0, tf_eip = -1071837076, tf_cs = 8, tf_eflags = 66118,
tf_esp = -1059473000, tf_ss = 2})
    at ../../i386/i386/trap.c:448
#11 0xc01d106c in tsleep (ident=0xc0d9b998, priority=4, wmesg=0xc03baa31
"vmopar", timo=0) at ../../kern/kern_synch.c:424
#12 0xc02e664b in vm_object_page_remove (object=0xc04310e0, start=29960,
end=29962, clean_only=0) at ../../vm/vm_page.h:569
#13 0xc02e2a0e in vm_map_delete (map=0xc0430f60, start=3342888960,
end=3342897152) at ../../vm/vm_map.c:1872
#14 0xc02e0ba0 in kmem_malloc (map=0xc0430f60, size=8192, flags=1) at
../../vm/vm_kern.c:365
#15 0xc01c9a67 in malloc (size=7296, type=0xc03fb7e0, flags=1) at
../../kern/kern_malloc.c:188
#16 0xc031b800 in extendSession () at ../nettoll/toll_session.c:239

"flags=1" in the kmem_alloc shows that it was called with M_NOWAIT.

Did anyone see such a problem before, and have an idea on how to solve it?
Thanks.

Regards

Alexandru


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020228193950.D361-100000>