Multicore merge problem tracker #1123

Open
ArcEye opened this Issue Feb 6, 2017 · 11 comments

Projects

None yet

3 participants

@ArcEye
ArcEye commented Feb 6, 2017 edited

This is the issue tracker to which any problems related to the merge of multicore code into the main repo, should be reported.

@machinekoder machinekoder reopened this Feb 15, 2017
@machinekoder

Is there any writeup of the changes? I had to modify several HAL configs and components to get the multicore branch working properly.

@pmcstone
pmcstone commented Feb 22, 2017 edited

#1145 This happened after update

@ArcEye
ArcEye commented Feb 23, 2017

Is there any writeup of the changes? I had to modify several HAL configs and components to get the multicore branch working properly.

Not yet. It would be helpful to know what you had to change though

@ArcEye
ArcEye commented Feb 24, 2017

From @pmcstone

This issue has been resolved by manually installing icomps. However now I ran into another issue with a custom driver/protocol for my IO hardware (communicates via USB to RS485) Please see attached files and error messages. Any help would be greatly appreciated since I am merely just a power user. Thanks

starting mklauncher... done
starting configserver... done
starting ./python/pmcsfile_service.py... done
starting machinekit... MACHINEKIT - 0.1
Machine configuration directory is '/home/pmcs/Downloads/pmcs-rt'
Machine configuration file is 'v6.ini'
Starting Machinekit...
io started
halcmd loadusr io started
done
hal/v6.hal:14: insmod failed, returned -1:
do_load_cmd: dlopen: /usr/lib/linuxcnc/rt-preempt/hal_p260c.so: undefined symbol: hal_exit
rpath=/usr/lib/linuxcnc/rt-preempt
See /var/log/linuxcnc.log for more information.
Shutting down and cleaning up Machinekit...
Traceback (most recent call last):
File "/home/pmcs/bin/estop.py", line 16, in
Traceback (most recent call last):
File "/home/pmcs/bin/mtc.py", line 15, in
time.sleep(2.00)
KeyboardInterrupttime.sleep(2.00)

KeyboardInterrupt
Cleanup done
Machinekit terminated with an error. You can find more information in the log:
/home/pmcs/linuxcnc_debug.txt
and
/home/pmcs/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal
stopping mklauncher... done
stopping configserver... done
stopping ./python/pmcsfile_service.py... done

Reply from @arceye

It indicates incorrect linkage in the build of the component.
Without the component code and knowing how it was built, unable to guess further

If hal_exit() did not exist, machinekit would not run, there are about 1230 binaries and libs linked against it.

Running nm -C hal_p260c | grep " U " from the dir it is in, will list all the symbols which are undefined. (U)
I would suspect a great deal more than just hal_exit()

hal_exit() is an inline accessor to halg_exit() contained in https://github.com/machinekit/machinekit/blob/master/src/hal/lib/hal.h#L379
So you may see references to halg_exit

@ArcEye
ArcEye commented Feb 24, 2017

From @pmcstone

Well I think I might of broke something very bad.......running the command nm -C hal_p260c | grep " U " gave this:

             U cfsetispeed@@GLIBC_2.2.5
             U cfsetospeed@@GLIBC_2.2.5
             U close@@GLIBC_2.2.5
             U hal_exit
             U hal_export_funct
             U hal_malloc
             U hal_param_bit_newf
             U hal_param_s32_newf
             U hal_pin_bit_newf
             U hal_pin_s32_newf
             U hal_ready
             U hal_xinit
             U ioctl@@GLIBC_2.2.5
             U memset@@GLIBC_2.2.5
             U open@@GLIBC_2.2.5
             U read@@GLIBC_2.2.5
             U rtapi_print_msg
             U rtapi_snprintf
             U rtapi_switch
             U strtok@@GLIBC_2.2.5
             U strtol@@GLIBC_2.2.5
             U tcdrain@@GLIBC_2.2.5
             U tcflush@@GLIBC_2.2.5
             U tcgetattr@@GLIBC_2.2.5
             U tcsetattr@@GLIBC_2.2.5
             U write@@GLIBC_2.2.5

Which seems like everything is undefined

Reply from @arceye

If you would like to 'donate' the driver, I can add it to the repo and it will get built properly, automatically
at any rebuild,

Just tested and

root@INTEL-i7:/usr/src/machinekit# DEBUG=5 realtime restart
root@INTEL-i7:/usr/src/machinekit# halcmd loadrt hal_p260c
:0: Realtime module 'hal_p260c' loaded
root@INTEL-i7:/usr/src/machinekit# halcmd show pin
Component Pins:
Comp Inst Type Dir Value Name Epsilon Flags linked to:
78 bit OUT FALSE hal_p260c.0.pin-01-in --l-
78 bit IN FALSE hal_p260c.0.pin-01-out --l-
78 bit OUT FALSE hal_p260c.0.pin-02-in --l-
78 bit IN FALSE hal_p260c.0.pin-02-out --l-
78 bit OUT FALSE hal_p260c.0.pin-03-in --l-
78 bit IN FALSE hal_p260c.0.pin-03-out --l-
78 bit OUT FALSE hal_p260c.0.pin-04-in --l-
78 bit IN FALSE hal_p260c.0.pin-04-out --l-
78 bit OUT FALSE hal_p260c.0.pin-05-in --l-
78 bit IN FALSE hal_p260c.0.pin-05-out --l-
78 bit OUT FALSE hal_p260c.0.pin-06-in --l-
78 bit IN FALSE hal_p260c.0.pin-06-out --l-
78 bit OUT FALSE hal_p260c.0.pin-07-in --l-
78 bit IN FALSE hal_p260c.0.pin-07-out --l-
78 bit OUT FALSE hal_p260c.0.pin-08-in --l-
78 bit IN FALSE hal_p260c.0.pin-08-out --l-
78 bit OUT FALSE hal_p260c.0.pin-09-in --l-
78 bit IN FALSE hal_p260c.0.pin-09-out --l-
78 bit OUT FALSE hal_p260c.0.pin-10-in --l-
78 bit IN FALSE hal_p260c.0.pin-10-out --l-
78 bit OUT FALSE hal_p260c.0.pin-11-in --l-
78 bit IN FALSE hal_p260c.0.pin-11-out --l-
78 bit OUT FALSE hal_p260c.0.pin-12-in --l-
78 bit IN FALSE hal_p260c.0.pin-12-out --l-
78 bit OUT FALSE hal_p260c.0.pin-13-in --l-
78 bit IN FALSE hal_p260c.0.pin-13-out --l-
78 bit OUT FALSE hal_p260c.0.pin-14-in --l-
78 bit IN FALSE hal_p260c.0.pin-14-out --l-
78 bit OUT FALSE hal_p260c.0.pin-15-in --l-
78 bit IN FALSE hal_p260c.0.pin-15-out --l-
78 bit OUT FALSE hal_p260c.0.pin-16-in --l-
78 bit IN FALSE hal_p260c.0.pin-16-out --l-
78 s32 IN 0 hal_p260c.0.rx_cnt_error --l-
78 bit OUT FALSE hal_p260c.0.rx_comm_error --l-
78 bit OUT FALSE hal_p260c.0.rx_perm_error --l-
78 s32 OUT 0 hal_p260c.refresh.time ----
78 s32 I/O 0 hal_p260c.refresh.tmax ----
78 bit OUT FALSE hal_p260c.refresh.tmax-inc ----
78 bit OUT FALSE hal_p260c.rx_comm_error --l-
78 bit OUT FALSE hal_p260c.rx_perm_error --l-
78 bit IN FALSE hal_p260c.rx_reset_error --l-
78 s32 IN 0 hal_p260c.sys_max_read --l-
78 s32 IN 0 hal_p260c.sys_max_write --l-
78 s32 IN 0 hal_p260c.sys_writecnt --l-

I suspect you may have been trying to use the old module and not re-built to account
for linkage relocations, this will solve it in future.

@ArcEye
ArcEye commented Feb 24, 2017

Above 2 entries to preserve items in forum posts

@pmcstone

Yes I am willing to donate it. Thanks for everything Arc!

@machinekoder

@ArcEye will you integrate the driver?

@ArcEye
ArcEye commented Feb 24, 2017

Just done so at #1150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment