funomat
Posts: 9
Joined: Tue Mar 29, 2016 8:41 pm

"apt-get upgrade" broken

Tue Mar 29, 2016 8:56 pm

Normal installation of packages worked fine, until I did an

Code: Select all

 apt-get upgrade 
and ended up with

Code: Select all

Preparing to unpack .../raspberrypi-bootloader_1.20160315-1_armhf.deb ...
Leaving 'diversion of /boot/COPYING.linux to /usr/share/rpikernelhack/COPYING.linux by rpikernelhack'
Leaving 'diversion of /boot/LICENCE.broadcom to /usr/share/rpikernelhack/LICENCE.broadcom by rpikernelhack'
Leaving 'diversion of /boot/bcm2708-rpi-b-plus.dtb to /usr/share/rpikernelhack/bcm2708-rpi-b-plus.dtb by rpikernelhack'
Leaving 'diversion of /boot/bcm2708-rpi-b.dtb to /usr/share/rpikernelhack/bcm2708-rpi-b.dtb by rpikernelhack'
Leaving 'diversion of /boot/bcm2708-rpi-cm.dtb to /usr/share/rpikernelhack/bcm2708-rpi-cm.dtb by rpikernelhack'
Leaving 'diversion of /boot/bcm2709-rpi-2-b.dtb to /usr/share/rpikernelhack/bcm2709-rpi-2-b.dtb by rpikernelhack'
Leaving 'diversion of /boot/bcm2710-rpi-3-b.dtb to /usr/share/rpikernelhack/bcm2710-rpi-3-b.dtb by rpikernelhack'
Leaving 'diversion of /boot/bootcode.bin to /usr/share/rpikernelhack/bootcode.bin by rpikernelhack'
Leaving 'diversion of /boot/fixup.dat to /usr/share/rpikernelhack/fixup.dat by rpikernelhack'
Leaving 'diversion of /boot/fixup_cd.dat to /usr/share/rpikernelhack/fixup_cd.dat by rpikernelhack'
Leaving 'diversion of /boot/fixup_db.dat to /usr/share/rpikernelhack/fixup_db.dat by rpikernelhack'
Leaving 'diversion of /boot/fixup_x.dat to /usr/share/rpikernelhack/fixup_x.dat by rpikernelhack'
Leaving 'diversion of /boot/kernel.img to /usr/share/rpikernelhack/kernel.img by rpikernelhack'
Leaving 'diversion of /boot/kernel7.img to /usr/share/rpikernelhack/kernel7.img by rpikernelhack'
Leaving 'diversion of /boot/start.elf to /usr/share/rpikernelhack/start.elf by rpikernelhack'
Leaving 'diversion of /boot/start_cd.elf to /usr/share/rpikernelhack/start_cd.elf by rpikernelhack'
Leaving 'diversion of /boot/start_db.elf to /usr/share/rpikernelhack/start_db.elf by rpikernelhack'
Leaving 'diversion of /boot/start_x.elf to /usr/share/rpikernelhack/start_x.elf by rpikernelhack'
Leaving 'diversion of /boot/overlays/README to /usr/share/rpikernelhack/overlays/README by rpikernelhack'
Leaving 'diversion of /boot/overlays/ads7846-overlay.dtb to /usr/share/rpikernelhack/overlays/ads7846-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/at86rf233-overlay.dtb to /usr/share/rpikernelhack/overlays/at86rf233-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/bmp085_i2c-sensor-overlay.dtb to /usr/share/rpikernelhack/overlays/bmp085_i2c-sensor-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/dht11-overlay.dtb to /usr/share/rpikernelhack/overlays/dht11-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/enc28j60-overlay.dtb to /usr/share/rpikernelhack/overlays/enc28j60-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/gpio-ir-overlay.dtb to /usr/share/rpikernelhack/overlays/gpio-ir-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/gpio-poweroff-overlay.dtb to /usr/share/rpikernelhack/overlays/gpio-poweroff-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/hifiberry-amp-overlay.dtb to /usr/share/rpikernelhack/overlays/hifiberry-amp-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/hifiberry-dac-overlay.dtb to /usr/share/rpikernelhack/overlays/hifiberry-dac-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/hifiberry-dacplus-overlay.dtb to /usr/share/rpikernelhack/overlays/hifiberry-dacplus-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/hifiberry-digi-overlay.dtb to /usr/share/rpikernelhack/overlays/hifiberry-digi-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/hy28a-overlay.dtb to /usr/share/rpikernelhack/overlays/hy28a-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/hy28b-overlay.dtb to /usr/share/rpikernelhack/overlays/hy28b-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/i2c-gpio-overlay.dtb to /usr/share/rpikernelhack/overlays/i2c-gpio-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/i2c-rtc-overlay.dtb to /usr/share/rpikernelhack/overlays/i2c-rtc-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/i2c0-bcm2708-overlay.dtb to /usr/share/rpikernelhack/overlays/i2c0-bcm2708-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/i2c1-bcm2708-overlay.dtb to /usr/share/rpikernelhack/overlays/i2c1-bcm2708-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/i2s-mmap-overlay.dtb to /usr/share/rpikernelhack/overlays/i2s-mmap-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/iqaudio-dac-overlay.dtb to /usr/share/rpikernelhack/overlays/iqaudio-dac-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/iqaudio-dacplus-overlay.dtb to /usr/share/rpikernelhack/overlays/iqaudio-dacplus-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/lirc-rpi-overlay.dtb to /usr/share/rpikernelhack/overlays/lirc-rpi-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/mcp2515-can0-overlay.dtb to /usr/share/rpikernelhack/overlays/mcp2515-can0-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/mcp2515-can1-overlay.dtb to /usr/share/rpikernelhack/overlays/mcp2515-can1-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/mmc-overlay.dtb to /usr/share/rpikernelhack/overlays/mmc-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/mz61581-overlay.dtb to /usr/share/rpikernelhack/overlays/mz61581-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/pi3-disable-bt-overlay.dtb to /usr/share/rpikernelhack/overlays/pi3-disable-bt-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/pi3-miniuart-bt-overlay.dtb to /usr/share/rpikernelhack/overlays/pi3-miniuart-bt-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/piscreen-overlay.dtb to /usr/share/rpikernelhack/overlays/piscreen-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/piscreen2r-overlay.dtb to /usr/share/rpikernelhack/overlays/piscreen2r-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/pitft28-capacitive-overlay.dtb to /usr/share/rpikernelhack/overlays/pitft28-capacitive-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/pitft28-resistive-overlay.dtb to /usr/share/rpikernelhack/overlays/pitft28-resistive-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/pps-gpio-overlay.dtb to /usr/share/rpikernelhack/overlays/pps-gpio-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/pwm-2chan-overlay.dtb to /usr/share/rpikernelhack/overlays/pwm-2chan-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/pwm-overlay.dtb to /usr/share/rpikernelhack/overlays/pwm-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/qca7000-overlay.dtb to /usr/share/rpikernelhack/overlays/qca7000-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/raspidac3-overlay.dtb to /usr/share/rpikernelhack/overlays/raspidac3-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/rpi-backlight-overlay.dtb to /usr/share/rpikernelhack/overlays/rpi-backlight-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/rpi-dac-overlay.dtb to /usr/share/rpikernelhack/overlays/rpi-dac-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/rpi-display-overlay.dtb to /usr/share/rpikernelhack/overlays/rpi-display-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/rpi-ft5406-overlay.dtb to /usr/share/rpikernelhack/overlays/rpi-ft5406-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/rpi-proto-overlay.dtb to /usr/share/rpikernelhack/overlays/rpi-proto-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/rpi-sense-overlay.dtb to /usr/share/rpikernelhack/overlays/rpi-sense-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/sdhost-overlay.dtb to /usr/share/rpikernelhack/overlays/sdhost-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/sdio-overlay.dtb to /usr/share/rpikernelhack/overlays/sdio-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/smi-dev-overlay.dtb to /usr/share/rpikernelhack/overlays/smi-dev-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/smi-nand-overlay.dtb to /usr/share/rpikernelhack/overlays/smi-nand-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/smi-overlay.dtb to /usr/share/rpikernelhack/overlays/smi-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/spi-bcm2708-overlay.dtb to /usr/share/rpikernelhack/overlays/spi-bcm2708-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/spi-bcm2835-overlay.dtb to /usr/share/rpikernelhack/overlays/spi-bcm2835-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/spi-dma-overlay.dtb to /usr/share/rpikernelhack/overlays/spi-dma-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/tinylcd35-overlay.dtb to /usr/share/rpikernelhack/overlays/tinylcd35-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/uart1-overlay.dtb to /usr/share/rpikernelhack/overlays/uart1-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/vc4-kms-v3d-overlay.dtb to /usr/share/rpikernelhack/overlays/vc4-kms-v3d-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/vga666-overlay.dtb to /usr/share/rpikernelhack/overlays/vga666-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/w1-gpio-overlay.dtb to /usr/share/rpikernelhack/overlays/w1-gpio-overlay.dtb by rpikernelhack'
Leaving 'diversion of /boot/overlays/w1-gpio-pullup-overlay.dtb to /usr/share/rpikernelhack/overlays/w1-gpio-pullup-overlay.dtb by rpikernelhack'
Unpacking raspberrypi-bootloader (1.20160315-1) over (1.20160225-1) ...
after which (over ssh) the pi freezes.
If done on a local console, it'll not yet freeze but remount the root filesystem read-only and give some messages about ext4 failures that "shouldn't happen", then I have to sysreq+B it / powercycle (after which it'll boot up fine and be usable again).
Now I'm unable to install any packages anymore, because apt-get will always try to also upgrade raspberrypi-bootloader together with it, which will cause this same result. I have no idea what to do. But I noticed, that for some reason apt-get installed raspberrypi-bootloader of a version that is higher (20160315) than the version of its dependancies (libraspberrypi0, librasbperry-dev something.., -doc and some other. Those were removed by aptitude, which I tried as a last resort to fix this, but which didn't succeed either). And I know that on some attempts of me doing

Code: Select all

apt-get install --reinstall raspberrypi-bootloader
it complained that the bootloader wants those others to be 20160315 too but they are just 20160226 (or 25). Also, before suggesting to delete those packages, aptitude gave an error that it is unable to find a source for downloading raspberrypi-bin (I think, not -bootloader) of the specific 20160226 version.
Any idea how to fix this? And was it wrong of me to try the "apt-get upgrade", which started this whole mess? I just thought that it was the normal way to update all packages?

funomat
Posts: 9
Joined: Tue Mar 29, 2016 8:41 pm

Re: "apt-get upgrade" broken

Wed Mar 30, 2016 9:53 am

Ok thanks, I'll try waiting longer, but is it really normal that it says
"ext4-fs delayed block allocation failed..." and also even says in the same message: "this should not happen! Data will be lost"? :-p

All other read/write operatings work fine btw and I also did a full (non-destructive) read-write test on the SD-Card with "badblocks" and it's 100% ok (and it's in the wiki list of working cards too).

I actually tried from scratch now too: I re-applied the image to the SD card, booted it once to extend the space to the full card capacity, and then before doing anything else (except for WiFi config) I did "apt-get upgrade".
The result is again that it fails with the "ext4-fs delayed block allocation failed" + "this should not happen! Data will be lost", except this now happens when it tries to update a Samba package, not the libraspberry packages. This seems a bit random to me, no?
As I said, I already filled up the whole card with data earlier and did some package installations (before trying "upgrade") which all worked fine. These errors ONLY happen when I try apt-get upgrade!


Edit:
After waiting for 20 Minutes apt-get "finished":

Code: Select all

E: Sub-process /usr/bin/dpkg returned an error code (2)
E:Could not create temporary file for /var/lib/apt/extended_states - mkstemp (30: Read-only file system)
E:Could not open file /var/lib/apt/extended_states - open (2: No such file or directory)
E:Failed to open StateFile /var/lib/apt/extended_states
followed by some more

Code: Select all

[ 4289.902331] EXT4-fs error (device mmcblk0p2): ext4_find_entry 1457: inode <...>
After which no commands (such as 'mount') work anymore, because it seems when this happens the partition gets unmounted. Reboot command doesn't exist either anymore, so it's time to sysreq+B, followed by a power cycle (because sysreq+B won't actually reboot but instead shutdown the pi).
Last edited by funomat on Wed Mar 30, 2016 11:17 am, edited 1 time in total.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6085
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: "apt-get upgrade" broken

Wed Mar 30, 2016 11:16 am

What is the image you are using to start with?

funomat
Posts: 9
Joined: Tue Mar 29, 2016 8:41 pm

Re: "apt-get upgrade" broken

Wed Mar 30, 2016 11:18 am

(Edited my post above.)

I'm using "retropie-v3.6-rpi2_rpi3.img" from http://blog.petrockblock.com/retropie/r ... ry-pi-2-2/
edit: on a raspberry pi 3, devices attached are 2 usb game pads on a passive usb-hub, usb keyboard and usb mouse attached directly, a monitor on the hdmi port, stereo on the audio output, that's it. Using 2,5A PSU recommended specifically for the pi3, with a power cable length of 1.5m. SD-card is a MicroSDHC Card KINGSTON SDCA10/UHS-I 10, 32 GB.


Edit:
I tried again from scratch, this time I unplugged all devices except for the USB-keyboard, monitor and audio.
Again apt-get upgrade (which I this time run through the retropie-setup script specifically, instead of entering it manually) failed at exactly the same position: "unpacking Samba" with the usual stuff "Ext4-fs delayed transaction..". Interestingly the root partition was still mounted, but the 'reboot' command still didn't work as it said it was interrupted by a signal (broken pipe), so it was sysreq+B and powercycle again. :-p
Last edited by funomat on Wed Mar 30, 2016 11:53 am, edited 1 time in total.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6085
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: "apt-get upgrade" broken

Wed Mar 30, 2016 11:35 am

I don't know what firmware/kernel is included in that image, so it is not guaranteed to contain and use the latest sdhost driver with all the fixes. There have been some recent fixes included which make certain cards work with a pi 3.

funomat
Posts: 9
Joined: Tue Mar 29, 2016 8:41 pm

Re: "apt-get upgrade" broken

Wed Mar 30, 2016 11:54 am

Interesting, could you tell me how I can find out kernel and firmware version, please?
And how can I find out the version of the "sdhost driver" and which version does the latest one actually have?
Thanks!

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6085
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: "apt-get upgrade" broken

Wed Mar 30, 2016 12:10 pm

What does 'uname -a' return?

funomat
Posts: 9
Joined: Tue Mar 29, 2016 8:41 pm

Re: "apt-get upgrade" broken

Wed Mar 30, 2016 4:14 pm

Code: Select all

[email protected]:~ $ uname -a
Linux retropie 4.1.18-v7+ #846 SMP Thu Feb 25 14:22:53 GMT 2016 armv7l GNU/Linux

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6085
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: "apt-get upgrade" broken

Wed Mar 30, 2016 4:40 pm

There is a fix in Linux version 4.1.19-v7+ #858 and later.

funomat
Posts: 9
Joined: Tue Mar 29, 2016 8:41 pm

Re: "apt-get upgrade" broken

Wed Mar 30, 2016 10:24 pm

Sounds good!
However, since I cannot apt-upgrade this system I will probably not be able to install that newer kernel, except for dd'ing the whole new image when it is released (and copy over my own data/changes afterwards), I guess? :-p

funomat
Posts: 9
Joined: Tue Mar 29, 2016 8:41 pm

Re: "apt-get upgrade" broken

Thu Mar 31, 2016 3:38 am

Yes I prepared the card on a pc. It worked fine. The card also works fine in the rasppi, I can copy loads of data without problems. The only problem is using apt-get, really.
Using fat32 is an interesting idea, but how does linux rights management work on that filesystem? I also read that ext3 might be more robust than ext4, not sure if it's worth a try.
Also I was wondering.. since only a few apt-get packages cause these problems, if it's maybe to do with memory management? Like, maybe it fails only for packages that exceed a certain size? Need to increase some hidden buffers inside some special settings that I don't know about or something? /paranoia

User avatar
toml_12953
Posts: 11
Joined: Mon Sep 07, 2015 6:26 am

Re: "apt-get upgrade" broken

Thu Apr 07, 2016 12:39 am

Have you tried dist-upgrade instead of upgrade? The differences are found here:

http://askubuntu.com/questions/194651/w ... st-upgrade

Tom L

Return to “Troubleshooting”