C4 with Ubuntu and Mysql: Reboots

Post Reply
jr1234
Posts: 6
Joined: Mon Sep 20, 2021 10:49 pm
languages_spoken: english
ODROIDs: C4 Ubuntu
Has thanked: 0
Been thanked: 0
Contact:

C4 with Ubuntu and Mysql: Reboots

Post by jr1234 »

Hello All,

I like to ask, if someoune have the sames issues:

I use the C4 in the described way.
Power is provided by a local battery set ( 12V) with temporaly goes down to 11.9 - 11.8V)
The C4 is connected by :

a. wire to a network , reads data my modbusTcp
b. RS 485 using the zihatec hat using modbusRTU

There are 2 python3 app, witch reads the data, make some calulation and write it into the database.
Additional apache2 provide a web Page showing the database data,

From time to time, mostly 1 time per day, the C4 makes a reboot,
The date is set back, and the python application are not running.

I checkt /var/log ....but I can not found any reason.
Is seems: C4 reboot by power faliure. But the power cames from a 200Ah 12V battery, with is realy big enough!
Maybe wiring reduce the voltage, but is done in 1,5mm2

What I think about:

Every "crash" creates the same figure inside the database.
I use a sequence, described in :

https://stackoverflow.com/questions/265 ... e-in-mysql

and use it by trigger an the data table.

One of the python3 app writes into a data table per bulk insert ( 6 rows at once) mysql had to add the id by using the sequence function.

And every crash, I got the same figure:
Data records are inserted, but the sequence table is only incr. by 1 and not by 6.
I use the database in a "no transaction" mode. I know, not perfect for this use......but we are on the begining of the project.

What I cant understand, if it is a power consumtion problem: Why crash the system only at inserts ???
Does the insert function consumes so many power ? / Database is local om the emmc strage ?
The database table is only used by one application (for inserting), a php script reads the data,


Hopefully someone is able to fellow my descrition, it lookslike a little confused, I know

From the last 15 crashes, allways, I found the same situation, so I belive: there must be a reason. But how to find ?


Thanks a lot for all hints and questions

JR

User avatar
mad_ady
Posts: 9783
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 613 times
Been thanked: 734 times
Contact:

Re: C4 with Ubuntu and Mysql: Reboots

Post by mad_ady »

mysql shouldn't be the cause of the crash.
If you're suspecting power, do this test:
- turn off mysql and your python apps
- run stress-ng for 12-24h and see if you get reboots.

To figure out what's going on, you'll need to monitor kernel messages (dmesg -w), either via serial or netconsole (if it works on c4).

Regarding the date on reboot - try installing fake-hwclock.

jr1234
Posts: 6
Joined: Mon Sep 20, 2021 10:49 pm
languages_spoken: english
ODROIDs: C4 Ubuntu
Has thanked: 0
Been thanked: 0
Contact:

Re: C4 with Ubuntu and Mysql: Reboots

Post by jr1234 »

Thanks a lot,
I will test your hints and repley.

Do you have a recomandation for stress-ng paramateres ? ( stress the memory-disk ?)

Regarding to the power: What are the recomandation for powering a c4 ?
What which peaks are allowed ?

Thanks for answering.

Jo.

User avatar
mad_ady
Posts: 9783
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 613 times
Been thanked: 734 times
Contact:

Re: C4 with Ubuntu and Mysql: Reboots

Post by mad_ady »

Just benchmark all CPU cores, to draw more power. See if it's stable over long term.


If you're not using the USB ports you can go as low as 5.5V for input power. Check the internal regulator specs for exact details.

User avatar
odroid
Site Admin
Posts: 38159
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2045 times
Been thanked: 1221 times
Contact:

Re: C4 with Ubuntu and Mysql: Reboots

Post by odroid »

Can you tell me more about the DC power wire thickness?
I hope the thickness is AWG-18 or less. AWG-22 might be fine if the cable is shorter than 80cm.

jr1234
Posts: 6
Joined: Mon Sep 20, 2021 10:49 pm
languages_spoken: english
ODROIDs: C4 Ubuntu
Has thanked: 0
Been thanked: 0
Contact:

Re: C4 with Ubuntu and Mysql: Reboots

Post by jr1234 »

Thansk for the answeres.
sorry for the delay, but the job ...

To give you an update:

The wire is awg 15-awg16 (german: 1,5 mm2)

The voltage during my test was min 11.5V all the time. ( measured by the min func of my fluke 85 )

My tests:
Stopp app, stop apache and stop mysql and then run stress-ng

and every test forces a reboot after max 2 min.
I did :

stress-ng --all 0
stress-ng --all -1
stress-ng --all 4
stress-ng --all 0 --maximize --aggressive ( reboots after 30 sec's)

stress-ng --all 4 --timeout 5m (runs 2 minutes)

It seems, the c4 has a problem, or was my test too hard for the c4 ?

Thanks for repley.
JR

User avatar
odroid
Site Admin
Posts: 38159
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2045 times
Been thanked: 1221 times
Contact:

Re: C4 with Ubuntu and Mysql: Reboots

Post by odroid »

I still have a doubt in your PSU. Can you keep measuring voltage on 5.0V power rail while you running "stress-ng"?
https://wiki.odroid.com/odroid-c4/hardw ... connectors

jr1234
Posts: 6
Joined: Mon Sep 20, 2021 10:49 pm
languages_spoken: english
ODROIDs: C4 Ubuntu
Has thanked: 0
Been thanked: 0
Contact:

Re: C4 with Ubuntu and Mysql: Reboots

Post by jr1234 »

Thanks for the fast repley.

I did the test you ask for:

I usw pin 4 and pin 6 of j2 for measuring:

During normal Operation: 4.62V

During stress-ng voltage goes down to 4.52.....and then goes up to 4.63. ( reboot??)


Is there a Chance to measured the input voltage ?
My measured Humber yesterday was the output of the powersuply,
but which voltage is really reaching the C4 internal.?????

Thanks for your support
Jr

User avatar
odroid
Site Admin
Posts: 38159
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2045 times
Been thanked: 1221 times
Contact:

Re: C4 with Ubuntu and Mysql: Reboots

Post by odroid »

5.0V power rail must be stable at 4.8Volt at least.

BTW, if you can read schematics, check some input power rails with the C4 full schematics in this link.
https://wiki.odroid.com/odroid-c4/hardw ... _datasheet

jr1234
Posts: 6
Joined: Mon Sep 20, 2021 10:49 pm
languages_spoken: english
ODROIDs: C4 Ubuntu
Has thanked: 0
Been thanked: 0
Contact:

Re: C4 with Ubuntu and Mysql: Reboots

Post by jr1234 »

Please do not blame me:

I did a mistake in wiring: the input volate was only 5.0V .

So I change it to 12V (11.8v).



But
stress-ng --all 0 or stress-ng -all -1 reboots the C4 still ongoing.
I did not see a reboot in normal operations.

So my questiuon: is stress-ng -all (0 or -1) ok ?
Is there a test, whicht forces the c4 to reboot ?

Thanks for speending your time

JR

User avatar
odroid
Site Admin
Posts: 38159
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2045 times
Been thanked: 1221 times
Contact:

Re: C4 with Ubuntu and Mysql: Reboots

Post by odroid »

As far as we tested, this command made the board very hot. But, it couldn't make the board reboot with our official 12V/2A PSU.

Code: Select all

stress-ng –cpu 4 –cpu-method matrixprod
Keep measuring the 5.0V power rail on the 40pin GPIO header with a DMM while running that command.

jr1234
Posts: 6
Joined: Mon Sep 20, 2021 10:49 pm
languages_spoken: english
ODROIDs: C4 Ubuntu
Has thanked: 0
Been thanked: 0
Contact:

Re: C4 with Ubuntu and Mysql: Reboots

Post by jr1234 »

To give you the actual results:

during all the tests: VCC is 5.31-5.32V No peaks are displayed by the dmm.

Running your recomandation: stress-ng -–cpu 4 –-cpu-method matrixprod works fine ( I stopped after 30 min)
But stress-ng -–all -1 reboots the C4 after 20-30 secondes.

For me, it seems stress-ng -–all do one test, which forces the C4 to reboot.

I'm not familar with stress-ng, but can I run the test by test (by a script) to find out, which test forces to reboot ?

with regards
JR

Post Reply

Return to “Ubuntu”

Who is online

Users browsing this forum: No registered users and 1 guest