Problem with FIFO's (maybe with RTAI/Adeos) at 2.6.x branch
Hi.
After porting some stable worked on 2.4 apps to 2.6 I've noticed
spurious traps N14 in legacy rtf_put function. While investingating this problem I've found an testcase - take an kernel latency example and simple add somewere at latency-module.c big global variable :
static char unused[1024 * 1024 * 8];
and run the example - you will receive something like :
....
RTAI 3.1-test3 mounted over Adeos 2.6r5/x86. RTAI[malloc] loaded (global heap size=131072 bytes).
***** STARTING THE UP REAL TIME SCHEDULER WITH LINUX ***** ***** FP SUPPORT AND READY FOR A PERIODIC TIMER ***** ***<> LINUX TICK AT 1000 (HZ) <>***
***<> CALIBRATED CPU FREQUENCY 2520162000 (HZ) <>***
***<> CALIBRATED TIMER-INTERRUPT-TO-SCHEDULER LATENCY 2688 (ns) <>*** ***<> CALIBRATED ONE SHOT SETUP TIME 2010 (ns) <>***
***<> COMPILER: gcc version 3.3.3***
Default Trap Handler: vector 14: Suspend RT task ef8b8720
.......
# lsmod Module Size Used by latency_rt 8395792 0 rtai_fifos 45900 3 latency_rt rtai_up 57272 2 latency_rt,rtai_fifos rtai_hal 20724 3 latency_rt,rtai_fifos,rtai_up .....
Tested with latest vesuvio cvs, UP, different kernel configs and two
different gcc - 3.3.3 and 3.4.0, hardware is ASUS P4 notebook L3H on SIS 96x chipset. If someone interested can supply any additional info.
Rus
Quoted 33 lines · Rus V. Brushkoff
Hi.After porting some stable worked on 2.4 apps to 2.6 I've noticed
spurious traps N14 in legacyrtf_putfunction. While investingating this problem I've found an testcase - take an kernel latency example and simple add somewere atlatency-module.cbig global variable :static char unused[1024 * 1024 * 8];
and run the example - you will receive something like :
....
RTAI 3.1-test3 mounted over Adeos 2.6r5/x86. RTAI[malloc] loaded (global heap size=131072 bytes).***** STARTING THE UP REAL TIME SCHEDULER WITH LINUX ***** ***** FP SUPPORT AND READY FOR A PERIODIC TIMER ***** ***<> LINUX TICK AT 1000 (HZ) <>***
***<> CALIBRATED CPU FREQUENCY 2520162000 (HZ) <>***
***<> CALIBRATED TIMER-INTERRUPT-TO-SCHEDULER LATENCY 2688 (ns) <>*** ***<> CALIBRATED ONE SHOT SETUP TIME 2010 (ns) <>***
***<> COMPILER: gcc version 3.3.3***Default Trap Handler: vector 14: Suspend RT task
ef8b8720
.......# lsmod Module Size Used by latency_rt 8395792 0 rtai_fifos 45900 3 latency_rt rtai_up 57272 2 latency_rt,rtai_fifos rtai_hal 20724 3 latency_rt,rtai_fifos,rtai_up .....
Quoted 4 lines
Tested with latest vesuvio cvs, UP, different kernel configs and two
different gcc - 3.3.3 and 3.4.0, hardware is ASUS P4 notebook L3H on SIS 96x chipset. If someone interested can supply any additional info.
Uhoh... I've added this one to my check list. I don't have any clue right now, but anyway, thanks for reporting.
Quoted 2 lines
Rus
Signature · 1 line
Philippe.
On Wed, 16 Jun 2004, Philippe Gerum wrote:
:> Default Trap Handler: vector 14: Suspend RT task ef8b8720 :Uhoh... I've added this one to my check list. I don't have any clue :right now, but anyway, thanks for reporting.
My trace is rtf_put -> mbx_send_wp -> mbx_put -> copy_from_user()/memcpy()
Did you got the same ? I've got stable traps with large variable and spurios from small ones. Also traps depends from kernel image size (!), if you compile some drivers in for ex.
It'is interesting what is the maximum allowed linux kernel module size
(nearly 2Gb as for kernel space) ?
:
Rus
Quoted 33 lines · Rus V. Brushkoff
Hi.After porting some stable worked on 2.4 apps to 2.6 I've noticed
spurious traps N14 in legacyrtf_putfunction. While investingating this problem I've found an testcase - take an kernel latency example and simple add somewere atlatency-module.cbig global variable :static char unused[1024 * 1024 * 8];
and run the example - you will receive something like :
....
RTAI 3.1-test3 mounted over Adeos 2.6r5/x86. RTAI[malloc] loaded (global heap size=131072 bytes).***** STARTING THE UP REAL TIME SCHEDULER WITH LINUX ***** ***** FP SUPPORT AND READY FOR A PERIODIC TIMER ***** ***<> LINUX TICK AT 1000 (HZ) <>***
***<> CALIBRATED CPU FREQUENCY 2520162000 (HZ) <>***
***<> CALIBRATED TIMER-INTERRUPT-TO-SCHEDULER LATENCY 2688 (ns) <>*** ***<> CALIBRATED ONE SHOT SETUP TIME 2010 (ns) <>***
***<> COMPILER: gcc version 3.3.3***Default Trap Handler: vector 14: Suspend RT task
ef8b8720
.......# lsmod Module Size Used by latency_rt 8395792 0 rtai_fifos 45900 3 latency_rt rtai_up 57272 2 latency_rt,rtai_fifos rtai_hal 20724 3 latency_rt,rtai_fifos,rtai_up .....
Quoted 4 lines
Tested with latest vesuvio cvs, UP, different kernel configs and two
different gcc - 3.3.3 and 3.4.0, hardware is ASUS P4 notebook L3H on SIS 96x chipset. If someone interested can supply any additional info.
Found the gremlin. As suspected, this was due to the on-demand VM mapping resolution. RT tasks were triggering page faults caught in the real-time domain that caused them to be killed by the HAL. As you noticed, extending the size of the data section makes the odds of encountering this situation higher since the module is loaded into vmalloc'ed memory by the kernel. Fixed in the vesuvio CVS.
PS: this bug does not affect RTAI running over 2.4 kernels since Adeos for 2.4.x has a built-in fix for this.
Quoted 2 lines
Rus
Signature · 1 line
Philippe.
On Mon, 28 Jun 2004, Philippe Gerum wrote:
:> Default Trap Handler: vector 14: Suspend RT task ef8b8720 :Found the gremlin. As suspected, this was due to the on-demand VM :mapping resolution. RT tasks were triggering page faults caught in the :real-time domain that caused them to be killed by the HAL. As you :noticed, extending the size of the data section makes the odds of :encountering this situation higher since the module is loaded into :vmalloc'ed memory by the kernel. Fixed in the vesuvio CVS.
Thanks, will test today ;)
:
:PS: this bug does not affect RTAI running over 2.4 kernels since Adeos :for 2.4.x has a built-in fix for this.
Yes, this bug appeared while porting to 2.6 and I thought this was from
my wrong written app.
:
Rus
On Mon, 28 Jun 2004, Philippe Gerum wrote:
:Found the gremlin. As suspected, this was due to the on-demand VM
Tested ok - working like a sharm ;) By the way I tested withCONFIG_MODVERSIONS turned on (rem'ed in configure from vesuvio cvs) - no problems.
:
Rus