openatv / enigma2

openatv-gui
GNU General Public License v2.0
200 stars 315 forks source link

SF8008 Unable to add a timer #3054

Closed jeepcook closed 1 year ago

jeepcook commented 1 year ago

Until few image builds, I am unable to add a timer (Zap or record) on a SF8008. An enigma2 crash occurs.

In fact, the hdd is seen as flash so is forbidden

Here are the screenshots and the result of blkid and mount commands where we can see that sda1 is the external hdd and not the flash disk.

root@sf8008:~# blkid /dev/sda1: UUID="1cc3f0b8-9de5-4e66-92c6-e18343a9535c" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="7a54209e-01" /dev/mmcblk0p3: SEC_TYPE="msdos" UUID="280F-2363" BLOCK_SIZE="512" TYPE="vfat" /dev/mmcblk0p16: UUID="47f12fa3-c63b-4051-a1d0-f6a14cd23cc1" BLOCK_SIZE="4096" TYPE="ext4"

root@sf8008:~# mount /dev/mmcblk0p16 on / type ext4 (rw,relatime,data=ordered) proc on /proc type proc (rw,relatime) sysfs on /sys type sysfs (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) configfs on /sys/kernel/config type configfs (rw,relatime) devtmpfs on /dev type devtmpfs (rw,relatime,size=469232k,nr_inodes=117308,mode=755) tmpfs on /media type tmpfs (rw,relatime,size=64k,nr_inodes=117378) tmpfs on /var/volatile type tmpfs (rw,relatime,size=469512k,nr_inodes=117378) /dev/sda1 on /media/hdd type ext4 (rw,relatime,data=ordered) /dev/mmcblk0p3 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620) fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime) nfsd on /proc/fs/nfsd type nfsd (rw,relatime) /etc/auto.network on /media/autofs type autofs (rw,relatime,fd=6,pgrp=2415,timeout=5,minproto=5,maxproto=5,indirect)

Image/Box Model (please complete the following information):

5002_0_1_617F_6F1D_1D77_1010101_0_0_0_20230923062100 5002_0_1_617F_6F1D_1D77_1010101_0_0_0_20230923062419

(Other problem, you can see that there is a strange square in the top left.)

jbleyel commented 1 year ago

Please reboot and then try to create the timer again and then send me the debug log.

jeepcook commented 1 year ago

Here are the logs 20230923-065412-enigma2-crash.zip 20230923-065337-enigma2-debug.zip

jeepcook commented 1 year ago

2 commits concerning SF8008 box were done the 20230902 on harddisk.py. usb are now showed as internal, it does not concern hdd apparently but I don't understand why usb are now internal drives, this has no sense.

jbleyel commented 1 year ago

You cannot record 5002 ServiceApp channels. This is not supported.

jeepcook commented 1 year ago

The zap timer doesn't work too. It worked days/weeks ago. It's not a 5002 problem I think

Here is the screenshot of the playback settings, /media/hdd/movie is displayed as Flash directory. So there is a real bug. 5002_0_1_73FD_723A_3AFC_1010101_0_0_0_20230923083206

jeepcook commented 1 year ago

And the problem is the same for 4097 or 1 channels.

jbleyel commented 1 year ago

There are 2 different issues. A) recording of non valid channels cause a crash. B) your media/hdd is not correct detected.

jeepcook commented 1 year ago

I can confirm that 5002 records, timeshift and zap timer worked before. I'm using 5002 since month/years.

The problem is about the media/hdd not correct detected. What do you think about this? It's a sf8008 specific bug?

Edit: everything in my hdd is displayed, recorded movies, pictures, files ... So it's not a hdd problem but an image problem.

jbleyel commented 1 year ago

please create a py file with this content and run the py file on the box.

from os import stat
from os.path import isdir

DEFAULT_INHIBIT_DIRECTORIES = ("/bin", "/boot", "/dev", "/etc", "/home", "/lib", "/picon", "/piconlcd", "/proc", "/run", "/sbin", "/share", "/sys", "/tmp", "/usr", "/var")
DEFAULT_INHIBIT_DEVICES = []
for dir in DEFAULT_INHIBIT_DIRECTORIES + ("/", "/media"):
    if isdir(dir):
        device = stat(dir).st_dev
        if device not in DEFAULT_INHIBIT_DEVICES:
            DEFAULT_INHIBIT_DEVICES.append(device)

print(DEFAULT_INHIBIT_DEVICES)
print(stat("/media/hdd/movie/").st_dev)
jeepcook commented 1 year ago

The output is:

root@sf8008:~# python test.py [66312, 45827, 6, 2049, 4, 14, 17, 16] 2049

IanSav commented 1 year ago

When I have seen this issue in the past it turned out that the recording device was NOT being mounted. When this happens the system creates a recording directory on the flash disk. It looks like it is the correct mass storage device but is in fact the flash disk.

Posting the results of a "mount" command may help to explain the issue.

jeepcook commented 1 year ago

mount command already posted in the first post. /dev/sda1 is mounted on /media/hdd

I have no problem with my hdd. As said, every files are seen by my box. Just a problem with timer as showed in screenshots

jeepcook commented 1 year ago

Did a lot of tests and modifications and finally found the problem (issue?).

In fact if /picon is a link to another directory in internal flash or external hdd, the hdd is seen as internal in the playback settings, and in timer (zap or record).

Very strange comportment. Is this wanted or a bug ?

Thanks

jeepcook commented 1 year ago

I've moved the /picon link to /usr/share/enigma2/ so now it's ok.

jeepcook commented 1 year ago

Hello, Can we conclude there is an issue if /picon is a link and not a directory? Thanks

IanSav commented 1 year ago

Did you flash the firmware or install a picon package and the error occurred or did you manually change something to do with the /picon directory?

jeepcook commented 1 year ago

The /picon directory doesn't exist by default. It isn't in the images. So we can create it to add picons, but in my configuration, instead of creating a directory I created a link to an external directory, it's an easy linux possibility. So I don't understand why this cause a bug on the detection of the hdd as internal instead as external in timer. It has nothing to do.

IanSav commented 1 year ago

Manually creating files or directories outside of Enigma2 can have all sorts of unexpected side-effects. So let me ask again, do you experience any issues if you install any of the standard picon packages?

jeepcook commented 1 year ago

I never install picon packages.

IanSav commented 1 year ago

So if you are making manual changes then you need to follow the exact procedures used by the established packages. That includes using the standard locations.

jeepcook commented 1 year ago

to have a link or a directory is a standard location... As is often the case, I feel that we are going to place the blame on the user rather than investigate.

jbleyel commented 1 year ago

one part of this issue is fixed by -> https://github.com/openatv/enigma2/pull/3057/commits/1bafd507f65ed1c85f94e22ff30b8fa212114220

jeepcook commented 1 year ago

Ok, thanks to everyone answered me

I have 2 questions:

drwxr-xr-x 2 root root 4096 Sep 23 15:58 bin drwxr-xr-x 2 root root 16384 Jan 1 1970 boot drwxr-xr-x 14 root root 4420 Sep 23 15:59 dev drwxr-xr-x 49 root root 4096 Sep 24 11:24 etc lrwxrwxrwx 1 root root 9 Sep 23 17:49 hdd -> media/hdd drwxr-xr-x 3 root root 4096 Jul 7 22:04 home drwxr-xr-x 8 root root 4096 Sep 23 17:47 lib drwxrwxrwt 4 root root 80 Sep 23 15:59 media lrwxrwxrwx 1 root root 5 Sep 23 17:49 mnt -> media dr-xr-xr-x 187 root root 0 Jan 1 1970 proc drwxr-xr-x 7 root root 4096 Sep 23 19:58 run drwxr-xr-x 2 root root 4096 Sep 23 17:47 sbin lrwxrwxrwx 1 root root 10 Sep 23 17:49 share -> /usr/share dr-xr-xr-x 12 root root 0 Sep 23 19:38 sys lrwxrwxrwx 1 root root 18 Sep 24 13:57 test -> /media/hdd/install lrwxrwxrwx 1 root root 17 Sep 23 15:57 tmp -> /var/volatile/tmp drwxr-xr-x 11 root root 4096 Sep 23 17:49 usr drwxr-xr-x 7 root root 4096 Sep 23 15:57 var

jbleyel commented 1 year ago

The second part of the issue is also fixed:

https://github.com/openatv/enigma2/pull/3060/commits/6ac13c6f318d582311395fb6bf012e2dda3e9adf