-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undetected armhf setuid issues in at least versions 0.4.20894 and 0.4.20868 (for emcapp python2 gui stuff) #324
Comments
I can confirm that this issue is not relevant for the arm64 packages. |
@the-snowwhite (@Holotronic, sorry I have just now noted that you opened the machinekit/machinekit-docs#321 with different account, and I am not sure which one are you using),
These packages should be available from the Machinekit/Machinekit repository: Python3-avahi and Libavahi-common-data and actually should be installed automatically as dependencies of the machinekit-hal* packages. But I actually have never tested them with real armhf hardware. Does it mean that they are not working?
The reason is that I haven't yet regenerated the
This is interesting. So can I understand it that the whole machinekit-hal package at version 0.4.20894 does not run on armhf architecture? @jallwine reported some time back the same thing, I recommended commenting out code in rtapi_app.cc, which now I can see was included in his latest patch, so that is the reason why it is now working. (That code - well, at least in my opinion - has no place in that place, it should complain lot lower in the module where I/O access is actually requested.) Can you try to comment it out and rebuild the package at the
It should be possible, but so far I haven't looked into it. (I have been procrastinating on the EMCApplication's issue, so...). But still it will need first the Python3 packaging in upstream LinuxCNC@master (they are doing it at the same time). The best way how to attack this is probably to create a new package for the whole |
@cerna sorry about the @Holotronic mishap I created that account for some research help work that unfortunately has to be in a private repo.
Sure: I can test out the armhf commenting out tomorrow, however I have been testing out the mklauncher, qtquickvcp, Cetus, MachinekitClient stuff out on my arm64 based Ultra96 so far without any success:
I suspect any armhf based approach will strand the same place. BTW: The qtquickvcp, python-hal and MachinekitClient stuff did make it past the monorepo Machinekit: Just before you stepped in armhf The arm64 mk-hal / mk-cnc combo was just made to work correctly and actually committed when unfortunately exactly then the plug was simultaneously pulled on the old build system's, so the arm64 packages were never built and distributed officially, likewise with any work in progress with arm64 mksocfpga building and packaging. |
about:
Edit:
before running mklauncher. However MachinekitClient is only able to find the file service and the rest of needed services are missing. |
I did the commenting out and rebuilt the mk-hal armhf packages and then the emcapplication and then ran it on linuxcnc ran the default axis sim after doing:
However stepconf and pncconf are no-go. Edit: |
Actually, that's a feature, not a bug. 😛 Both these programs are manipulating the HAL and as such both come under the LinuxCNC HAL implementation, not Machinekit-HAL.
Hmm, I understood it that the Both Travis and Drone Cloud are testing the
Hopefully we will be able to get it all working now too! 👍
You mean the EMCApplication requiring the 0.4.20868 Machinekit-HAL or Machinekit-HAL at 0.4.20868 state with that code commented out? BTW, can you merge pull requests? |
I meant
I think I can ... I just havn't been brave enough to try.. |
What does flawlessly mean ?
|
I got a step closer:
And then run a mklauncer run.py config
|
I am trying to get the Python based Machinekit-HAL application working and so far having a problem:
Based on the python-hal-seed (BTW, why these useful tutorials are not in the main Machinekit repository is beyond me, I discovered it just yesterday). Can you confirm that you are seeing the same problem? Or is your problem different? Looking back, you have probably different problem... |
Oh this is a normal problem you just have to:
with nano or some other text editor. |
Yes, but the real problem is actually hidden in:
Which comes from file Have no idea if @zultron or @rene-dev looked at this portion of code in their Python3 marathon. |
I only ported hal, and mentioned serveral times that the UIs will be broken after this. |
Sorry for pinging you then. This issue is on the line between HAL, RTAPI and UI, so I wasn't sure. This problem is caused by the string encoding changes in Python3 and can be rectified by few (BTW, I don't want to make you feel obliged in any way.) |
@cerna
same run with remote=1:
|
@cerna
I can get it to run just fine with machinekitclient |
A test run with a similar hal based mklauncher config
I don't know how to interpret the:
|
In machinekit#324 it became obvious, that changes in how strings are represented in Python 3 from legacy Python 2 caused that request through DBus to Avahi were rejected. Python Avahi module includes function 'string_array_to_txt_array', which transcodes Python strings into byte arrays. Only used on the TXT value, as all others seem to be working. (Minimal changes to just get working system.)
With applied patch from #325 on Debian Buster on amd64 with |
I tested your patch via hand editing:
anddemo works fine here both with and without the patch... that is python2
Python3 result both with and without patch is:
However the platform difference may be more than amd64 vs armhf/arm64 |
In machinekit#324 it became obvious, that changes in how strings are represented in Python 3 from legacy Python 2 caused that request through DBus to Avahi were rejected. Python Avahi module includes function 'string_array_to_txt_array', which transcodes Python strings into byte arrays. Only used on the TXT value, as all others seem to be working. (Minimal changes to just get working system.)
@cerna Ditto (I installed the newest cloudsmith packages on my soc). |
Well on second inspection I'll wait as there seems to be a test error: |
That error is unfortunately old news, I am tracking it here. (Usually all it needs is to restart the test, it is error in monotonic scheduling on systems, where elevated priorities are not possible. More in that thread.) Before I force pushed the branch again (Travis created two jobs in Github environment and only ran one, so the PR would keep hanging as all Github Actions/Travis-CI/Drone Cloud testings need to be green), it ran all OK. So, it should be fine. Merge on green. I would not put my head on the block for this, bur my theory is such: With the Python3 marathon, the cython bindings were changed and I would say that it become incompatible with Python2. So the newer version of Machinekit-HAL cannot be used with Python2, respective it starts failing as some files (modules) are Python2 compatible and some not. Then @machinekoder authored commits which @zultron included in PR #315 adding |
What shall I say: machinekit@mksocfpga-ob-ox:~/Hm2-soc_FDM/Cramps/HAL/OX$ python3 run.py I noticed there are online arm packages for the emc application however they are about 2 month old now so I guess they are tied to the latest(old) python2 based mk-hal commit (0.4.20868 ). Is there yet any python3 linuxcnc version that can be emc app (deb) packaged for mklauncer use ? |
No, there is the LinuxCNC/linuxcnc#943 draft pull request which can be made to work under Python3 (but I have no idea about mklauncher - it probably can all be made to work, it will just require effort).
These packages will take any machinekit-hal with higher version than 0.4 and will not work on the current Python3 Machinekit-HAL. Back when I built them I didn't realize that you need to limit the versions of Machinekit-HAL. (I can try to create draft merge of this in special pull request.) I will try to rebuild EMCApplication packages later today with limit to the Python2 version of Machinekit-HAL. (Plus build the special version of Machinekit-HAL for Python2 |
Problem with the python2 version is that it also requires work to get mklauncher functionality I cannot see how to get this to fly without setting up a separate mk-hal python2 branch/fork. So either which way (or both) there is work to do to restore full MachinekitClient Cnc and linuxcnc python2/3 based hal functionality. |
the scaling problem has been fixed a long time ago in linuxcnc, I cant remember how or when. |
I wonder why this "fix" doesn't reflect in the current emcapplication on my kdeneon 20.04 workstation with a 4k 52" monitor ? I's not that its tiny I just want to make it a little bit larger and found no way to do that on a ssh -XY setup. |
@cerna machinekit/EMCApplication#7 (comment) I can confirm that the new packages work on the DE0_Nano_Soc (armhf) with:
This issue can be closed |
Thank you for testing it, @the-snowwhite! |
In machinekit#324 it became obvious, that changes in how strings are represented in Python 3 from legacy Python 2 caused that request through DBus to Avahi were rejected. Python Avahi module includes function 'string_array_to_txt_array', which transcodes Python strings into byte arrays. Only used on the TXT value, as all others seem to be working. (Minimal changes to just get working system.)
Following the new guide for how to build EMCApplacation for armhf
I then built a fresh new mksocfpga armhf buster sd-image for testing on a DE0-Nano-SoC Kit/Atlas-SoC Kit
Installing the debs I also had to include:
python3-avahi_0.8-3_armhf.deb
libavahi-common-data_0.8-3_armhf.deb
from "Bullseye"
For some reason emcapplication_2.9.0-pre0.23507.git1dcbe183f-buster_armhf.deb asked for machinekit-hal_0.4.20996
so I wgot that and ended up with:
That I installed with:
testing then turned into an immediate terrible experience:
running linuxcnc gave some error messages (about BACKGROUND color) that could be remedied with:
Then linuxcnc gui ran (in a ssh -X terminal) however selecting the axis sim configuration lead to a foul error loop:
Investigating further I found out running halrun gave error messages: (with both version 0.4.20894 and 0.4.20868)
However not with the latest version:0.4.20996
same reuult for:
Since the guide specifies max or = 0.4.20868 the setuid problem in these packages is a big showstopper.
On the other side I prefer the Machineface gui qtquickvcp gui setup instead of any builtin linuxcnc gui's so I wonder if its possible to
build against 0.4.20996 and ignore the builtin lcnc gui's and get the Machineface gui to work instead ?
The text was updated successfully, but these errors were encountered: