Hello,
I'm encountering a strange problem that freezes my whole system when I try to start CPUWatcher (or CPUDock that is based on CPUWatcher) with the debug kernel activated with "MUNGE SERIAL DEBUGLEVEL=5" on CFE.
On my X1000 WITHOUT debug kernel, all is fine, I can start CPUWatcher/CPUDock without problem.
Is this only the X1000 debug kernel who is affected or another systems too freeze in the same circunstance ?
To reproduce :
1) if used, remove CPUDock from your Amidock (LittleBrother too as it seems that it crash with debug kernel too, YAM too when I send 2 mails, at least for me)
2) download CPUWatcher, here :
http://www.os4depot.net/share/utility/w ... atcher.lha
sources available here :
http://www.os4depot.net/share/utility/w ... er-src.lha
3) activate debug kernel in Sys:Kickstart/KickLayout
";MODULE Kickstart/kernel
MODULE Kickstart/kernel.debug"
4) Cold reboot to enable MUNGE SERIAL EBUGLEVEL=5 in CFE, OF or UBOOT
for CFE : setenv -p os4_commandline "MUNGE SERIAL DEBUGLEVEL=5"
5) on OS4, launch several time CPUWatcher from workbench
for me it freezes the first time or the 2nd, 3th time
if you encounter a DSI instead of a freeze, try to increase the stack of CPUWatcher to 100000
6) Could you say me if it freezes your system or not ?
For Raziel and me, it freezes our x1000.
For a SAM460 user, no freeze in the same condition (by increasing the stack size).
Thank you for your time spent on this test, it could be useful for me to know if CPUDock has a bug or not on x1000.
Guillaume
edit : On my serial debug, I have these messages
[[HAL_DfltTrapHandler] *** Warning: Fatal exception in task 0x518F5A30
(Uuno, etask = 0xDFD029A0) at ip 0x7F9BB678
[HAL_Alert] ALERT! 0x80000003
Dump of context at 0xDF6B7000
Trap type: DSI exception
Machine State (raw): 0x1000000000003032
Machine State (verbose): [Hyper] [Super] [FPU on] [IAT on] [DAT on]
[Recoverable]
Temporary stack trace:
#0: 0x7F9BB678
#1: in module kernel.debug+0x00004BA4 (0x02004BA4)
Crashed task: UunoskWithUpdate] Aborting to prevent infinite recursion
[HAL_DfltTrapHandler] *** Warning: Fatal exception in task 0x518F5A30
(Uuno, etask = 0xDFD029A0) at ip 0x7F9BB678
[HAL_Alert] ALERT! 0x80000003
[HAL_SuspendTaskWithUpdate] *** Warning: Suspending an already suspended
task
[HAL_SuspendTaskWithUpdate] Aborting to prevent infinite
recursionrapHandler] *** Warning: Fatal exception in task 0x518F5A30
(Uuno, etask = 0xDFD029A0) at ip 0x7F9BB678
[HAL_Alert] ALERT! 0x80000003
[HAL_SuspendTaskWithUpdate] *** Warning: Suspending an already suspended
task
[HAL_SuspendTaskWithUpdate] Aborting to prevent infinite
recursion
...
... in loop until I poweroff my x1000
...
[HAL_DfltTrapHandler] *** Warning:on i task 0x518F5A30 (Uuno, etask =
0xDFD029A0) at ip 0x7F9BB678
[HAL_Alert] ALRT! 0x80000003
[HAL_SuspendTaskWithUpdate] *** Warning: Suspending an already suspended
task
[HAL_SuspendTaskWithUpdate] Aborting to prevent infinite
recursion
[SOLVED] OS freeze when using debug kernel with CPU Watcher
[SOLVED] OS freeze when using debug kernel with CPU Watcher
Last edited by zzd10h on Thu Jun 26, 2014 8:10 am, edited 1 time in total.
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
Re: OS freeze when using debug kernel with CPU Watcher
...and to keep every possible information in one place, here are my two crashlogs (captured over serial because it froze solid)
X1000 here: SERIAL MUNGE DEBGUGLEVEL=5 set and using kernel.debug
Serial log with CPUWatcher
Serial log with CPUDock.docky
Both of them caught either adding/removing to AmiDock (CPUDock.docky) or starting/closing on Workbench (CPUWatcher)
As you can see it's the exact same crash (that's good because it's based on the same code)
Now to find that piece of offending code...
Once (because it only freeze in one of three tries) the docky was added to AmiDock it will freeze 75% of the reboots, so it's a severe problem for me (uninstalled the docky for now)
X1000 here: SERIAL MUNGE DEBGUGLEVEL=5 set and using kernel.debug
Serial log with CPUWatcher
Hidden Text - Click to Show :
Hidden Text - Click to Show :
As you can see it's the exact same crash (that's good because it's based on the same code)

Now to find that piece of offending code...
Once (because it only freeze in one of three tries) the docky was added to AmiDock it will freeze 75% of the reboots, so it's a severe problem for me (uninstalled the docky for now)
- Thomas Frieden
- AmigaOS Core Developer
- Posts: 147
- Joined: Fri Dec 10, 2010 3:21 pm
Re: OS freeze when using debug kernel with CPU Watcher
The amount of ABADCAFE in the log somewhat points to usage of uninitialized memory
Sent from my Xperia Z1
Sent from my Xperia Z1
Re: OS freeze when using debug kernel with CPU Watcher
Thank you for your reply,
yes, but why does it works on a non debug kernel and, overall, why does it seems to work on a SAM460 with the debug kernel ?
yes, but why does it works on a non debug kernel and, overall, why does it seems to work on a SAM460 with the debug kernel ?
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE
Re: OS freeze when using debug kernel with CPU Watcher
Little update...
I have taken out MUNGE from my os4_commandline as it seems to produce lots of random errors/crashes with random programs.
Those are gone after MUNGE was removed.
It still freezes when using the debug kernel though
I have taken out MUNGE from my os4_commandline as it seems to produce lots of random errors/crashes with random programs.
Those are gone after MUNGE was removed.
It still freezes when using the debug kernel though
- javierdlr
- Beta Tester
- Posts: 389
- Joined: Sun Jun 19, 2011 11:13 pm
- Location: Donostia (GUIPUZCOA) - Spain
- Contact:
Re: OS freeze when using debug kernel with CPU Watcher
Seems Guillaume solved by adding 'Delay(1)' before 'FindTask(NULL)', maybe some kind of timing race condition on X1000 systems?
On my SAM460ex I can't make it fail/crash.
CPU.C source code ("main" code from CPUwatcher/CPUDocky):
On my SAM460ex I can't make it fail/crash.
CPU.C source code ("main" code from CPUwatcher/CPUDocky):
Hidden Text - Click to Show :
- Thomas Frieden
- AmigaOS Core Developer
- Posts: 147
- Joined: Fri Dec 10, 2010 3:21 pm
Re: OS freeze when using debug kernel with CPU Watcher
The non-debug kernel does not munge memory, and it does not destroy linkage in removed list nodes. The debug kernel does, for the exact purpose of exposing bugs.zzd10h wrote:Thank you for your reply,
yes, but why does it works on a non debug kernel and, overall, why does it seems to work on a SAM460 with the debug kernel ?
Why it works with a sam460 is unknown, but the very nature of the bugs that mungin and/or link destruction exposes is their randomness. Besides, the usualy munging patters have like 0xabadcafe and 0xcccccccc (for list destruction) will work on teh sam460 since these areas are mapped on the 460 (chip registers)
- Thomas Frieden
- AmigaOS Core Developer
- Posts: 147
- Joined: Fri Dec 10, 2010 3:21 pm
Re: OS freeze when using debug kernel with CPU Watcher
I doubt that this would only exhibit in such rare cases. Besides, the Delay probably just makes it gloss over the freed memory.javierdlr wrote:Seems Guillaume solved by adding 'Delay(1)' before 'FindTask(NULL)', maybe some kind of timing race condition on X1000 systems?
Just to make sure, you are NOT using an X-kernel ?
Re: OS freeze when using debug kernel with CPU Watcher
@allThomas Frieden wrote:The non-debug kernel does not munge memory, and it does not destroy linkage in removed list nodes. The debug kernel does, for the exact purpose of exposing bugs.
Why it works with a sam460 is unknown, but the very nature of the bugs that mungin and/or link destruction exposes is their randomness. Besides, the usualy munging patters have like 0xabadcafe and 0xcccccccc (for list destruction) will work on teh sam460 since these areas are mapped on the 460 (chip registers)
Note that we have some more detailed information about the debug kernel on the wiki at
http://wiki.amigaos.net/wiki/Debug_Kernel
ExecSG Team Lead
Re: OS freeze when using debug kernel with CPU Watcher
@Thomas Frieden
Thank you for the explanation,
I will continue to investigate with Javier, Raziel and the AmiOuest France team
Thank you for the explanation,
I will continue to investigate with Javier, Raziel and the AmiOuest France team
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
X1000 - AmigaOS 4.1.6 / 4.1 FE