Orange Pi Lite Freezes


danybr
 Share

1 1

Recommended Posts

My Orange Pi Lite + octoprint often freeze during a print. 
I noticed that when it happens I can not access either the web panel nor in ssh.
I believe that it detaches from wifi and go into freeze.
I have already ruled out power supply problems and overheating. 
Someone can help me?My image is: Armbian_5.25_Orangepilite_Ubuntu_xenial.
Here is a screenshot of the statistics:

Thanks!

Opi_monitor_full.png

Link to post
Share on other sites

Donate and support the project!

4 minutes ago, danybr said:

I run the "armbianmonitor -c "$HOME" but it takes long time to write files..

 

Please let it continue and then again provide the output from 'sudo armbianmonitor -u'. Anyway, your SD card already looks suspicious:

               oemid: 0x0000 
              manfid: 0x000000 

What is printed on the card?

Link to post
Share on other sites

19 minutes ago, danybr said:

Result from tests told me that the card haven't errors

Well, not entirely true. The test just confirmed that the card doesn't show a fake capacity (not common with 8GB cards but with larger ones). Since almost half the capacity is already used this hasn't been tested. And since you experienced some freezes/crashes in the past maybe you experienced some sort of filesystem corruption already. Hmm... it seems to force a fsck at reboot one needs to add 'fsck.mode=force' to kernel cmdline ( @zador.blood.stainedplease stop/correct me if I'm telling BS!)

 

Anyway, the card isn't that slow but since card metadata looks strange and performance is rather low in case you're able to get a genuine Samsung EVO+ with 32 or 64GB this would be a try even if it doesn't resolve the freezes (still hard to tell what's the culprit, maybe you would need a serial console attached with kernel messages redirected to this to get a clue)

Link to post
Share on other sites

Thanks @tkaiser and @zador.blood.stained

Meanwhile I test the microSD card to verify if is bad and fake (microSD in Orange Pi), I have a real samsung Evo U1 (the same showed on User-Guide_Getting-Started). I will use it to reinstall OS.

Can I create an image of the system from the old microSD card and burn it on new microSD? Or best way is to reinstall all from 0? Beacuse I've a lot of things to backup..

EDIT: Anyway, this is a screen of informations about test

ConsoleLog.PNG

Link to post
Share on other sites

11 minutes ago, danybr said:

Can I create an image of the system from the old microSD card and burn it on new microSD?

Sure. But the new card has to be at least 'of same size' otherwise partitioning will throw errors. You can search the forum for 'backup sd card emmc' or 'mmcblk0 dd lz4' to get a lot of valuable stuff regarding creation of device images. But as zador already mentioned take care that filesystem isn't corrupted and try at least to repair it if that's true.

 

In case new card is significantly larger you might want to expand rootfs again. With all updates applied running off new card it should be as simple as

sudo systemctl enable resize2fs && sudo reboot

 

Link to post
Share on other sites

32 minutes ago, tkaiser said:

Sure. But the new card has to be at least 'of same size' otherwise partitioning will throw errors. You can search the forum for 'backup sd card emmc' or 'mmcblk0 dd lz4' to get a lot of valuable stuff regarding creation of device images. But as zador already mentioned take care that filesystem isn't corrupted and try at least to repair it if that's true.

 

In case new card is significantly larger you might want to expand rootfs again. With all updates applied running off new card it should be as simple as


sudo systemctl enable resize2fs && sudo reboot

 

Yes, the Samsung Evo microSD is of 16GB, indeed the old microSD is 8GB (or less, for the fact that it is fake).

Can I use this script?

 

Or maybe the best way is this?

 

Link to post
Share on other sites

7 minutes ago, danybr said:

Can I use this script?

Sorry, the advices before were wrong. In the meantime I switched my brain on again: 

All you need is a device backup from a probably failing SD card and not a script doing fancy stuff. So better use ddrescue and maybe pipe it through any of these compressors mentioned here: https://forum.armbian.com/index.php?/topic/2096-backup-script-for-block-devices/&do=findComment&comment=16056

 

In case you do the device backup on a PC or Mac I wouldn't use any compression just to be able to use Etcher in the next step to burn the image to the Samsung card (but compression is always nice if you want to keep 'block device' backups)

 

 

 

Link to post
Share on other sites

2 minutes ago, danybr said:

the core command is " sudo dd if=/dev/disk1 of=~/SDCardBackup.dmg "

 

Nope, better use ddrescue instead. It's just a 'brew install ddrescue' away:

 

macbookpro-tk:~ tk$ brew search ddrescue

ddrescue

macbookpro-tk:~ tk$ brew info ddrescue

ddrescue: stable 1.21 (bottled)

GNU data recovery tool

https://www.gnu.org/software/ddrescue/ddrescue.html

/usr/local/Cellar/ddrescue/1.20 (11 files, 271.9K) *

  Poured from bottle on 2015-09-20 at 15:17:46

From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/ddrescue.rb

==> Dependencies

Build: lzip

 
Link to post
Share on other sites

3 minutes ago, danybr said:

I was right to set the size of 4M?

Doesn't really matter. Results look good so now let Etcher do the job and please report back within a few days if exchange of the SD card really did the job or not.

 

BTW: In OS X (or macOS as it's now called) I wouldn't name 'foreign' OS images with .dmg extension since there are a few tools included that make a lot of assumptions based on filename suffix. Better use .img instead -- just in case. Names/suffixes shouldn't matter but unfortunately there exists some hardcoded garbage here and there (or maybe I'm just too old and these problems have been resolved within the last decade. An easy way is to check with 'hdiutil imageinfo')

Link to post
Share on other sites

2 hours ago, tkaiser said:

sudo systemctl enable resize2fs && sudo reboot

I tried this command, because system read only 7.1 GB. After reboot, I have the same size. Do you know why?

This is the output and the command take around 3 second to complete..

"

Synchronizing state of resize2fs.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable resize2fs
"

EDIT: I tried another time and now it works. I'm sorry.

How can I check the file system?

Link to post
Share on other sites

Dear @tkaiser and @zador.blood.stained

Today I had 2 freezes in the same day (in real, in 4 hours of work).

I generate new log, and is here:

http://sprunge.us/RDEU

 

I hope you can help me!

Thanks

 

EDIT: other informations
 

Quote

 

octoprint@orangepilite:~$ sudo tune2fs -l /dev/mmcblk0p1
tune2fs 1.42.13 (17-May-2015)
Filesystem volume name:   <none>
Last mounted on:          /
Filesystem UUID:          869936a4-c08b-41a3-8bef-a42ddd71700c
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash
Default mount options:    journal_data_writeback user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              923680
Block count:              3760936
Reserved block count:     44258
Free blocks:              2879609
Free inodes:              754664
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      172
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8032
Inode blocks per group:   502
Flex block group size:    16
Filesystem created:       Sun Feb  5 12:44:58 2017
Last mount time:          Tue Mar 14 13:17:02 2017
Last write time:          Thu Jan  1 00:00:06 1970
Mount count:              61
Maximum mount count:      -1
Last checked:             Sun Feb  5 12:44:58 2017
Check interval:           0 (<none>)
Lifetime writes:          18 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      afb4d02d-24fd-4dbd-932d-278e4c40115a
Journal backup:           inode blocks


 

 

Link to post
Share on other sites

5 minutes ago, danybr said:

Today I had 2 freezes in the same day (in real, in 4 hours of work).

Well, ultra cheap hardware like $12 computers might break... since we had so many reports of 'no power problems ... 1 week later ... it turned out my PSU...' a quick check whether you run in undervoltage situations (execute with the same peripherals connected at the time the freezes happen):

cd /tmp
git clone https://github.com/ssvb/cpuburn-arm
gcc cpuburn-a7.S
./a.out

 

Link to post
Share on other sites

14 minutes ago, tkaiser said:

Well, ultra cheap hardware like $12 computers might break... since we had so many reports of 'no power problems ... 1 week later ... it turned out my PSU...' a quick check whether you run in undervoltage situations (execute with the same peripherals connected at the time the freezes happen):


cd /tmp
git clone https://github.com/ssvb/cpuburn-arm
gcc cpuburn-a7.S
./a.out

 

Sorry, is not very clear for me what I should do.. My english is bad :(

Anyway I run the script for 4 minutes for a test and statistics are here:

No freeze during the test nor after.

 

 

Statistics_cpu_burn.PNG

Link to post
Share on other sites

Follow the instructions in linux-sunxi wiki please: http://linux-sunxi.org/Orange_Pi_Lite#Locating_the_UART

 

Then you increase verbosity as outlined in the docs https://docs.armbian.com/User-Guide_Fine-Tuning/#how-to-toogle-verbose-boot reboot and wait until the next freeze happens. And then maybe on the second machine connected to the serial console some interesting messages can be collected. 'Second machine' can be as small as another Lite or an OPi Zero (which you might want to order anyway to probably replace the Lite if it's a hardware issue?)

Link to post
Share on other sites

On 16/3/2017 at 10:58 AM, tkaiser said:

Follow the instructions in linux-sunxi wiki please: http://linux-sunxi.org/Orange_Pi_Lite#Locating_the_UART

 

Then you increase verbosity as outlined in the docs https://docs.armbian.com/User-Guide_Fine-Tuning/#how-to-toogle-verbose-boot reboot and wait until the next freeze happens. And then maybe on the second machine connected to the serial console some interesting messages can be collected. 'Second machine' can be as small as another Lite or an OPi Zero (which you might want to order anyway to probably replace the Lite if it's a hardware issue?)

I don't have another OPi to use for this scope.. Buy another one means that I will "solve" my problem in 2 months (shipping problems).

Can I use an Arduino for this scope?

Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

1 1