panic when invoking recvfrom
panic when invoking recvfrom
- Subject: panic when invoking recvfrom
- From: Peter Kirk <email@hidden>
- Date: Thu, 5 Jul 2007 16:31:55 +0200
Hi list,
I have a G4 running Mac OS X 10.4.10 (freshly installed, no changes to the
kernel).
uname -a gives me:
Darwin Brummbox.local 8.10.0 Darwin Kernel Version 8.10.0: Wed May 23 16:50:59
PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power Macintosh powerpc
On this Mac an application I am developing frequently causes a kernel panic
(not only on this box, on an Intel Mac the same thing happens). Anyways, to
try and find out where the problem is I setup the kernel to send a core-dump
via net to my other mac, and analyzed that with gdb, using a symbol file from
the "Kernel Debug Kit 10.4.10 - PowerPC", and I retrieved two different
backtraces, both of which contain recvfrom, which I indeed call from my
application code.
Here are the backtraces (the second was some kind of data-access error?)
#0 Debugger (message=0x30d3e4 "panic")
at /SourceCache/xnu/xnu-792.21.3/osfmk/ppc/model_dep.c:639
#1 0x00026898 in panic (str=0x32d19c "freeing free mbuf")
at /SourceCache/xnu/xnu-792.21.3/osfmk/kern/debug.c:202
#2 0x0028cb60 in m_free (m=0x280df900)
at /SourceCache/xnu/xnu-792.21.3/bsd/kern/uipc_mbuf.c:600
#3 0x00295bcc in sbdroprecord (sb=0x1ec0044)
at /SourceCache/xnu/xnu-792.21.3/bsd/kern/uipc_socket2.c:1181
#4 0x00292938 in soreceive (so=0x1ec0000, psa=0x176f3dc8, uio=0x1d9ed80,
mp0=0x0, controlp=0x0, flagsp=0x176f3e6c)
at /SourceCache/xnu/xnu-792.21.3/bsd/kern/uipc_socket.c:1924
#5 0x002975ac in recvit (p=0x23470f0, s=6, mp=0x176f3e40, uiop=0x1d9ed80,
namelenp=0, retval=0x23cc9dc)
at /SourceCache/xnu/xnu-792.21.3/bsd/kern/uipc_syscalls.c:932
#6 0x002979d8 in recvfrom (p=0x23470f0, uap=0x23cc998, retval=0x23cc9dc)
at /SourceCache/xnu/xnu-792.21.3/bsd/kern/uipc_syscalls.c:1084
#7 0x002ab548 in unix_syscall (regs=0x3e0000)
at /SourceCache/xnu/xnu-792.21.3/bsd/dev/ppc/systemcalls.c:207
#8 0x000abb30 in noassist ()
#9 0x01d049c0 in ?? ()
#0 0x000aca3c in forward32bit ()
#1 0x000ab418 in copyin3 ()
#2 0x00273820 in uiomove64 (cp=0, n=16225, uio=0x1d9ed80)
at /SourceCache/xnu/xnu-792.21.3/bsd/kern/kern_subr.c:164
#3 0x0029261c in soreceive (so=0x1ec0980, psa=0x17653dc8, uio=0x1d9ed80,
mp0=0x0, controlp=0x0, flagsp=0x17653e6c)
at /SourceCache/xnu/xnu-792.21.3/bsd/kern/uipc_socket.c:1799
#4 0x002975ac in recvit (p=0x234b2c0, s=6, mp=0x17653e40, uiop=0x1d9ed80,
namelenp=0, retval=0x23b2f64)
at /SourceCache/xnu/xnu-792.21.3/bsd/kern/uipc_syscalls.c:932
#5 0x002979d8 in recvfrom (p=0x234b2c0, uap=0x23b2f20, retval=0x23b2f64)
at /SourceCache/xnu/xnu-792.21.3/bsd/kern/uipc_syscalls.c:1084
#6 0x002ab548 in unix_syscall (regs=0x3e0000)
at /SourceCache/xnu/xnu-792.21.3/bsd/dev/ppc/systemcalls.c:207
#7 0x000abb30 in noassist ()
#8 0x00000000 in lowGlo ()
As you can see both backtraces run through "recvfrom", which I use in my
application to receive UDP data (I check with select first if there is data
on the socket, and retrieve it with recvfrom if there is).
Now, my application is closed-source, I cannot post it, and I tried to produce
a test-case and failed at it (recvfrom didn't ever cause a kernel panic,
although I was sending/receiving many thousands of UDP packets with the
test-app). It would be great if you guys could tell me what you need to know,
what information I could provide you, to allow you to guess at the problem. I
am willing to try some things, I really need this fixed.
Peter
--
"A great many people think they are thinking when they are merely rearranging
their prejudices."
-- William James
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden