WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Find cause for crashes on my VIA EDEN 500MHz 1core 32bit cpu  (Read 67 times)

Online Stefann

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 267
Find cause for crashes on my VIA EDEN 500MHz 1core 32bit cpu
« on: September 05, 2026, 11:18:48 AM »
Continuation of rootcause finding towards the crashing of my VIA EDEN 500MHz 1core 32bit cpu on TC17.1 as started in this thread: https://forum.tinycorelinux.net/index.php?topic=28078.0

My system is still crashing from time to time. But its is very likely a hardware issue not related to TC17 for which reason it is now closed as TC17 issue.

Short summary of where I am:
- 1.5 weeks ago my system crashed 2x in a row.
- Than I extended an existing nanosleep() delay in my application from 3x 0 to 3x100ms per second by configuration item (no recompile) after which the system did not crash for 5 days.
- Under assumption it is "load" dependent I included a 2x 4700uF capacitor on 5V power line and brought delay back to 3x0ms per second after which it did run without crash for 5 days.
- As ultimate proof this is power related I removed the capacitors "during run" (they were mounted on a screw terminal) under assumption it should crash within 24 hours. but... no crash

- I now started an additional "continuous loop stress program (code at bottom). This brought cpu-load from 10% to 90% and added 0.6% (=10%) power consumption.

Let's see whether there is crash again in 24hrs.

@Rich, I tried your python program. It however fails:
Code: [Select]
tc@huis:~/python$ ./SimplePi.sh
./CalcPi.sh: line 4: bc: not found
./CalcPi.sh: line 6: bc: not found

So I just keep running my own stress program for now. Can change that later. Better to run "something" than nothing

Stress program I'm running (C code):
Code: [Select]
int Stress()
{ int i;
  float d1[200], d2[200];
  while (1)
  { for (i=0; i<100; i++)
    { d1[i] = 1.111*i; }
    for (i=0; i<100; i++)
    { d2[i] = d1[i]/ 1.111; }
    for (i=0; i<100; i++)
    { d1[i] = d2[i] * 1.111; }
  }
  return 1;
}
It has some calculations (*1.111 and /1.111) and some memory-swaps
« Last Edit: September 05, 2026, 11:35:21 AM by Stefann »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12986
Re: Find cause for crashes on my VIA EDEN 500MHz 1core 32bit cpu
« Reply #1 on: September 05, 2026, 02:35:03 PM »
Hi Stefann
... @Rich, I tried your python program. It however fails:
Code: [Select]
tc@huis:~/python$ ./SimplePi.sh
./CalcPi.sh: line 4: bc: not found
./CalcPi.sh: line 6: bc: not found
It's not python. It's just an ash script.
The reason you got those errors is because you didn't read the scripts
help message which I even post here:
https://forum.tinycorelinux.net/index.php?topic=24096.msg152111#msg152111
It clearly states you need to install  bc.tcz.

The script creates a script to calculate  pi  to the number of decimal
places you specified when you launched  SimplePi.sh.
It then launches a copy of that script on every processor in that system.

The default number of decimal places it calculates  pi  to is 1000.
If you start it like this:
Code: [Select]
./SimplePi.sh 4000It will change the default value of  SimplePi.sh  from 1000 to 4000 and
calculate  pi  to 4000 decimal places.
« Last Edit: September 05, 2026, 07:23:34 PM by Rich »

Online Stefann

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 267
@Rich,
Ah.. I feel bit ashamed... THAT is something I could have figured out myself.
To be honest, I felt a bit grumphy yesterday. I really thought I was catching the issue and once again "not".

With that said... I may from time to time be bit grumpy but especially for that reason I highly appreciate all the support.

Anyway..
- I tried the SimplePi.sh script. It added +0.6W power consumption which is similar to what I had.
- I improved the stress program to also include network load by writing to a file on Ramdisk of my 2nd computer. Powerconsumption is now +1W (code at bottom of post), around 7.5W total now.
- now started it without capacitor including +1W stress program to see whether it crashes again.
- all this also shows that the 2A power supply (=10W) should in principle be enough. Even when trying I did not see anything above 8W.

Note...
- It all becomes quite "not handy". I actually really want to extend my home-control application instead of debugging the platform.
- I think I will simply start working without capacitor and if I see frequent fail install capacitor and start multi-day run. Last time I did several powermeasurements, adapter swaps before the 5 day run. Although I don't feel I have I still "may" have slightly altered the config.

Story continues.....

Code: [Select]
int Stress()
{ int i;
  float d1[200], d2[200];
  FILE *fd;
 
  while (1)
  { fd = fopen("/remote/home/tc/stress.txt", "w");
    if (fd)
    { for (i=0; i<100; i++)
       d1[i] = 1.111*i;
      for (i=0; i<100; i++)
        d2[i] = d1[i]/ 1.111;
      for (i=0; i<100; i++)
        d1[i] = d2[i] * 1.111;
      for (i=0; i<100; i++)
        fprintf(fd, "dum %d\n",d1[i]);
      fclose(fd);
     }
  }
  return 1;
}