rtapi_app: caught signal 11-dumping core

More
29 Jan 2024 10:21 - 04 Feb 2024 14:34 #291879 by bobwolf
Hello everyone
new week new problem ;-)
I modified the siggen.c program to make it do other things and if I put it in the .hal file where I activate it
loadrt IOdecoder input=16 output=16
the program runs and does its job
but if I put different input output numbers, for example
input=16 output=32
when I open LINUXCNC it gives me the error
rtapi_app: caught signal 11-dumping core
and it turns off my threads
with equal numbers it always works
I'll put the parts where the component is created where I think the error is
static int input;
static int output;
RTAPI_MP_INT(input, "number input channels");
RTAPI_MP_INT(output, "number output channels");
#define MAX_INPUT 32
#define MAX_OUTPUT 32
typedef struct {
hal_bit_t *clock; /* pin: clock */
hal_bit_t *data; /* pin: data */
hal_bit_t *l_input; /* pin: latch input */
hal_bit_t *l_output; /* pin: latch output */
hal_bit_t *in_com; /* pin: input common */
hal_float_t *frequency; /* pin: frequency */
hal_float_t *debug; /* pin: debug */
hal_bit_t *in_bit[MAX_INPUT];
hal_bit_t *out_bit[MAX_OUTPUT];
double index; /* position within output cycle */
} hal_IOdecoder_t;
/* pointer to array of IOdecoder_t structs in shared memory, 1 per gen */
static hal_IOdecoder_t *IOdecoder_array;
/* other globals */
static int comp_id;        /* component ID */

static int export_IOdecoder(int num, hal_IOdecoder_t * addr,char* prefix);
static void calc_IOdecoder(void *arg, long period);
int rtapi_app_main(void) {
int n, retval, i;
int howmany;
n=0;
/* have good config info, connect to the HAL */
    comp_id = hal_init("IOdecoder");
    if (comp_id < 0) {
    rtapi_print_msg(RTAPI_MSG_ERR, "IOdecoder: ERROR: hal_init() failed\n");
    return -1;
    }
/* allocate shared memory for IOdecoder data */
howmany = 1;
IOdecoder_array = hal_malloc(howmany * sizeof(hal_IOdecoder_t));
if (IOdecoder_array == 0) {
    rtapi_print_msg(RTAPI_MSG_ERR, "IOdecoder: ERROR: hal_malloc() failed\n");
    hal_exit(comp_id);
    return -1;
}
/* export variables and functions for each IOdecoder */
char buf[HAL_NAME_LEN + 1];
rtapi_snprintf(buf, sizeof(buf), "IOdecoder");
retval = export_IOdecoder(n, &;(IOdecoder_array[n]),buf);
rtapi_print_msg(RTAPI_MSG_INFO,
    "IOdecoder: installed %d input and %d output\n", input, output);
    hal_ready(comp_id);
    return 0;
}
static int export_IOdecoder(int num, hal_IOdecoder_t * addr,char* prefix)
{
int retval; int i=0; /* export pins */
for (i = 0; i < input; i++) {
    retval = hal_pin_bit_newf(HAL_OUT, &;(addr->in_bit[i]), comp_id, "%s.input.%02i", prefix, i);
        if (retval != 0) {
            return retval;
       }
    *(addr->in_bit[i]) = 0;
}
for (i = 0; i < output; i++) {
    retval = hal_pin_bit_newf(HAL_IN, &;(addr->out_bit[i]), comp_id, "%s.output.%02i", prefix, i);
    if (retval != 0) {
        return retval;
    }
    *(addr->out_bit[i]) = 0;
}
/* export function for this loop */
char support[HAL_NAME_LEN + 1];
rtapi_snprintf(support, sizeof(support), "%s.update", prefix); retval = hal_export_funct(support, calc_IOdecoder, &;(IOdecoder_array[num]), 0, 0, comp_id);
if (retval != 0) {
    rtapi_print_msg(RTAPI_MSG_ERR, "IOdecoder: ERROR: update funct export failed\n");
    hal_exit(comp_id);
    return -1;
}
return 0;
}

naturally there are other lines in the program... I only wrote these so as not to clog up the post too much... if you want I'll share the whole program[/i][/i][/i][/i]
Last edit: 04 Feb 2024 14:34 by andypugh.

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

More
30 Jan 2024 20:44 #292013 by bobwolf
Replied by bobwolf on topic rtapi_app: caught signal 11-dumping core
can anyone help me?

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

  • andypugh
  • andypugh's Avatar
  • Away
  • Moderator
  • Moderator
More
04 Feb 2024 14:40 #292401 by andypugh
Replied by andypugh on topic rtapi_app: caught signal 11-dumping core
Does it create the HAL pins and the function? If it does, then the error is probably in the realtime function, which I don't see in your posted code.

Errors like this generally indicate a write outside the bounds of an array.
The following user(s) said Thank You: bobwolf

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

More
04 Feb 2024 15:37 #292409 by jmelson
Replied by jmelson on topic rtapi_app: caught signal 11-dumping core
I would recommend running memtest86, which is part of the install on the PC versions of LinuxCNC. Of course, this may well be a coding vulnerability on that particular HAL component, maybe somebody else could test it. I don't see the error on a quick look.
Jon
The following user(s) said Thank You: bobwolf

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

More
05 Feb 2024 19:00 #292550 by bobwolf
Replied by bobwolf on topic rtapi_app: caught signal 11-dumping core
I found the error... thanks for directing me to understand where to look... in the loop at a certain point I was going to write a pin that didn't exist... as if it were a for loop in which I was wrong to give it the parameter end of loop
now it also works with input != output
A thousand thanks
ciao
Roberto
The following user(s) said Thank You: tommylight

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

More
24 Mar 2024 03:46 - 24 Mar 2024 03:46 #296611 by RJB510
Replied by RJB510 on topic rtapi_app: caught signal 11-dumping core
Hi everyone, 
I'm also experiencing this same issue. 
I've just upgraded from 2.8 and installed a fresh version of Linuxcnc 2.9.2 and when going through stepconf it won't let me test the motors and when i load Axis interface or QTdragon, it's immediately giving me the error: RTAPI_APP: Caught Signal 11 - Dumping Core.

Any recommendations? Try another fresh installation?

The rest of the system seems to be working correctly, but unable to use the machine. 

Cheers
Last edit: 24 Mar 2024 03:46 by RJB510.

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

More
24 Mar 2024 15:14 #296623 by EricKeller
Replied by EricKeller on topic rtapi_app: caught signal 11-dumping core
I'm sure there are better methods of logging errors, but I would open a terminal window and start linuxcnc from there. There will be error messages in the terminal window so you can get a better idea where this error is occurring

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

More
24 Mar 2024 16:47 - 24 Mar 2024 16:57 #296628 by EricKeller
Replied by EricKeller on topic rtapi_app: caught signal 11-dumping core
I guess this was a bad suggestion, you are using a parport? Mesact only works with Mesa interfaces.
Can you give us more information about your system?  I assume you had motion with the previous install?



You can also try mesact:
gnipsel.com/linuxcnc/mesact/install.html

I forget which board you have
Last edit: 24 Mar 2024 16:57 by EricKeller.
The following user(s) said Thank You: RJB510

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

More
24 Mar 2024 21:21 #296650 by RJB510
Replied by RJB510 on topic rtapi_app: caught signal 11-dumping core
In my particular instance, Not the OP's) I was using the machine on the same hardware for 18 months using v2.8.4 before upgrading to 2.9.2.

I use a parallel port, not Mesa card. Opening a terminal if it does logging like devtools or similar from webbrowser might help pinpoint the issue. But I've noticed that I can't even move the machine or test the axis even when going through the initial setup.
The pinout of the board is all correct, no changes to hardware but I can't even 'Test this axis' when setting up the machine.

I had some trouble installing it, it would hang up when looking for a network and at one point had errors when creating the partition. I tried a few times to install and had to bypass a few steps like the network config.

So I'm wondering if the image was corrupted somehow?
Perhaps the RT kernel isn't compatible and I should go back to a different one?

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

More
24 Mar 2024 22:03 #296654 by EricKeller
Replied by EricKeller on topic rtapi_app: caught signal 11-dumping core
The installer is not without problems. But that actually goes back to Debian. The problems you had are not an indicator of a problem, I don't think, but you can run a checksum on your image.

If it's not moving in stepconf, you probably are getting an error before then as lcnc starts up.

There is a fairly recent RTAI kernel that will probably give you better latency. You need a different build of lcnc with that. Instructions on this page:
linuxcnc.org/docs/html/getting-started/g...#cha:Installing-RTAI

You should be able to boot into either kernel.

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

Time to create page: 0.078 seconds
Powered by Kunena Forum