Raspberry Pi 4 - Playing certain files causes Pi to slow to a crawl and requires reboot

Server Version#: 1.21.1.3830
Player Version#: Whatever the latest native Roku tv Plex app is

Hi all, I’ve got a Raspberry pi 4 running the very latest plex server version. I’m experiencing an issue where playing certain video files from external drives - while they appear ok at first - end up in a long/failed buffering and then all other subsequent video play attempts fail. When I log into my Pi desktop during this issue, I’m unable to browse my files - the file browser just locks up.
I just wiped everything and started fresh. Even reformatted what I think is the problematic drive (exfat).

How should I go about diagnosing this issue from here? I can pull logs, but I’m not sure what to be looking for. I can try moving the problematic video files over to another external drive to see if I can isolate the issue to the drive itself.

Any advice would be much appreciated!

Open up a terminal and run journalctl -f then play the movie. You’ll probably see what’s happening

1 Like

Thank you for the reply. So I ran that and started up one of the problem videos. Started off ok but then froze up as expected. Terminal locked up, etc - until I just unplugged the drive and then everything began working fine again.

The logs were pretty uneventful except for the below error popping up a few times… Which doesn’t look great to me. Drive failure? It’s strange that it’s specific to certain files, though.

Dec 29 12:15:11 raspberrypi kernel: sd 1:0:0:0: [sdb] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Dec 29 12:15:11 raspberrypi kernel: sd 1:0:0:0: [sdb] tag#0 Sense Key : 0xb [current]
Dec 29 12:15:11 raspberrypi kernel: sd 1:0:0:0: [sdb] tag#0 ASC=0x47 ASCQ=0x3
Dec 29 12:15:11 raspberrypi kernel: sd 1:0:0:0: [sdb] tag#0 CDB: opcode=0x28 28 00 23 99 16 58 00 01 00 00
Dec 29 12:15:11 raspberrypi kernel: blk_update_request: I/O error, dev sdb, sector 597235288 op 0x0:(READ) flags 0x80700 phys_seg 6 prio class 0

Have you tried replacing your SDCard?

Sorry, I overlooked the part where you say “external drive”. Yeah, I think you should run a fsck -y /dev/sdb on your drive and check if it can fix the error or mark those sectors as bad so you OS stop using it.

1 Like

Thank you again!
So here’s a question… In the logs above I’m seeing reference to “dev sdb”. However, that is not exactly the name of the drive I’m expecting (or any of my drives…). It’s close, though, so good enough?

pi@raspberrypi:~ $ sudo blkid
/dev/mmcblk0p1: LABEL_FATBOOT="boot" LABEL="boot" UUID="04A5-3FE5" TYPE="vfat" PARTUUID="104bf03c-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="c1578b06-85c2-4327-9c65-4c474a8f23f9" TYPE="ext4" PARTUUID="104bf03c-02"
/dev/sda1: LABEL="PiServer" UUID="7AD1-F63D" TYPE="exfat" PARTUUID="b4284591-01"
/dev/sdb1: LABEL="My Passport" UUID="3C60-05AE" TYPE="exfat" PARTLABEL="My Passport" PARTUUID="d22f705d-17f2-4aca-a5b1-8419a9a0e980"
/dev/mmcblk0: PTUUID="104bf03c" PTTYPE="dos"

Assuming that is indeed the drive reference, I ran your suggested line:

pi@raspberrypi:~ $ sudo fsck -y /dev/sdb1
fsck from util-linux 2.33.1
exfatfsck 1.3.0
Checking file system on /dev/sdb1.
WARN: volume was not unmounted cleanly.
File system version           1.0
Sector size                 512 bytes
Cluster size                256 KB
Volume size                 931 GB
Used space                  352 GB
Available space             580 GB
Totally 47 directories and 1211 files.
File system checking finished. No errors found.

Seems ok? Or am I missing something?

sdb is the disk and sdb1 is one of the partitions in the disk, so run on sdb

1 Like

Gotcha, ok. So I ran that and got the below - looks like it doesn’t like that the drive is exfat.

pi@raspberrypi:~ $ sudo fsck -y /dev/sdb
fsck from util-linux 2.33.1
e2fsck 1.44.5 (15-Dec-2018)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

Found a gpt partition table in /dev/sdb

I found exfatfsck and thought perhaps that’s what I should be using instead. But that gave me the below

pi@raspberrypi:~ $ sudo exfatfsck -a /dev/sdb
exfatfsck 1.3.0
Checking file system on /dev/sdb.
ERROR: exFAT file system is not found.
File system checking stopped. ERRORS FOUND: 1, FIXED: 0.

So not sure where I’m left. I’ll try googling a bit more, but otherwise will probably dump the drive. It’s a shame since it’s pretty much new…

Long time I don’t use these tools, maybe the correct way is just pointing to the partition like you did before

1 Like

are you using gnome? Use the Disks application. Right click on the partition and check filesystem and repair…

1 Like

I suppose it is an external drive. Do not directly attach such a drive to your Pi. You need a powered USB-hub or a drive with its own power supply. Also switching to a better power adapter for your Pi might help.

2 Likes

Yes, it’s an external hard drive that is drawing power from the PI’s usb 3 port. Are you thinking that that the drive is underpowered and is causing sporadic failure on only specific video files…? I will look into Power supplies (I’m using the official Rpi power supply) and just a better powered drive as well.

make a quick test. Add a new library and point it to a directory in your SDcard. Add the problematic movie to it and check if the problem goes away

1 Like

So just wanted to thank you guys for your help troubleshooting and diagnosing. I was definitely underpowering the external drives. I bought a powered USB hub, remapped my drives, and now everything works much better. I don’t know why certain files were more impacted than others, but the problem has definitely been resolved.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.