Debug in Neuron

Anything that doesn't fit elsewhere.
Post Reply
MengRu

Debug in Neuron

Post by MengRu »

I ran into a Segmentation violation for a specific paramter in neuron.
It shows
/usr/project/hsg/mrli/songbirds/neuron/i686/bin/nrniv: Segmentation violation See $NEURONHOME/lib/help/oc.help near line 9

But I couldn't find the document in my NEURON hierarchy.

Is there a debugging function in neuron to dump out more information?

Thanks.
hines
Site Admin
Posts: 1710
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

I need to update that old message. When it arises, it reflects the lack of an error check in the executable at a more reasonable diagnostic point. The first clue as to what went wrong is in the in the interpreter stack trace that is printed after the message which tells which user function was being executed when the error occurred. From there a series of print statements can isolate which internal function was the culprit. Beyond that, and easiest on a linux machine, one would have to run gdb in order to determine the exact line in the executable which caused the segmentation violation. Since the executables are normally stripped of all debugging infor for the rpm, dmg, and setup.exe distributions in order to minimise their size, before using gdb it is very useful to build from the tar.gz sources.

If you see a segmentation violation or any other error which you can't diagnose in a reasonable time, you can always zip up all the hoc,ses,mod files necessary to reproduce the problem and mail the zip file to me at michael.hines@yale.edu along with instructions as to how to reproduce the error. One of the things I have available to me that has saved me untold hours of debugging time in finding subtle memory usage errors is "Purify" because it tells not only where invalid memory is being used but when it was allocated and when it was freed.
hines
Site Admin
Posts: 1710
Joined: Wed May 18, 2005 3:32 pm

Post by hines »

I forgot to mention that the old error message from the previous incarnation of the help system was (note the 11 year out of date email address):
------------------------------
?1 segmentation bus
segmentation violations and bus errors
Implies an error in your hoc code that was mishandled by the system or
else an error in the system itself. The hoc error handler will
restart the interpreter and allow you to save open files and exit nicely.
It is often the case that you can go on without exiting but it is impossible
to know if that is safe in this instance. If you feel that it should
be possible for the system to deal with this error in a better way then
send email to hines@neuro.duke.edu with code (hopefully short) that I can run
to reproduce the error. In trying to find the reason for this error it may
be useful to get a coredump by first calling coredump_on_error() before
the occurence of the violation.
--------------------------
Post Reply