Unable to boot normally when Samsung USB key plugged?

Hi,
Since the last update (2017.12-1, kernel 4.9.29-13-osmc) I’ve a strange issue. My Pi3 is unable to boot normally and falls into failsafe boot , but only if my USB Samsung Flash Drive FIT (128Go vfat) is plugged?
If I unplug this USB key before booting, everything is OK and I can plug it after kodi is started, kodi reconize it. It’s happen only with this USB key model, not with other (with smaller size) ?

When this Samsung Flash Drive FIT USB key is plugged at boot , systemd-udev-trigger.service fails. The journactl -xe command return the following log

janv. 11 22:16:34 osmc kernel: Hardware name: BCM2835
janv. 11 22:16:34 osmc kernel: task: ae22d880 task.stack: ab0d4000
janv. 11 22:16:34 osmc kernel: PC is at seq_read+0x13c/0x730
janv. 11 22:16:34 osmc kernel: LR is at 0xa0000013
janv. 11 22:16:34 osmc kernel: pc : [<80325e68>]    lr : [<a0000013>]    psr: 60000013
                               sp : ab0d5e48  ip : 00000000  fp : ab0d5eb4
janv. 11 22:16:34 osmc kernel: r10: 00000000  r9 : ab0d5f78  r8 : ae14ba80
janv. 11 22:16:34 osmc kernel: r7 : ab0d5e78  r6 : 803939e8  r5 : 00000000  r4 : abc97880
janv. 11 22:16:34 osmc kernel: r3 : 00000000  r2 : 00000000  r1 : ab0d5e78  r0 : abc97880
janv. 11 22:16:34 osmc kernel: Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
janv. 11 22:16:34 osmc kernel: Control: 10c5383d  Table: 2ded006a  DAC: 00000055
janv. 11 22:16:34 osmc kernel: Process udevadm (pid: 1757, stack limit = 0xab0d4210)
janv. 11 22:16:34 osmc kernel: Stack: (0xab0d5e48 to 0xab0d6000)
janv. 11 22:16:34 osmc kernel: 5e40:                   0000000d abebb034 00000000 ab0d5ea8 ab0d5f78 abc978b0
janv. 11 22:16:34 osmc kernel: 5e60: 5580bf20 00001000 aded1560 abebb034 00000000 00000000 00000000 00000000
janv. 11 22:16:34 osmc kernel: 5e80: ae22d880 00000817 5580df2c abc97200 00001000 803939e8 5580bf20 ab0d5f78
janv. 11 22:16:34 osmc kernel: 5ea0: ab0d5f78 00000000 ab0d5ef4 ab0d5eb8 80393b1c 80325d38 000081a4 00000000
janv. 11 22:16:34 osmc kernel: 5ec0: 00000000 5580bf20 adceda78 ae14ba80 00001000 803939e8 5580bf20 00000000
janv. 11 22:16:34 osmc kernel: 5ee0: ab0d5f78 00000000 ab0d5f64 ab0d5ef8 802eae74 803939f4 80101240 808dbb18
janv. 11 22:16:34 osmc kernel: 5f00: 00000001 1c03a17f 00000c56 00000000 8038f91c ae14ba80 ae14ba80 00000000
janv. 11 22:16:34 osmc kernel: 5f20: ab0d5fa4 ab0d5f30 802f5d1c 802f4e60 00000c56 00000000 0000000f ab0d81a4
janv. 11 22:16:34 osmc kernel: 5f40: ae14ba80 00001000 ae14ba80 5580bf20 00000000 00000000 ab0d5fa4 ab0d5f68
janv. 11 22:16:34 osmc kernel: 5f60: 802ed664 802eae34 00000001 1c03a17f 5580bdb8 76e6fbec 00000000 00000000
janv. 11 22:16:34 osmc kernel: 5f80: 5580bdb8 76e6fbec 00001000 00000003 8010c748 ab0d4000 00000000 ab0d5fa8
janv. 11 22:16:34 osmc kernel: 5fa0: 8010c580 802ed5ac 5580bdb8 76e6fbec 00000005 5580bf20 00001000 00000000
janv. 11 22:16:34 osmc kernel: 5fc0: 5580bdb8 76e6fbec 00001000 00000003 00001000 76e6f7a8 5580bf20 7e9735c8
janv. 11 22:16:34 osmc kernel: 5fe0: 00000000 7e973454 76dd435f 76e10ac6 00000030 00000005 00000000 00000000
janv. 11 22:16:34 osmc kernel: [<80325e68>] (seq_read) from [<80393b1c>] (kernfs_fop_read+0x134/0x1b0)
janv. 11 22:16:34 osmc kernel: [<80393b1c>] (kernfs_fop_read) from [<802eae74>] (vfs_read.part.1+0x4c/0x1f4)
janv. 11 22:16:34 osmc kernel: [<802eae74>] (vfs_read.part.1) from [<802ed664>] (SyS_read+0xc4/0x1bc)
janv. 11 22:16:34 osmc kernel: [<802ed664>] (SyS_read) from [<8010c580>] (ret_fast_syscall+0x0/0x1c)
janv. 11 22:16:34 osmc kernel: Code: e594c048 e1a00004 e16721f0 e1a01007 (e59c3000) 
janv. 11 22:16:34 osmc kernel: ---[ end trace ff48752911ec242e ]---
janv. 11 22:16:34 osmc systemd[1]: systemd-udev-trigger.service: Main process exited, code=killed, status=11/SEGV
janv. 11 22:16:34 osmc systemd[1]: Failed to start udev Coldplug all Devices.
-- Subject: L'unité (unit) systemd-udev-trigger.service a échoué
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- L'unité (unit) systemd-udev-trigger.service a échoué, avec le résultat failed.
janv. 11 22:16:34 osmc systemd[1]: systemd-udev-trigger.service: Unit entered failed state.
janv. 11 22:16:34 osmc systemd[1]: systemd-udev-trigger.service: Failed with result 'signal'.

If I boot on the previous kernel (dpkg-reconfigure rbp2-image-4.9.29-10-osmc) the problem persist ?
I’d not this issue with the previous OSMC release…
Remark: When I plug this USB key after boot, the kernel errors appears in the dmesg command but every thing works…
Thank for your help.

/boot/cmdline.txt =
root=/dev/mmcblk0p2 rootfstype=ext4 rootwait dwc_otg.fiq_fix_enable=1 dwc_otg.lpm_enable=0 quiet osmcdev=rbp2

/boot/config.txt

dtoverlay=hifiberry-digi-overlay
dtparam=audio=off
gpu_mem_1024=256
over_voltage=0
over_voltage_sdram=0
force_turbo=0
disable_splash=1
initial_turbo=0
start_x=1
sdtv_aspect=1
disable_overscan=1
hdmi_force_hotplug=1
hdmi_edid_file=1
arm_freq=1000
hdmi_ignore_cec_init=1
gpu_mem_256=112
gpu_mem_512=144
dtoverlay=lirc-rpi
dtparam=gpio_in_pin=13
dtparam=gpio_out_pin=17

Are you able to get full debug logs, please?

Hi,
Thank for your answer.
Want do you mean by a ‘full debug log’? When normal boot fails, it boot in failsafe mode (mediacenter.service as other services does not start, and it’s not possible to start it) and the only errors I 've are thus given by journalctl -xe command. Which other command may I enter ?

Normally, you could go grab-logs -A and a file would be written to the /boot directory. It sounds like you are in the Rescue Console which is in ramfs. Unless you can mount a card or a disc to write that file to I’m not sure how to proceed. Maybe @sam_nazarko can advise.

Even a log made from MyOSMC after you have booted without the USB attached then plugged it in would help.

Suggestions:

  • Try format the stick with another filesystem, if this still fails.
    • Try another power supply
    • Try another USB stick

Sam

Thank to you. I will try grab-logs -A this evening after mount /boot rw.
The kernel error is due to the
udevadm trigger --type=devices --action=add
command launched by systemd-udev-trigger.service

Hi,
Here is my grab-logs -A with the Samsung USB key plugged after the boot.

https://paste.osmc.tv/wugomaqere

@sam_nazarko : With another power supply it’s the same. With another USB stick, it works. I will try to change FS format later.

Hi

Thanks for letting me know. The problem may be with the USB stick, although it’s not clear why at the moment.

Sam

As expected, the problem don’t depend of the Samsung 128G USB stick filesystem format :disappointed_relieved:
I tried with ntfs and with ext4 … same kernel errors.
I don’t have issue with this stick on my other Pis (Pi Zero and RBPi2) with Jessie.
Anyway, I will continue to take care to unplug it before booting.
Thank you very much.

(I’ve tried to replace libarmmem.so from rbp2-armmem-osmc by thus from raspi-copied-and-fills.deb but issue remain …)

Another information which may help : when I plug it after the boot , it works (but with kernel errors), when I unplugged it (afetr unmount of course) I have this message

[sda] Synchronize Cache(10) failed : Result: hostbyte=0x01 driverbyte=0x00

In fact my issue looks very like this one
https://discourse.osmc.tv/t/boot-freeze-with-external-hd-on-latest-update

I don’t think the problem is caused by this.
Kernel bump for Pi soon. So check after this is done. It might resolve the problem