M1LKYWVY
Posts: 14
Joined: Fri Jan 04, 2019 2:02 pm

Unable to flush emmc. CM3.

Wed Jan 09, 2019 10:43 am

Hi, guys!

I am trying to flush emmc with os. I tried 3 different images.
My problem is that i can not flush full image. I see that it flushed small part of image (when tried lite version of raspbian, it flushed 200mb) and it seems to me that cm3 reboots or just reconnects. I followed instructions described here https://www.raspberrypi.org/documentati ... lashing.md.
Tried with windows pc and with paspberry pi 3. Images of raspbian have taken from here https://www.raspberrypi.org/downloads/raspbian/. I run dmesg and saw tat output :( :

Code: Select all

[  308.828415] print_req_error: I/O error, dev sdb, sector 407648
[  308.828427] Buffer I/O error on dev sdb, logical block 50956, lost async page write
[  308.828478] Buffer I/O error on dev sdb, logical block 50957, lost async page write
[  308.828491] Buffer I/O error on dev sdb, logical block 50958, lost async page write
[  308.828508] Buffer I/O error on dev sdb, logical block 50959, lost async page write
[  308.828520] Buffer I/O error on dev sdb, logical block 50960, lost async page write
[  308.828535] Buffer I/O error on dev sdb, logical block 50961, lost async page write
[  308.828547] Buffer I/O error on dev sdb, logical block 50962, lost async page write
[  308.828558] Buffer I/O error on dev sdb, logical block 50963, lost async page write
[  308.828570] Buffer I/O error on dev sdb, logical block 50964, lost async page write
[  308.828581] Buffer I/O error on dev sdb, logical block 50965, lost async page write
[  308.832448] sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[  308.832474] sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x2a 2a 00 00 06 39 50 00 00 f0 00
[  308.832493] print_req_error: I/O error, dev sdb, sector 407888
[  308.923933] blk_partition_remap: fail for partition 1
[  308.923955] FAT-fs (sdb1): unable to read boot sector to mark fs as dirty
[  309.084336] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
[  309.084516] sd 1:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=0x00
[  309.908302] Under-voltage detected! (0x00050005)
[  316.148224] Voltage normalised (0x00000000)
How can i solve this problem?
Please, help with this..

Thanks!

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2222
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Unable to flush emmc. CM3.

Wed Jan 09, 2019 11:00 am

Code: Select all

[  309.908302] Under-voltage detected! (0x00050005)
This is not a good sign. If the Pi you are using for programming does not have an adequate power supply then you could be seeing all sorts of random errors.

M1LKYWVY
Posts: 14
Joined: Fri Jan 04, 2019 2:02 pm

Re: Unable to flush emmc. CM3.

Wed Jan 09, 2019 11:07 am

I tried 5V 2A, 5V 0.7A. Error stays....

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2222
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Unable to flush emmc. CM3.

Wed Jan 09, 2019 11:11 am

For a Pi 3B or 3B+ we specify a minimum of [email protected]

M1LKYWVY
Posts: 14
Joined: Fri Jan 04, 2019 2:02 pm

Re: Unable to flush emmc. CM3.

Wed Jan 09, 2019 11:37 am

PhilE wrote:
Wed Jan 09, 2019 11:11 am
For a Pi 3B or 3B+ we specify a minimum of [email protected]
Have checked one minute ago with [email protected] Still facing this problem. Took raspbian stretch without recommended software, flushed 242 mb...
dd says " '/dev/sdb': Input/output error "

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2222
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Unable to flush emmc. CM3.

Wed Jan 09, 2019 12:01 pm

Please try using different USB cables - you'd be amazed how often a bad cable can cause an issue.

M1LKYWVY
Posts: 14
Joined: Fri Jan 04, 2019 2:02 pm

Re: Unable to flush emmc. CM3.

Wed Jan 09, 2019 12:31 pm

PhilE wrote:
Wed Jan 09, 2019 12:01 pm
Please try using different USB cables - you'd be amazed how often a bad cable can cause an issue.
I took all usb - microsub cables that I had. 6 different cables. Tried vary them. No results :shock:

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2222
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Unable to flush emmc. CM3.

Wed Jan 09, 2019 4:19 pm

1. Did the undervoltage errors go away with the 2.5A supply?

2. Try to just write zeroes to the CM3:

Code: Select all

sudo dd if=/dev/zero of=/dev/sdb bs=4MiB
If it fails, does it fail at the same sector (407648)?

3. Similar to 2, but starting part-way (400MB) through the EMMC:

Code: Select all

sudo dd if=/dev/zero of=/dev/sdb bs=4MiB skip=100
4. Has this ever worked for you, on this or any other CM3?

M1LKYWVY
Posts: 14
Joined: Fri Jan 04, 2019 2:02 pm

Re: Unable to flush emmc. CM3.

Thu Jan 10, 2019 8:25 am

PhilE wrote:
Wed Jan 09, 2019 4:19 pm
1. Did the undervoltage errors go away with the 2.5A supply?

2. Try to just write zeroes to the CM3:

Code: Select all

sudo dd if=/dev/zero of=/dev/sdb bs=4MiB
If it fails, does it fail at the same sector (407648)?

3. Similar to 2, but starting part-way (400MB) through the EMMC:

Code: Select all

sudo dd if=/dev/zero of=/dev/sdb bs=4MiB skip=100
4. Has this ever worked for you, on this or any other CM3?

------------------------------------------------------------------------------------------------------------------------------------------------------------


May be this information will be helpful...
Connecting CM3 to rpi after unsuccessfully finished flushing.
rpiboot output:

Code: Select all

Waiting for BCM2835/6/7
Sending bootcode.bin
Successful read 4 bytes 
Waiting for BCM2835/6/7
Second stage boot server
File read: start.elf
Second stage boot server done
After rpiboot finished itsef. Have this notification:

Code: Select all

Error mounting /dev/sda2 at /media/pi/rootfs: Command-line `mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/sda2" "/media/pi/rootfs"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sda2,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
I guess this chunk of dmesg corresponds to connecting CM3:

Code: Select all

[   39.001551] usb 1-1.4: new high-speed USB device number 4 using dwc_otg
[   39.131833] usb 1-1.4: config index 0 descriptor too short (expected 55, got 32)
[   39.132107] usb 1-1.4: New USB device found, idVendor=0a5c, idProduct=2764
[   39.132119] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   39.132127] usb 1-1.4: Product: BCM2710 Boot
[   39.132136] usb 1-1.4: Manufacturer: Broadcom
[   42.493269] usb 1-1.4: USB disconnect, device number 4
[   42.791556] usb 1-1.4: new full-speed USB device number 5 using dwc_otg
[   42.924842] usb 1-1.4: not running at top speed; connect to a high speed hub
[   42.934594] usb 1-1.4: New USB device found, idVendor=0a5c, idProduct=2764
[   42.934608] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=1
[   42.934617] usb 1-1.4: Product: BCM2710 Boot
[   42.934625] usb 1-1.4: Manufacturer: Broadcom
[   42.934634] usb 1-1.4: SerialNumber: Broadcom
[   45.309245] usb 1-1.4: USB disconnect, device number 5
[   45.861552] usb 1-1.4: new high-speed USB device number 6 using dwc_otg
[   45.992297] usb 1-1.4: New USB device found, idVendor=0a5c, idProduct=0001
[   45.992313] usb 1-1.4: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[   45.992322] usb 1-1.4: Product: Compute Module
[   45.992331] usb 1-1.4: Manufacturer: Raspberry Pi
[   45.992339] usb 1-1.4: SerialNumber: bfa466a4
[   45.993122] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[   45.993954] scsi host0: usb-storage 1-1.4:1.0
[   47.032229] scsi 0:0:0:0: Direct-Access     RPi-MSD- 0001                  PQ: 0 ANSI: 2
[   47.033820] sd 0:0:0:0: [sda] 7634944 512-byte logical blocks: (3.91 GB/3.64 GiB)
[   47.034127] sd 0:0:0:0: [sda] Write Protect is off
[   47.034142] sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00
[   47.034405] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   47.041677]  sda: sda1 sda2
[   47.043810] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   47.062014] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   47.923244] JBD2: no valid journal superblock found
[   47.923259] EXT4-fs (sda2): error loading journal
[   48.010033] JBD2: no valid journal superblock found
[   48.010052] EXT4-fs (sda2): error loading journal

------------------------------------------------------------------------------------------------------------------------------------------------------------


1. Did the undervoltage errors go away with the 2.5A supply?

Undervoltage errors gone.

2. Try to just write zeroes to the CM3:
If it fails, does it fail at the same sector (407648)?


I used this command to see progress

Code: Select all

sudo pv -tpreb /dev/zero | sudo dd of=/dev/sda bs=4MiB oflag=dsync conv=notrunc,noerror
It seems to me, that it does not failed. No errors in dmesg.
See only one error in output of command, that there is no free storage on device.
Successfully flushed 3.64 GiB in 11 minutes.

3. Similar to 2, but starting part-way (400MB) through the EMMC:

Used your command. It also finished with error that device does not have free storage.
No errors in dmesg.

4. Has this ever worked for you, on this or any other CM3?

This is my first experience with CM3.



------------------------------------------------------------------------------------------------------------------------------------------------------------


Tried again.

Code: Select all

sudo pv -tpreb 2018-11-13-raspbian-stretch.img | sudo dd of=/dev/sda bs=4MiB oflag=dsync conv=notrunc,noerror
It finished with error again. Flushed only 233MiB again.
Full dmesg according to connecting and flushing CM3:

Code: Select all

[   74.021458] usb 1-1.4: new high-speed USB device number 4 using dwc_otg
[   74.151705] usb 1-1.4: config index 0 descriptor too short (expected 55, got 32)
[   74.151981] usb 1-1.4: New USB device found, idVendor=0a5c, idProduct=2764
[   74.151992] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   74.152001] usb 1-1.4: Product: BCM2710 Boot
[   74.152010] usb 1-1.4: Manufacturer: Broadcom
[   77.309285] usb 1-1.4: USB disconnect, device number 4
[   77.601165] usb 1-1.4: new full-speed USB device number 5 using dwc_otg
[   77.734367] usb 1-1.4: not running at top speed; connect to a high speed hub
[   77.744118] usb 1-1.4: New USB device found, idVendor=0a5c, idProduct=2764
[   77.744132] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=1
[   77.744141] usb 1-1.4: Product: BCM2710 Boot
[   77.744149] usb 1-1.4: Manufacturer: Broadcom
[   77.744157] usb 1-1.4: SerialNumber: Broadcom
[   80.381274] usb 1-1.4: USB disconnect, device number 5
[   80.730968] usb 1-1.4: new high-speed USB device number 6 using dwc_otg
[   80.861716] usb 1-1.4: New USB device found, idVendor=0a5c, idProduct=0001
[   80.861732] usb 1-1.4: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[   80.861741] usb 1-1.4: Product: Compute Module
[   80.861749] usb 1-1.4: Manufacturer: Raspberry Pi
[   80.861758] usb 1-1.4: SerialNumber: bfa466a4
[   80.862527] usb-storage 1-1.4:1.0: USB Mass Storage device detected
[   80.869126] scsi host0: usb-storage 1-1.4:1.0
[   81.911634] scsi 0:0:0:0: Direct-Access     RPi-MSD- 0001                  PQ: 0 ANSI: 2
[   81.916825] sd 0:0:0:0: [sda] 7634944 512-byte logical blocks: (3.91 GB/3.64 GiB)
[   81.917059] sd 0:0:0:0: [sda] Write Protect is off
[   81.917070] sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00
[   81.917280] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   81.924529]  sda: sda1 sda2
[   81.926753] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   81.948289] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   82.739072] JBD2: no valid journal superblock found
[   82.739087] EXT4-fs (sda2): error loading journal
[   82.908443] JBD2: no valid journal superblock found
[   82.908457] EXT4-fs (sda2): error loading journal
[  301.459796] usb 1-1.4: USB disconnect, device number 6
[  301.499540] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[  301.499573] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 00 07 35 60 00 00 f0 00
[  301.499586] print_req_error: I/O error, dev sda, sector 472416
[  301.499599] Buffer I/O error on dev sda, logical block 59052, lost async page write
[  301.499654] Buffer I/O error on dev sda, logical block 59053, lost async page write
[  301.499667] Buffer I/O error on dev sda, logical block 59054, lost async page write
[  301.499679] Buffer I/O error on dev sda, logical block 59055, lost async page write
[  301.499698] Buffer I/O error on dev sda, logical block 59056, lost async page write
[  301.499709] Buffer I/O error on dev sda, logical block 59057, lost async page write
[  301.499725] Buffer I/O error on dev sda, logical block 59058, lost async page write
[  301.499737] Buffer I/O error on dev sda, logical block 59059, lost async page write
[  301.499753] Buffer I/O error on dev sda, logical block 59060, lost async page write
[  301.499778] Buffer I/O error on dev sda, logical block 59061, lost async page write
[  301.503848] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[  301.503880] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 00 07 36 50 00 00 f0 00
[  301.503899] print_req_error: I/O error, dev sda, sector 472656
[  301.580228] blk_partition_remap: fail for partition 1
[  301.580248] FAT-fs (sda1): unable to read boot sector to mark fs as dirty
[  301.710688] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  301.710839] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=0x00
Then tried after 5 minutes. It finised with same error again. dmesg output similiar, but secors are different. In first situation dmesg output according to sectors:

Code: Select all

[  301.499586] print_req_error: I/O error, dev sda, sector 472416
[  301.499599] Buffer I/O error on dev sda, logical block 59052, lost async page write
[  301.499654] Buffer I/O error on dev sda, logical block 59053, lost async page write
[  301.499667] Buffer I/O error on dev sda, logical block 59054, lost async page write
[  301.499679] Buffer I/O error on dev sda, logical block 59055, lost async page write
[  301.499698] Buffer I/O error on dev sda, logical block 59056, lost async page write
[  301.499709] Buffer I/O error on dev sda, logical block 59057, lost async page write
[  301.499725] Buffer I/O error on dev sda, logical block 59058, lost async page write
[  301.499737] Buffer I/O error on dev sda, logical block 59059, lost async page write
[  301.499753] Buffer I/O error on dev sda, logical block 59060, lost async page write
[  301.499778] Buffer I/O error on dev sda, logical block 59061, lost async page write
[  301.503848] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[  301.503880] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 00 07 36 50 00 00 f0 00
[  301.503899] print_req_error: I/O error, dev sda, sector 472656
[  301.580228] blk_partition_remap: fail for partition 1
[  301.580248] FAT-fs (sda1): unable to read boot sector to mark fs as dirty
[  301.710688] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  301.710839] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=0x00
In the second:

Code: Select all

[  187.919687] print_req_error: I/O error, dev sda, sector 472320
[  187.919702] Buffer I/O error on dev sda, logical block 59040, lost async page write
[  187.919757] Buffer I/O error on dev sda, logical block 59041, lost async page write
[  187.919770] Buffer I/O error on dev sda, logical block 59042, lost async page write
[  187.919787] Buffer I/O error on dev sda, logical block 59043, lost async page write
[  187.919802] Buffer I/O error on dev sda, logical block 59044, lost async page write
[  187.919817] Buffer I/O error on dev sda, logical block 59045, lost async page write
[  187.919830] Buffer I/O error on dev sda, logical block 59046, lost async page write
[  187.919851] Buffer I/O error on dev sda, logical block 59047, lost async page write
[  187.919863] Buffer I/O error on dev sda, logical block 59048, lost async page write
[  187.919875] Buffer I/O error on dev sda, logical block 59049, lost async page write
[  187.920117] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x01 driverbyte=0x00
[  187.920132] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 00 07 35 f0 00 00 10 00
[  187.920140] print_req_error: I/O error, dev sda, sector 472560
[  188.012866] blk_partition_remap: fail for partition 1
[  188.012887] FAT-fs (sda1): unable to read boot sector to mark fs as dirty
[  188.110014] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  188.110144] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x01 driverbyte=0x00
May be it will helpful. Ater it comes down with error. It starts blinking green light 7 times.

M1LKYWVY
Posts: 14
Joined: Fri Jan 04, 2019 2:02 pm

Re: Unable to flush emmc. CM3.

Mon Jan 14, 2019 1:24 pm

May be problem in IO board? I have old IO board (it does not has slot for sd card), CM1 and CM3. CM1 is not detecting totally, but CM3 falls with errors while flashing.

Return to “Compute Module”