can't open after fixing smi issues

More
23 May 2012 23:29 #20312 by pfred1
What you're saying is leading me to believe your system is a bit bonkers. Right now I can imagine a couple things that may be wrong. It is only a lack of data that stops me from confirming my suspicions.

This is one place I'd focus on for why you cannot successfully unload modules:

man modprobe.conf

With that properly setup it might automagically just work. I should say should, but seeing is believing for me and I don't want to over sell it. Past that you should be able to manually unload your faulty modules if you kill off the dependent childern before the parents. Order matters.

The kernel is so complex, and there are so many permutations of interaction I don't even want to speculate beyond something there is tripping you up, leading to your crashes to begin with. Because that stuff shouldn't be happening. To get to the bottom of that you're just going to have to slug it out and hope you find some shred of a clue someplace.

Recompile your kernel with debugging symbols and set:

ulimit -c unlimited

and rake through the mess with gdb. This is known as dumping core. When reading logs just isn't enough, this is the next step up the food chain. Happy hunting!

Please Log in or Create an account to join the conversation.

More
23 May 2012 23:39 #20313 by andypugh
pfred1 wrote:

The kernel is so complex, and there are so many permutations of interaction I don't even want to speculate beyond something there is tripping you up, leading to your crashes to begin with. Because that stuff shouldn't be happening.


I think we are straying far too far from the original subject here.
I know what causes my crashes, it is bugs in the code I write. I spend a lot of time writing the hardware drivers for LinuxCNC, and those run in kernel space where going out of bounds in an array or free-ing the wrong bit of memory can have very serious consequences.
What I am saying is that it is possible for RTAI to fail to cleanly quit, and to leave kernel modules mutually interdependent such that modprobe (and rmmod) refuse to unload them.

Please Log in or Create an account to join the conversation.

More
24 May 2012 03:49 - 24 May 2012 03:55 #20314 by Banana Jack
ArcEye wrote:

The only thing that strikes me in the .hal file are the figures

setp stepgen.1.dirhold 42000
setp stepgen.1.dirsetup 42000

If those are the manufacturers figures then so be it, they are 3 times the size of the figures for my small stepper mill however.

i don't actually know what those numbers mean...i may have just put them in myself while setting up.

In you .ini file I noted that your acceleration figures are extremely high, especially in comparison to your modest and probably realistic velocity figure.

Has no bearing on your current problem, but when you get running, very high ACCELERATION in combination with a very high SCALE figure (gearing plus very high micro-stepping?)
and your slow dirhold and dirsetup figures look like a sure fire recipe for lost steps.

regards

yeah i just got into this whole cnc thing and hadn't really set up my mill yet when all of a sudden i started having software issues...so i still know very very little about it. so you think i should drop my acceleration?



okay you guys lost me in that conversation there, i'm not even sure if you were talking about my problem or something completely different...
i tried restarting, that didn't get me anywhere, but i'll keep it in mind when i change more things...
# modprobe hal_lib rtapi rtai_smi rtai_math rtai_sem rtai_shm
doesn't do any good, it says all of those modules don't exist(when trying them individually)

i tried replacing my rtapi.conf file with yours(well, copy-and-pasting the contents, i don't know if there's a better way...it wouldn't let me actually put files in that folder) and it told me this

Print file information:
RUN_IN_PLACE=no
EMC2_DIR=
EMC2_BIN_DIR=/usr/bin
EMC2_TCL_DIR=/usr/share/emc/tcl
EMC2_SCRIPT_DIR=
EMC2_RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/emc2
EMC2_CONFIG_DIR=
EMC2_LANG_DIR=/usr/share/emc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
EMC2_EMCSH=/usr/bin/wish8.5
EMC2 - 2.4.6
Machine configuration directory is '/home/samuel/emc2/configs/3axismdf'
Machine configuration file is '3axismdf.ini'
INIFILE=/home/samuel/emc2/configs/3axismdf/3axismdf.ini
PARAMETER_FILE=emc.var
EMCMOT=motmod
EMCIO=io
TASK=milltask
HALUI=
DISPLAY=axis
NML_FILE=
Starting EMC2...
Starting EMC2 server program: emcsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Realtime system did not load
Shutting down and cleaning up EMC2...
Killing task emcsvr, PID=1444
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
/usr/bin/emc_module_helper: Invalid usage with args: insert /usr/realtime-2.6.32-122-rtai/modules/linuxcnc/rtapi.ko

Usage: /usr/bin/emc_module_helper insert /path/to/module.ext [param1=value1 ...]

where module is one of:
rtai_math
rtai_sem
rtai_shm
rtai_fifos
rtai_up
rtai_lxrt
rtai_hal
rtai_sched
rtai_smi
rtai
rt_mem_mgr
adeos
rtl_time
rtl_sched
rtl_posixio
rtl_fifo
rtl
mbuff

the path starts with one of:
/lib/modules
/usr/realtime

and the extension is one of:
.ko

or the module is in the directory /usr/realtime-2.6.32-122-rtai/modules/emc2

OR

/usr/bin/emc_module_helper remove module

where module is one of the modules listed above.

1444
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components
ERROR: Module hal_lib does not exist in /proc/modules
ERROR: Module rtapi does not exist in /proc/modules

Kernel message information:
[ 23.351290] I-pipe: Domain RTAI registered.
[ 23.351299] RTAI[hal]: <3.8.1> mounted over IPIPE-NOTHREADS 2.6-03.
[ 23.351303] RTAI[hal]: compiled with gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) .
[ 23.351392] RTAI[hal]: mounted (IPIPE-NOTHREADS, IMMEDIATE (INTERNAL IRQs DISPATCHED), ISOL_CPUS_MASK: 0).
[ 23.351396] PIPELINE layers:
[ 23.351400] f976be20 9ac15d93 RTAI 200
[ 23.351404] c085cb20 0 Linux 100
[ 23.389742] RTAI[malloc]: global heap size = 2097152 bytes, <BSD>.
[ 23.390181] RTAI[sched]: IMMEDIATE, MP, USER/KERNEL SPACE: <with RTAI OWN KTASKs>, kstacks pool size = 524288 bytes.
[ 23.390190] RTAI[sched]: hard timer type/freq = APIC/12468990(Hz); default timing: periodic; linear timed lists.
[ 23.390196] RTAI[sched]: Linux timer freq = 250 (Hz), TimeBase freq = 2793049000 hz.
[ 23.390200] RTAI[sched]: timer setup = 999 ns, resched latency = 2943 ns.
[ 23.390308] RTAI[usi]: enabled.
[ 23.464882] RTAI[math]: loaded.
[ 24.209689] RTAI[math]: unloaded.
[ 24.245484] SCHED releases registered named ALIEN RTGLBH
[ 24.276396] RTAI[malloc]: unloaded.
[ 24.376020] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[ 24.380246] I-pipe: Domain RTAI unregistered.
[ 24.380356] RTAI[hal]: unmounted.
Last edit: 24 May 2012 03:55 by Banana Jack.

Please Log in or Create an account to join the conversation.

More
24 May 2012 08:44 #20318 by ArcEye
Hi

/usr/bin/emc_module_helper: Invalid usage with args: insert /usr/realtime-2.6.32-122-rtai/modules/linuxcnc/rtapi.ko

My fault, I am running 2.5 and you obviously are not

Change the line in the rtai.conf
RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/linuxcnc
to
RTLIB_DIR=/usr/realtime-2.6.32-122-rtai/modules/emc2

i don't know if there's a better way...it wouldn't let me actually put files in

use sudo

Open a terminal and enter sudo gedit and you will get an editing session that allows you to edit anything
Enter sudo mc or whatever filemanager you use,and you will be able to copy, replace, delete at will.

i don't actually know what those numbers mean...i may have just put them in myself while setting up.

Try to find your drives here or search for a spec sheet for them.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Stepper_Drive_Timing

so you think i should drop my acceleration?

Yes, your velocity is 1" / sec which is 5ft / min, this is pretty much what my small stepper mill is set to (25mm in my case)

However your STEPGEN_MAX_ACCEL is 37.5"/sec/sec which equates to 952mm . My mill runs smoothly with acceleration of 20mm/sec/sec.

I would just set your acceleration to 2" / sec to start with and then tune to suit

The thing that is going to affect your figures is the slow timing for the driver and the huge SCALE factor.
The first will limit the number of steps per second you can generate and the latter will require a huge number of steps to get anywhere.

Even if you have very fine ballscrews and high gearing on the stepper, I would guess you must have set micro-stepping very high, I would suggest that anything over 8:1 (1/8th step) is unnecessary and counter-productive and I rarely use higher than 4:1 (1/4).
One good reason for that, is that anything higher is interpolated positioning and no matter how good the driver it is far from precise.

Hopefully it will run now

regards

Please Log in or Create an account to join the conversation.

More
24 May 2012 17:45 #20345 by Banana Jack
thank you good sir.
i'm glad i got all that cleared up.
now i'm back to where i started...i'm getting X Error of failed request: BadLength (poly request too large or internal Xlib length error) again...i'll look more into that problem when i get home.

Please Log in or Create an account to join the conversation.

More
24 May 2012 23:33 #20351 by pfred1
I did a search on your error message, "X Error of failed request: BadLength (poly request too large or internal Xlib length error)" and it looks like your version of X Window is broken. It can be fixed by running your update manager. That is if you can still update the version you are running. As root run:

# aptitude update

# aptitude safe-upgrade

and if that works it should fix your problem, But it may make new problems for you too. Many that use LinuxCNC say never to upgrade but I'm not seeing any other way you can fix this. There are other ways, but I'm not seeing any other way you can fix this if you know what I mean. Because those other ways that I can think of are very involved.

Anyhow good luck.

Please Log in or Create an account to join the conversation.

More
25 May 2012 00:05 #20352 by andypugh
pfred1 wrote:

Many that use LinuxCNC say never to upgrade


You shouldn't upgrade the Linux version, as LinuxCNC is very dependent on a specific kernel.

However you can (and should) _update_ things.

Please Log in or Create an account to join the conversation.

More
25 May 2012 08:14 #20376 by ArcEye
Hi

Finally found this
bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/877905
which is what pfred1 is referring to

Looks like a fix has been made for Lucid, and far from upgrading, it is actually a forced downgrade of xorg to remove the element introduced in the previous update,
that caused the error with GLX!

Whatever the semantics, doing as he said should rectify the packages and allow you to run GLX programs (Axis) again

You should be able to do it by running the Update Manager, but check the actual packages to be installed first.
(Just don't want any linux kernel, kernel modules etc entries.)
I did it yesterday on another box and did notice xorg was listed

regards

Please Log in or Create an account to join the conversation.

More
25 May 2012 15:22 #20392 by pfred1
andypugh wrote:

pfred1 wrote:

Many that use LinuxCNC say never to upgrade


You shouldn't upgrade the Linux version, as LinuxCNC is very dependent on a specific kernel.

However you can (and should) _update_ things.


Thanks for clearing that up Andy. I just didn't want them to hose their system, then say I didn't tell them it might happen. Because it might. Then again it isn't like it is working now.

Please Log in or Create an account to join the conversation.

More
25 May 2012 15:35 #20393 by pfred1
ArcEye wrote:

Hi

Finally found this
bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/877905
which is what pfred1 is referring to

Looks like a fix has been made for Lucid, and far from upgrading, it is actually a forced downgrade of xorg to remove the element introduced in the previous update,
that caused the error with GLX!

Whatever the semantics, doing as he said should rectify the packages and allow you to run GLX programs (Axis) again

You should be able to do it by running the Update Manager, but check the actual packages to be installed first.
(Just don't want any linux kernel, kernel modules etc entries.)
I did it yesterday on another box and did notice xorg was listed

regards


LinuxCNC isn't mainstream Linux so there seem to be more pitfalls trying to use it than there normally are. Caveat emptor!

Pro Tip: Run aptitude in a terminal then save the output for reference if some things don't work out. I still need to improve my package-fu here, but I'm getting better lately. When I really delve into it, it is quite complex.

Please Log in or Create an account to join the conversation.

Time to create page: 0.104 seconds
Powered by Kunena Forum