Bug 510525 - kio_http_cache_cleaner is stealing and hanging on accessing digital TV tuner files
Summary: kio_http_cache_cleaner is stealing and hanging on accessing digital TV tuner ...
Status: REPORTED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: HTTP (other bugs)
Version First Reported In: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-12 12:59 UTC by jujjyl
Modified: 2025-10-12 12:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jujjyl 2025-10-12 12:59:01 UTC
I have Linux Mint 22 Cinnamon installation set up as a dedicated digital TV recorder.

This whole system runs just a Python script that looks at TV program guide, and tunes and launches DVB-T recording. (dvbv5-zap to tune, and ffmpeg to record).

The digital TV recorder hardware (the video stream) is accessed as by opening a file `/dev/dvb/adapter<num>/frontend0`.

That file is exclusive, so only one process can open it for reading at a time. Attempting to open the file twice concurrently will yield a `Device or resource busy` error.

The system has worked well for a days, sometimes weeks at a time. But then after some days of uptime, the recorder hangs in these `Device or resource busy` errors, unable to record anything.

When debugging, the TV recorder is unable to proceed because the file `/dev/dvb/adapter<num>/frontend0` is already in use.

Troubleshooting, it looks like it is the executable `kio_http_cache_cleaner` that has opened the digital TV recorder device, preventing my digital TV recorder script from opening the file:

```
$ sudo fuser -v /dev/dvb/adapter2/*
                     USER        PID ACCESS COMMAND
/dev/dvb/adapter2/frontend0:
                     clb       1805289 F.... kio_http_cache_
$ lsof /dev/dvb/adapter2/*
COMMAND       PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
kio_http_ 1805289  clb   44u   CHR  212,8      0t0 1358 /dev/dvb/adapter2/frontend0
$ ps -p 1805289 -o pid,ppid,uid,gid,cmd,etime
    PID    PPID   UID   GID CMD                             ELAPSED
1805289       1  1000  1000 /usr/lib/x86_64-linux-gnu/l  3-01:09:20
```

Force-killing with `pkill -f kio_http_cache_cleaner` resolves this situation, and the digital TV recorder is able to continue again.

It seems like a bug of `kio_http_cache_cleaner` that it would ever attempt to open these digital TV recorder files.

Further, when `kio_http_cache_cleaner` does so, it seems to get permanently stuck on them. I.e. it is not just temporarily opening and closing these, but it seems to steal/hang these file descriptors indefinitely.

Should `kio_http_cache_cleaner` blacklist itself from attempting to access anything under `/dev/`? Or under `/dev/dvb/`?