https://bugs.kde.org/show_bug.cgi?id=510525

            Bug ID: 510525
           Summary: kio_http_cache_cleaner is stealing and hanging on
                    accessing digital TV tuner files
    Classification: Frameworks and Libraries
           Product: frameworks-kio
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Other
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: HTTP
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

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/`?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to