RE: [Linux-hls-devel] Processes freezing up
Status: Pre-Alpha
Brought to you by:
lucabe
|
From: Paul K. <pko...@au...> - 2003-09-04 01:29:48
|
Hi Luca/John (and anyone else who's listening), To answer one question it looks like 5 seconds pass before the timer bug message appears. Sep 3 18:50:17 wally kernel: hls_ctl: Moving to res1 Sep 3 18:50:17 wally kernel: ...and setting the parameters! Sep 3 18:50:22 wally kernel: bug: kernel timer added twice at e24c1689 I don't know if it's relevant but we use the RTC to generate 1 ms (1 kHz) interrupts to our process. I assume that the 1 kHz kernel timer is generated by a different timer (the PIC/APIC?) I'm a little confused by the different timing mechanisms and timer-related patches (e.g. hi-res). We tried to specify a CPU reservation of 5ms out of 6.625ms. Before handballing to Tony I previously tested a "simulation" using hourglass (v0.6) to check on interrupt latency and deadline misses. Typing:=20 hourglass -n 1 -t 0 -rh 5ms 6.625ms -w LAT while simultaneously running top with update period 0.01 gave latencies of around 1.3ms hourglass -n 1 -t 0 -rh 5ms 6.625ms -w LAT -i RTC while simultaneously running top with update period 0.01 gave latencies of around 0.3ms =20 hourglass -n 5 -t 0 -rh 5ms 6.625ms -w PERIODIC 4ms 6.625ms -t 1 -p RTHIGH -w PERIODIC 1ms 10ms=20 showed that task 0 met all its deadlines but 1 (missed 1 at the beginning, a synchronisation/startup problem still?) [Aside: from this I take it that CPU reservations are stronger than SCHED_RR/SCHED_FIFO? With the latest talk about linux tasks vs HLS tasks, what is the relationship between HLS round-robin and linux's SCHED_OTHER, SCHED_FIFO and SCHED_RR? Do SCHED_OTHER tasks -> HLS round-robin? What about SCHED_RR/SCHED_FIFO tasks? Is that what you're grappling with at the moment, thinking about a HLS rt scheduler? Where does it fit in the default HLS hierarchy? Do any of these questions make sense?!]=20 Based on the third simulation, I would've thought our application would be okay. However it continues to show missed deadline problems. It could be we need to revisit reservation requirements, but I'm also keen to understand interrupt latency issues and scheduling issues. Regards, Paul Koufalas Senior Communications Engineer AUSPACE Limited Level 1 Innovation House Technology Park MAWSON LAKES SA 5095 AUSTRALIA T +61 8 8260 8236 F +61 8 8260 8226 M +61 404 837 122 www.auspace.com.au This email is for the intended addressee only. If you have received this e-mail in error, you are requested to contact the sender and delete the e-mail. Nothing in this email shall bind Auspace Limited in any contract or obligation. =20 -----Original Message----- From: Tony Lupoi=20 Sent: Wednesday, September 03, 2003 7:00 PM To: lin...@li... Subject: [Linux-hls-devel] Processes freezing up Hi Luca/John, =20 I'm a work colleague of Paul Koufalas and have been looking with him at running our application with the HLS scheduler. =20 I've encountered an issue where processes seem to freeze up after running for any amount of time. Sometimes it's my application and I've also noticed it happen with top. =20 I've included the dmesg output below. =20 HLS MP initializing (HLS_DBG_PRINT_LEVEL =3D 1). [-1961706252], 833 : sched 'ROOT' registered in slot 0 [-1885129302], 833 : sched 'JOIN' registered in slot 1 [-1808565821], 833 : sched 'TH' registered in slot 2 [-1734729187], 833 : sched 'RR' registered in slot 3 [-1660892643], 833 : sched 'PS' registered in slot 4 [-1587056079], 833 : sched 'RES' registered in slot 5 already PRIVATE_DATA !=3D NULL??? already PRIVATE_DATA !=3D NULL??? hls_ctl: Moving to res1 ...and setting the parameters! bug: kernel timer added twice at e24c1689. HLSUnblockThreadHook --- WAI =3D 2 [512] HLSUnblockThreadHook --- WAI =3D 2 [512] HLS ERROR: Task 687 has rt_priority =3D 100 and state =3D 1 HLSUnblockThreadHook --- WAI =3D 5 [512] HLSUnblockThreadHook --- WAI =3D 5 [512] HLS ERROR: Task 687 has rt_priority =3D 100 and state =3D 1 HLS ERROR: Task 687 has rt_priority =3D 100 and state =3D 1 HLSUnblockThreadHook --- WAI =3D 5 [512] HLSUnblockThreadHook --- WAI =3D 5 [512] HLS ERROR: Task 687 has rt_priority =3D 100 and state =3D 1 HLS ERROR!!! Task state changed during the hook??? 0 !=3D 1!!! Correcting... HLS ERROR: Task 512 has rt_priority =3D 100 and state =3D 1 HLS ERROR: Task 512 has rt_priority =3D 100 and state =3D 0 HLS ERROR: Task 687 has rt_priority =3D 100 and state =3D 1 HLSUnblockThreadHook --- WAI =3D 5 [512] HLSUnblockThreadHook --- WAI =3D 5 [512] HLS ERROR: Task 687 has rt_priority =3D 100 and state =3D 1 HLS ERROR: Task 507 has rt_priority =3D 100 and state =3D 1 HLSUnblockThreadHook --- WAI =3D 5 [512] HLSUnblockThreadHook --- WAI =3D 5 [512] HLS ERROR: Task 507 has rt_priority =3D 100 and state =3D 1 =20 Here are the processes that are in error: =20 root 687 685 0 18:37 ? 00:00:00 in.telnetd: dm3 root 507 1 0 18:37 ? 00:00:00 syslogd -m 0 root 512 1 0 18:37 ? 00:00:00 klogd -x =20 On a previous run, I was seeing error messages with the init process, ie .. =20 Sep 3 17:58:16 wally kernel: HLS ERROR: Task 1 has rt_priority =3D 100 and state =3D 1 Sep 3 17:58:16 wally kernel: HLS ERROR: Task 1 has rt_priority =3D 100 and state =3D 1 Sep 3 17:58:16 wally kernel: HLSUnblockThreadHook --- WAI =3D 5 = [511] Sep 3 17:58:16 wally kernel: HLSUnblockThreadHook --- WAI =3D 5 = [511] Sep 3 17:58:16 wally kernel: HLS ERROR: Task 1 has rt_priority =3D 100 and state =3D 1 Sep 3 17:58:16 wally kernel: HLS ERROR!!! Task state changed during the hook??? 0 !=3D 1!!! Correcting... =20 And also, when my process freezes, I'm unable to kill it, even with kill -9 <pid>! =20 I don't know if it's related, but I've also seen the following messages in the syslog: =20 Sep 3 18:50:17 wally kernel: hls_ctl: Moving to res1 Sep 3 18:50:17 wally kernel: ...and setting the parameters! Sep 3 18:50:22 wally kernel: bug: kernel timer added twice at e24c1689. =20 Any help would be appreciated, and let me know if I can enable any more debugging to give more information. =20 Thanks and regards, Tony |