| Summary: | [Test Case 1059] Parselogs is failing on genericx86 (32 and 64 bits) WIC giving error: GPT: Use GNU Parted to correct GPT errors. | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BSPs | Reporter: | Jair Gonzalez <jair.de.jesus.gonzalez.plascencia> |
| Component: | bsps-runtime | Assignee: | Jair Gonzalez <jair.de.jesus.gonzalez.plascencia> |
| Status: | RESOLVED FIXED | QA Contact: | Juan Ramos <juan.fernandox.ramos.frayle> |
| Severity: | normal | ||
| Priority: | Medium | CC: | benjamin.esquivel, eduard.bartosh, jair.de.jesus.gonzalez.plascencia, yp.kernel.watcher, yp.watcher |
| Version: | 2.2 | ||
| Target Milestone: | 2.3 M1 | ||
| Hardware: | All | ||
| OS: | x86 | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
| Attachments: | |||
Created attachment 3487 [details]
results-bitbake-worker_x86-64-wic_mmax64.log
The parselog test case is also failing on MMAX64bit WIC with similar error messages: STATUS: FAILED BUILD: 2.2.rc4(M4): 4b94b498e21aeba945fe7e72a6b7c4bb0314fb83 ENVIRONMENT: genericx86-WIC - on MMAX32bit STEPS TO REPRODUCE: Parse dmesg log and all log files in /var/log for keywords like: "error" , "failed" , "cannot", "can't" etc. Filter out the known and invalid errors or errors that appear in certain situations and need to be ignored. EXPECTED OUTCOME: No errors or fails should be present in logs ACTUAL: ----------------------- Central error: [ 5.959503] GPT: Use GNU Parted to correct GPT errors. *********************** [ 5.383262] scsi 0:0:0:0: Direct-Access Kingston HyperX Fury 3.0 PMAP PQ: 0 ANSI: 6 [ 5.827509] sd 0:0:0:0: [sda] 30736384 512-byte logical blocks: (15.7 GB/14.7 GiB) [ 5.842385] sd 0:0:0:0: [sda] Write Protect is off [ 5.851917] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00 [ 5.853767] sd 0:0:0:0: [sda] No Caching mode page found [ 5.863892] sd 0:0:0:0: [sda] Assuming drive cache: write through [ 5.919733] GPT:Primary header thinks Alt. header is not at the end of the disk. [ 5.932314] GPT:5621105 != 30736383 [ 5.940437] GPT:Alternate GPT header not at the end of the disk. [ 5.951407] GPT:5621105 != 30736383 [ 5.959503] GPT: Use GNU Parted to correct GPT errors. [ 5.969471] sda: sda1 sda2 sda3 [ 5.982969] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 6.060104] EXT4-fs (sda2): INFO: recovery required on readonly filesystem [ 6.072742] EXT4-fs (sda2): write access will be enabled during recovery [ 6.285961] EXT4-fs (sda2): recovery complete [ 6.303349] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null) [ 6.316159] VFS: Mounted root (ext4 filesystem) readonly on device 8:2. [ 6.334193] devtmpfs: mounted [ 6.345903] Freeing unused kernel memory: 1320K (ffffffff81f1d000 - ffffffff82067000) [ 6.358884] Write protecting the kernel read-only data: 14336k *********************** Log: /home/jairdeje/source/TR_2016-10-18/poky-wic64/build/tmp/work/genericx86_64-poky-linux/core-image-sato-sdk/1.0-r0/dmesg_output.log ----------------------- Central error: [ 5.959503] GPT: Use GNU Parted to correct GPT errors. *********************** [ 5.383262] scsi 0:0:0:0: Direct-Access Kingston HyperX Fury 3.0 PMAP PQ: 0 ANSI: 6 [ 5.827509] sd 0:0:0:0: [sda] 30736384 512-byte logical blocks: (15.7 GB/14.7 GiB) [ 5.842385] sd 0:0:0:0: [sda] Write Protect is off [ 5.851917] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00 [ 5.853767] sd 0:0:0:0: [sda] No Caching mode page found [ 5.863892] sd 0:0:0:0: [sda] Assuming drive cache: write through [ 5.919733] GPT:Primary header thinks Alt. header is not at the end of the disk. [ 5.932314] GPT:5621105 != 30736383 [ 5.940437] GPT:Alternate GPT header not at the end of the disk. [ 5.951407] GPT:5621105 != 30736383 [ 5.959503] GPT: Use GNU Parted to correct GPT errors. [ 5.969471] sda: sda1 sda2 sda3 [ 5.982969] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 6.060104] EXT4-fs (sda2): INFO: recovery required on readonly filesystem [ 6.072742] EXT4-fs (sda2): write access will be enabled during recovery [ 6.285961] EXT4-fs (sda2): recovery complete [ 6.303349] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null) [ 6.316159] VFS: Mounted root (ext4 filesystem) readonly on device 8:2. [ 6.334193] devtmpfs: mounted [ 6.345903] Freeing unused kernel memory: 1320K (ffffffff81f1d000 - ffffffff82067000) [ 6.358884] Write protecting the kernel read-only data: 14336k *********************** 2 errors found in logs. ERRATA: In my previous message, the environment should specify: STATUS: FAILED BUILD: 2.2.rc4(M4): 4b94b498e21aeba945fe7e72a6b7c4bb0314fb83 ENVIRONMENT: genericx86-64-WIC - on MMAX64bit STEPS TO REPRODUCE: This issue is also reproducible on a NUC (model NUC6i5SYH) within the following environment: STATUS: FAILED BUILD: 2.2.rc4(M4): 4b94b498e21aeba945fe7e72a6b7c4bb0314fb83 ENVIRONMENT: genericx86-64-WIC - on NUC STEPS TO REPRODUCE: Parse dmesg log and all log files in /var/log for keywords like: "error" , "failed" , "cannot", "can't" etc. Filter out the known and invalid errors or errors that appear in certain situations and need to be ignored. EXPECTED OUTCOME: No errors or fails should be present in logs ACTUAL: *********************** Central error: [ 3.308380] GPT: Use GNU Parted to correct GPT errors. *********************** [ 3.267271] scsi 1:0:0:0: Direct-Access Kingston HyperX Fury 3.0 PMAP PQ: 0 ANSI: 6 [ 3.273997] sd 1:0:0:0: [sdb] 30736384 512-byte logical blocks: (15.7 GB/14.7 GiB) [ 3.280544] sd 1:0:0:0: [sdb] Write Protect is off [ 3.285259] sd 1:0:0:0: [sdb] Mode Sense: 23 00 00 00 [ 3.286629] sd 1:0:0:0: [sdb] No Caching mode page found [ 3.287855] sd 1:0:0:0: [sdb] Assuming drive cache: write through [ 3.302228] GPT:Primary header thinks Alt. header is not at the end of the disk. [ 3.303838] GPT:5621105 != 30736383 [ 3.305312] GPT:Alternate GPT header not at the end of the disk. [ 3.306924] GPT:5621105 != 30736383 [ 3.308380] GPT: Use GNU Parted to correct GPT errors. [ 3.309929] sdb: sdb1 sdb2 sdb3 [ 3.316102] sd 1:0:0:0: [sdb] Attached SCSI removable disk [ 3.383033] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null) [ 3.386679] VFS: Mounted root (ext4 filesystem) readonly on device 8:18. [ 3.395279] devtmpfs: mounted [ 3.403013] Freeing unused kernel memory: 1320K (ffffffff81f1d000 - ffffffff82067000) [ 3.407788] Write protecting the kernel read-only data: 14336k [ 3.413256] Freeing unused kernel memory: 880K (ffff880001f24000 - ffff880002000000) [ 3.424961] Freeing unused kernel memory: 1132K (ffff8800022e5000 - ffff880002400000) [ 3.621440] Adding 8272892k swap on /dev/sda3. Priority:-1 extents:1 across:8272892k SS *********************** Central error: [ 3.308380] GPT: Use GNU Parted to correct GPT errors. *********************** [ 3.267271] scsi 1:0:0:0: Direct-Access Kingston HyperX Fury 3.0 PMAP PQ: 0 ANSI: 6 [ 3.273997] sd 1:0:0:0: [sdb] 30736384 512-byte logical blocks: (15.7 GB/14.7 GiB) [ 3.280544] sd 1:0:0:0: [sdb] Write Protect is off [ 3.285259] sd 1:0:0:0: [sdb] Mode Sense: 23 00 00 00 [ 3.286629] sd 1:0:0:0: [sdb] No Caching mode page found [ 3.287855] sd 1:0:0:0: [sdb] Assuming drive cache: write through [ 3.302228] GPT:Primary header thinks Alt. header is not at the end of the disk. [ 3.303838] GPT:5621105 != 30736383 [ 3.305312] GPT:Alternate GPT header not at the end of the disk. [ 3.306924] GPT:5621105 != 30736383 [ 3.308380] GPT: Use GNU Parted to correct GPT errors. [ 3.309929] sdb: sdb1 sdb2 sdb3 [ 3.316102] sd 1:0:0:0: [sdb] Attached SCSI removable disk [ 3.383033] EXT4-fs (sdb2): mounted filesystem with ordered data mode. Opts: (null) [ 3.386679] VFS: Mounted root (ext4 filesystem) readonly on device 8:18. [ 3.395279] devtmpfs: mounted [ 3.403013] Freeing unused kernel memory: 1320K (ffffffff81f1d000 - ffffffff82067000) [ 3.407788] Write protecting the kernel read-only data: 14336k [ 3.413256] Freeing unused kernel memory: 880K (ffff880001f24000 - ffff880002000000) [ 3.424961] Freeing unused kernel memory: 1132K (ffff8800022e5000 - ffff880002400000) [ 3.621440] Adding 8272892k swap on /dev/sda3. Priority:-1 extents:1 across:8272892k SS *********************** Created attachment 3493 [details]
results-bitbake-worker_x86-64-wic_nuc.log
Created attachment 3502 [details]
results-bitbake-worker_x86-wic_mmax32_2.2rc6.log
This issue was also reproducible on 2.2 rc6 (WIC): STATUS: FAILED BUILD: 2.2.rc6: dc8508f609974cc99606b9042bfa7f870ce80228 ENVIRONMENT: genericx86-WIC - on MMAX32bit I have attached the log for further reference. Created attachment 3504 [details]
results-bitbake-worker_x86-64_wic_mmax64_2.2rc6.log
I don’t think it’s a but. The reason of It happens because image doesn’t have the same size as the media. And it shouldn't as at the moment when image is created there is no information about the media it will be flashed to. I should probably give more details: 1. Check if wic image is ok by printing partitions using parted utility: $ oe-run-native parted tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64.wic print WARNING: You are not superuser. Watch out for permissions. Model: (file) Disk /home/ed/git/yocto/poky/build-genericx86-64/tmp/deploy/images/genericx86-64/core-image-minimal-genericx86-64-20161024073137.rootfs.wic: 97.8MB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 25.3MB 24.3MB fat16 primary legacy_boot 2 26.2MB 51.6MB 25.4MB ext4 primary 3 51.6MB 97.7MB 46.1MB linux-swap(v1) primary as you see the image is correct and parted doesn't print any errors. 2. Flash the image to usb stick: sudo dd if=tmp/deploy/images/genricx86-64/core-image-minimal-genericx86-64-20161024073137.rootfs.wic of=/dev/sdb 190944+0 records in 190944+0 records out 97763328 bytes (98 MB) copied, 116.131 s, 842 kB/s 3. Run parted the same way as on step 1 for the USB image: sudo /usr/sbin/parted /dev/sdb print Error: The backup GPT table is not at the end of the disk, as it should be. This might mean that another operating system believes the disk is smaller. Fix, by moving the backup to the end (and removing the old backup)? As you see parted prints error similar to the errors from dmesg output. So, the problem appears only when image is flashed to the device because image and device sizes don't match. There are three possible solutions for this I can think of: 1. whitelist the error as it's harmless. 2. Try to produce an image the same size as the USB stick used to boot DUT. 3. run parted after flashing an image to USB device to correct errors. Any other ideas? sgdisk utility can be used to fix this issue: # sgdisk --move-second-header /dev/sdb The operation has completed successfully. # parted /dev/sdb print Model: Generic STORAGE DEVICE (scsi) Disk /dev/sdb: 3951MB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 25.3MB 24.3MB fat16 primary legacy_boot 2 26.2MB 51.6MB 25.4MB ext4 primary 3 51.6MB 97.7MB 46.1MB linux-swap(v1) primary Summary: 2 preferred ways to fix this issue are: 1. Ignore/whitelist GPT warnings as the device is fully functional 2. Move backup gpt header to the end of device after flashing using sgdisk --move-second-header <device> Both ways were successfully tested on MinnowBoard Max. As per Saul's request on the bug triage meeting, this issue will be white-listed. |
Created attachment 3485 [details] results-bitbake-worker_X86-wic_mmax32.log STATUS: FAILED BUILD: 2.2.rc4(M4): 4b94b498e21aeba945fe7e72a6b7c4bb0314fb83 ENVIRONMENT: genericx86-WIC - on MMAX32bit STEPS TO REPRODUCE: Parse dmesg log and all log files in /var/log for keywords like: "error" , "failed" , "cannot", "can't" etc. Filter out the known and invalid errors or errors that appear in certain situations and need to be ignored. EXPECTED OUTCOME: No errors or fails should be present in logs ACTUAL: ----------------------- Central error: [ 4.928340] GPT: Use GNU Parted to correct GPT errors. *********************** [ 4.413554] scsi 0:0:0:0: Direct-Access Kingston HyperX Fury 3.0 PMAP PQ: 0 ANSI: 6 [ 4.846201] sd 0:0:0:0: [sda] 30736384 512-byte logical blocks: (15.7 GB/14.7 GiB) [ 4.854883] sd 0:0:0:0: [sda] Write Protect is off [ 4.858917] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00 [ 4.860387] sd 0:0:0:0: [sda] No Caching mode page found [ 4.865001] sd 0:0:0:0: [sda] Assuming drive cache: write through [ 4.910903] GPT:Primary header thinks Alt. header is not at the end of the disk. [ 4.917912] GPT:5378309 != 30736383 [ 4.920433] GPT:Alternate GPT header not at the end of the disk. [ 4.925833] GPT:5378309 != 30736383 [ 4.928340] GPT: Use GNU Parted to correct GPT errors. [ 4.932776] sda: sda1 sda2 sda3 [ 4.940844] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 4.980221] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null) [ 4.987561] VFS: Mounted root (ext4 filesystem) readonly on device 8:2. [ 4.995385] devtmpfs: mounted [ 4.997695] Freeing unused kernel memory: 748K (c1c10000 - c1ccb000) [ 5.003735] Write protecting the kernel text: 9032k [ 5.008065] Write protecting the kernel read-only data: 2560k [ 5.249274] Adding 45052k swap on /dev/sda3. Priority:-1 extents:1 across:45052k [ 5.346028] udevd[141]: starting version 3.2 *********************** Log: /home/jairdeje/source/TR_2016-10-18/poky-wic32/build/tmp/work/genericx86-poky-linux/core-image-sato-sdk/1.0-r0/dmesg_output.log ----------------------- Central error: [ 4.928340] GPT: Use GNU Parted to correct GPT errors. *********************** [ 4.413554] scsi 0:0:0:0: Direct-Access Kingston HyperX Fury 3.0 PMAP PQ: 0 ANSI: 6 [ 4.846201] sd 0:0:0:0: [sda] 30736384 512-byte logical blocks: (15.7 GB/14.7 GiB) [ 4.854883] sd 0:0:0:0: [sda] Write Protect is off [ 4.858917] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00 [ 4.860387] sd 0:0:0:0: [sda] No Caching mode page found [ 4.865001] sd 0:0:0:0: [sda] Assuming drive cache: write through [ 4.910903] GPT:Primary header thinks Alt. header is not at the end of the disk. [ 4.917912] GPT:5378309 != 30736383 [ 4.920433] GPT:Alternate GPT header not at the end of the disk. [ 4.925833] GPT:5378309 != 30736383 [ 4.928340] GPT: Use GNU Parted to correct GPT errors. [ 4.932776] sda: sda1 sda2 sda3 [ 4.940844] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 4.980221] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null) [ 4.987561] VFS: Mounted root (ext4 filesystem) readonly on device 8:2. [ 4.995385] devtmpfs: mounted [ 4.997695] Freeing unused kernel memory: 748K (c1c10000 - c1ccb000) [ 5.003735] Write protecting the kernel text: 9032k [ 5.008065] Write protecting the kernel read-only data: 2560k [ 5.249274] Adding 45052k swap on /dev/sda3. Priority:-1 extents:1 across:45052k [ 5.346028] udevd[141]: starting version 3.2 ***********************