-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
count= and names= are mutually exclusive and2: rtapi_app_main: Invalid argument (-22) #3205
Comments
that looks really odd. are you sure that is a clean checkout of 2.9 branch and cooling.hal is unmodified? is this using userspace rt preempt? |
You're three for three! |
I'n not sure what to make of that comment. If the problem is gone please close the ticket. If this is still an issue we should follow up because that would mean there is a problem in halcompile or infrastructure and that would pop up on other platforms sooner or later. |
What I meant is that you're correct on all three points. Clean checkout of 2.9 branch, cooling.hal is unmodified, and I am using PREEMPT_RT. |
Can you try "loadrt and2", "loadrt and2 count=2" and "loadrt and2 names=and1,and2" in halrun? can you attach /src/objects/hal/components/and2.c from your build and maybe and2.so? |
"loadrt and2", "loadrt and2 count=2" and "loadrt and2 names=and1,and2" all work just fine.
Unable to attach |
I can't reproduce this on Debian. But I am actually puzzled as to how it is managing to work. sim/axis/axis.ini loads cooling.hal, and that has "loadrt and count=1" And it turns out that this is the only "loadrt and2" in the whole config, which is why it works. Otherwise the config would need to use "TWOPASS" and "names=" If you change line 2 of cooling.hal to names= does it change anything? I tried enabling TWOPASS on my system, though, and nothing changed. Does the initial HAL loading say
Or
If you add a "show funct" at the very top of cooling.hal, does the output show the presence of any other "and2" components? |
[...]
that source looks OK. regarding the .so, that is unfortunate. can you post output of it is a bit puzzling that |
Sorry for the late response. Adding "show funct" to cooling.hal output:
Changing count= to names= in cooling.hal returns:
Output of your
|
I'm out of ideas. Maybe something is corrupting the shared memory segment. Somebody will have to look at this in a debugger, unfortunately I can't reproduce the issue. |
Here are the steps I follow to reproduce the issue:
This is what I expected to happen:
The LinuxCNC sim axis window to open.
This is what happened instead:
count= and names= are mutually exclusive
and2: rtapi_app_main: Invalid argument (-22)
./cooling.hal:2: waitpid failed /usr/bin/rtapi_app and2
./cooling.hal:2: /usr/bin/rtapi_app exited without becoming ready
./cooling.hal:2: insmod for and2 failed, returned -1
21472
Stopping realtime threads
Unloading hal components
and2: not loaded
:0: exit value: 255
:0: rmmod failed, returned -1
:0: unloadrt failed
It worked properly before this:
I know this probably isn't helpful but everything was working a year ago on Gentoo.
Information about my hardware and software:
lsb_release -a
): Gentoouname -a
): Linux gentoo-cnc 6.12.1-RT SMP PREEMPT_RT Sat Nov 30 07:34:26 CST 2024 x86_64 AMD Ryzen 7 2700X Eight-Core Processor AuthenticAMD GNU/Linuxscripts/get-version-from-git
): v2.9.3-92-g0cd93439be (latest 2.9 checkout)The text was updated successfully, but these errors were encountered: