memory fault with io-net

I’m getting this really strange memory error with io-net.

In my boot script I have,

io-net -d tigon3 -p tcpip

I have included devn-tigon3.so and npm-tcpip.so

I get the following dump,

process 49164(io-net) terminated SIGSEGV code = 1 fltno = 11 ip = b033088d mapaddr = 0003088d. ref = f68904ea
memory fault

Does anyone know what this means??

The system has about 1G of memory and the image is only 10MB.

It would be interesting to know what code=1 refers to, but a memory fault usually means you have accessed a protected or nonexistant area of memory. It appears that you are using just QNX supplied software, so is unlikely (although not impossible) that there is a software bug. The most likely candidate is a hardware problem. If the problem was in memory, you would probably see problems with other processes also, so I’d guess your Nic card has some kind of problem.

everything else seems to run fine, although there’s not much at the moment.

yeah it would be nice to know what code =1 is…do you think it’s the error numbers in /usr/include/errno.h ??

Is there some memory manager in qnx that I need to load before hand?

I don’t think so.

Nope. But why do you ask?

io-net works fine in photon, I can see it using the system info tool. I’m calling it with the same driver with standard tcpip. So I thought there might be something else I need to call before hand, and since it was memory related I thought of some memory manager :stuck_out_tongue:

here’s my boot script maybe you can spot something that I’m doing wrong…

#######################

Setup the file system

#######################
display_msg – Starting EIDE manager
display_msg – Mounting hd0
devb-eide blk automount=/dev/hd0t77:/cf &
# wait for mount points to appear - or 5s, whichever is greater
waitfor /cf 5
display_msg – Mounting Complete!

#######################################################################

SERIAL driver

#######################################################################
display_msg – Starting serial driver . . .
devc-ser8250 &

waitfor /dev/ser1

reopen /dev/ser1

display_msg -- Starting system log and pipe . . .
slogger &
pipe &
mqueue &

#######################################################################

PCI server

#######################################################################
display_msg – Starting PCI server…
seedres
pci-bios &
waitfor /dev/pci 2

#######################################################################

NETWORK driver

- dhcp for now, use ifconfig for static ip

#######################################################################
display_msg – Starting on-board ethernet with large TCP/IP stack…
io-net -d tigon3 -p tcpip
#waitfor /dev/socket 2
#waitfor /dev/io-net/en0 4
dhcp.client -I 5 -u

#######################################################################

USB driver

#######################################################################
display_msg – Starting USB driver and inputs

io-usb -dehci -dohci -duhci &
#waitfor /dev/io-usb/io-usb 

io-hid -dusb -dps2ser &

#######################################################################

These env variables

#######################################################################
SYSNAME=nto
TERM=qansi
HOSTNAME=nachos
PATH=:/proc/boot:/bin:/sbin:/opt/bin:/usr/bin:/usr/sbin:/opt/sbin
LD_LIBRARY_PATH=:/proc/boot:/lib:/usr/lib:/lib/dll

#######################################################################

Start the console manager so that we can use them

#######################################################################
display_msg – Starting devc-con
devc-con-hid -n1 &

#start primary console
reopen /dev/con1

# run script to customise system
display_msg	-- Starting System Config script . . .
waitfor /etc/system/sysconfig.script 	5
/etc/system/sysconfig.script 
[+session] sh  &

#######################################################################

Start Secondary consoles

#######################################################################
#reopen /dev/con2
#display_msg /dev/con2 - normal priority
#[+session] sh &
#reopen /dev/con3
#display_msg /dev/con3 - normal priority
#[+session] sh &

/usr/include/sys/siginfo.h

“code” is si_code, for a SIGSEGV, code=1 means SEGV_MAPERR, the memory try to access is not mapped in (invalide pointer).

hmm… interesting…so io-net has a invalid pointer? like a null point or bad pointer in c++…

Now I know the error how do I find out what’s causing it? Could it be loading the driver that’s causing this? or starting the tcpip stack?

ok, I striped the image of libraries and DLLs that are not needed and io-net started working…

So I’m thinking:
a) the extra useless stuff is affecting it some how
b) the size of the image affects it, before it was arounf 10MB now it’s about 4MB.

This is not really a fix as it’s likely the image will grow in future, so if it is related to image size how does photon get io-net up and running?

This is very unexpected. I’m wondering if there is any possibility that the io-net abort might be disinformation. I’d load up all the stuff that caused the problem and remove io-net for the moment to see if anything else goes wrong. Beyond that it feels a little like a memory/hardware problem. For example, let’s say you have 32 MB, but the 2nd 16MB is flaky. Removing stuff lowers your profile down to where io-net loads in good memory and works, whereas up above 16MB it aborts. Just a thought.