From previous posts I’ve managed to debug into my shared library of io-net.
It works great when the crash-point is in my shared library (for which I
have symbols and source code). However, now io-net is crashing in a chunk of
io-net code for which I don’t have symbols. Does anybody have any
suggestions on how to proceed? Is it possible to get a copy of io-net with
debugging symbols?
Here’s my crash:
SIGSEGV
(gdb) f 0
#0 0x8050b05 in ?? ()
(gdb) x/i $pc
0x8050b05: movzwl 0xe(%ecx),%eax
(gdb) p/x $ecx
$1 = 0x1
It seems I’ve managed to feed io-net enough garbage that it’s dying on
(presumably) some bad pointer I’ve given it. I can’t find the origin of the
crash though. Any thoughts?
Thanks,
Shaun
Please post the stack information.Type “info s” copy what you see there.If
you see the crash in the NIC driver then your tx_down has some problems.Most
likely being that you are freeing the npkt you are sending down,Are you
doing a tx_done() after tx_down()?
Hope that helps.
Sreekanth
“Shaun Jackman” <sjackman@nospam.vortek.com> wrote in message
news:adh2o8$s47$1@inn.qnx.com…
From previous posts I’ve managed to debug into my shared library of
io-net.
It works great when the crash-point is in my shared library (for which I
have symbols and source code). However, now io-net is crashing in a chunk
of
io-net code for which I don’t have symbols. Does anybody have any
suggestions on how to proceed? Is it possible to get a copy of io-net with
debugging symbols?
Here’s my crash:
SIGSEGV
(gdb) f 0
#0 0x8050b05 in ?? ()
(gdb) x/i $pc
0x8050b05: movzwl 0xe(%ecx),%eax
(gdb) p/x $ecx
$1 = 0x1
It seems I’ve managed to feed io-net enough garbage that it’s dying on
(presumably) some bad pointer I’ve given it. I can’t find the origin of
the
crash though. Any thoughts?
Thanks,
Shaun
Shaun Jackman <sjackman@nospam.vortek.com> wrote:
From previous posts I’ve managed to debug into my shared library of io-net.
It works great when the crash-point is in my shared library (for which I
have symbols and source code). However, now io-net is crashing in a chunk of
io-net code for which I don’t have symbols. Does anybody have any
suggestions on how to proceed? Is it possible to get a copy of io-net with
debugging symbols?
Here’s my crash:
SIGSEGV
(gdb) f 0
#0 0x8050b05 in ?? ()
(gdb) x/i $pc
0x8050b05: movzwl 0xe(%ecx),%eax
(gdb) p/x $ecx
$1 = 0x1
It seems I’ve managed to feed io-net enough garbage that it’s dying on
(presumably) some bad pointer I’ve given it. I can’t find the origin of the
crash though. Any thoughts?
Try gdb command “bt” (back trace).
-xtang
I’m not calling tx_done(), but I think the source of my problem might be my
reuse of the npkt_t structure. I have one type of packet (a time sync
message) that is being sent repeatedly. So, I set up the packet once, and
send it periodically with tx_down(). I alter nothing in the npkt_t structure
except my time stamp in the body of the packet.
Do I need to call reg_tx_done() every time I send the packet? I found I had
to set iov_phys in the iov, otherwise the ethernet would send garbage
instead of my data. Is this typical? Can QNX potentially move the memory to
a different physical location? If so, do I have to set iov_phys every time I
send the packet?
I set up the packet like this:
nb->niov = 1;
nb->net_iov = iov;
iov->iov_base = pBody;
iov->iov_len = sizeof( *pBody);
iov->iov_phys = IONETINTF_MPhys( pBody);
npkt->org_data = pBody;
npkt->framelen = sizeof( *pBody);
npkt->tot_iov = 1;
npkt->cell = nCell;
npkt->endpoint = nEndPoint;
npkt->iface = nIface;
// set up packet data here [clip]
reg_tx_done( hRegister, npkt, NULL);
I send the packet like this: (this is repeated many times)
tx_down( hRegister, npkt);
Here’s the backtrace:
(gdb) bt
#0 0x8050b05 in ?? ()
#1 0x8050f58 in ?? ()
#2 0x804b223 in ?? ()
#3 0xb03ab4da in ?? () from /lib/dll/devn-pcnet.so
#4 0xb03ab62c in ?? () from /lib/dll/devn-pcnet.so
#5 0xb03ab734 in ?? () from /lib/dll/devn-pcnet.so
Thanks,
Shaun
Please post the stack information.Type “info s” copy what you see
there.If
you see the crash in the NIC driver then your tx_down has some
problems.Most
likely being that you are freeing the npkt you are sending down,Are you
doing a tx_done() after tx_down()?
Hope that helps.
Sreekanth