Bug 367728 - kaffeine-1.3 is killed by kernel: Out of memory: Kill process 22386 (kaffeine)
Summary: kaffeine-1.3 is killed by kernel: Out of memory: Kill process 22386 (kaffeine)
Status: RESOLVED FIXED
Alias: None
Product: kaffeine
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: ROSA RPMs Linux
: NOR grave
Target Milestone: ---
Assignee: Mauro Carvalho Chehab
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-23 15:55 UTC by Rolf Pedersen
Modified: 2017-10-04 09:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.0.10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Pedersen 2016-08-23 15:55:14 UTC
First of all, I think the version is not exactly 1.3-svn.  I have seen this on the distributed Mageia 5 and, now, ROSA R8 rpm packages of kaffeine-1.3  Here's info from rpm:

rolf@z170i /mnt/stuff/rosa $ rpm -qi kaffeine
Name        : kaffeine                     Relocations: (not relocatable)
Version     : 1.3.1                             Vendor: ROSA
Release     : 3                             Build Date: Sat 28 May 2016 04:49:56 PM PDT
Install Date: Sun 21 Aug 2016 07:27:06 PM   Build Host: localhost.localdomain
Group       : Graphical desktop/KDE         Source RPM: kaffeine-1.3.1-3.src.rpm
Size        : 1834877                          License: GPLv2+
Signature   : DSA/SHA1, Sat 28 May 2016 04:49:56 PM PDT, Key ID 4f68d40c9e24b1b5
Packager    : abondrov <andrey.bondrov@rosalab.ru>
URL         : http://kaffeine.kde.org/
Summary     : Media Player for KDE
Architecture: x86_64
Description :
Kaffeine is a KDE Multi Engine Media Player.

I used kaffeine-1.2 for about 2 years on a thin client, HP-GT7725, modest cpu and 2G memory.  I was able to record OTA ATSC television programs, up to two simultaneously, using an Hauppauge HVR-2250 pci-e dual-tuner card with very high reliability.

When Mageia 5 updated to kaffeine-1.3, I started having problems with kaffeine exiting by itself, usually during unattended scheduled recordings, and I found kaffeine was no longer running, my recordings were incomplete, when I looked.  On the occasion or two I monitored the machine, I saw that /tmp filled completely.

I joined a bug at Mageia to report this here: https://bugs.mageia.org/show_bug.cgi?id=18039 and made my own when I got kicked off that one, here: https://bugs.mageia.org/show_bug.cgi?id=18447

With the thin client, given the appearance of memory issues, I doubled ram to 4G but it made no difference.

Now, I've upgraded the HTPC to ASUS Z170I Pro GAMING matx board with i5-6500 to have, for one thing, the 4k capabilities of that cpus Skylake video.  The behavior, kaffeine getting killed due to out of memory, according to similar kernel messages, is the same.  We had kaffeine-2 on Archlinux working well with the new HTPC, https://bugs.kde.org/show_bug.cgi?id=364860 

However, I use this dvbhdhomerun source code: https://github.com/h0tw1r3/dvbhdhomerun to build kernel modules I need to use my HDHomeRun OTA ATSC dual tuner for recording shows with kaffeine. With the Arch 4.6 kernel, the scripts to build from that code no longer work. Arch does maintain a 4.4lts "long-term support" kernel that works with the code but staying back conflicts with my interest to take advantage of development of the kernel driver for intel in newer kernel versions.

I found that ROSA linux, a descendant from Mandrake, has a new release with kernel 4.6 that builds those modules. Also, while the bleeding-edge Arch uses Plasma5 that was, for me, uncomfortably buggy, ROSA is a little more conservative, defaulting to KDE4, although Plasma5 is available.

I have tried building kaffeine-2 on ROSA, including libdvbv5,

$ cmake .
$ make

When I 'run command' or from a custom icon, it doesn't start.  When I invoke it from terminal, I only see:

rolf@z170i ~/kaffeine/kaffeine (master) $ src/kaffeine 
Segmentation fault (core dumped)

Here are some journalctl messages:

--
Aug 21 17:53:34 z170i audit[19432]: <audit-1701> auid=4294967295 uid=501 gid=501 ses=4294967295 pid=19432 comm="kaffeine" exe="/home/rolf/kaffeine/kaffeine/src/kaffeine" sig=11
Aug 21 17:53:35 z170i kernel: kaffeine[19432]: segfault at 7fb72133d0f0 ip 00007fb701e1a14c sp 00007ffdafaf72b0 error 7 in libQtGui.so.4.8.7[7fb701c65000+a1e000]
Aug 21 17:53:35 z170i systemd-coredump[19436]: Failed to generate stack trace: Unwinding not supported for this architecture
Aug 21 17:53:35 z170i systemd-coredump[19436]: Process 19432 (kaffeine) of user 501 dumped core.
Aug 21 17:54:50 z170i audit[20360]: <audit-1701> auid=4294967295 uid=501 gid=501 ses=4294967295 pid=20360 comm="kaffeine" exe="/home/rolf/kaffeine/kaffeine/src/kaffeine" sig=11
Aug 21 17:54:50 z170i kernel: kaffeine[20360]: segfault at 7f63e3c7d0f0 ip 00007f63c47c214c sp 00007ffdbc968240 error 7 in libQtGui.so.4.8.7[7f63c460d000+a1e000]
Aug 21 17:54:50 z170i systemd-coredump[20363]: Failed to generate stack trace: Unwinding not supported for this architecture
Aug 21 17:54:50 z170i systemd-coredump[20363]: Process 20360 (kaffeine) of user 501 dumped core.
Aug 21 17:55:38 z170i audit[21116]: <audit-1701> auid=4294967295 uid=501 gid=501 ses=4294967295 pid=21116 comm="kaffeine" exe="/home/rolf/kaffeine/kaffeine/src/kaffeine" sig=11
Aug 21 17:55:38 z170i kernel: kaffeine[21116]: segfault at 7ffbd9bdd0f0 ip 00007ffbb664c14c sp 00007ffefa0fd160 error 7 in libQtGui.so.4.8.7[7ffbb6497000+a1e000]
Aug 21 17:55:38 z170i systemd-coredump[21119]: Failed to generate stack trace: Unwinding not supported for this architecture
Aug 21 17:55:38 z170i systemd-coredump[21119]: Process 21116 (kaffeine) of user 501 dumped core.
Aug 21 17:59:39 z170i audit[24194]: <audit-1701> auid=4294967295 uid=501 gid=501 ses=4294967295 pid=24194 comm="kaffeine" exe="/home/rolf/kaffeine/kaffeine/src/kaffeine" sig=11
Aug 21 17:59:39 z170i kernel: kaffeine[24194]: segfault at 7f761c7d50f0 ip 00007f75fd2ae14c sp 00007ffe2253eef0 error 7 in libQtGui.so.4.8.7[7f75fd0f9000+a1e000]
Aug 21 17:59:39 z170i systemd-coredump[24197]: Failed to generate stack trace: Unwinding not supported for this architecture
Aug 21 17:59:39 z170i systemd-coredump[24197]: Process 24194 (kaffeine) of user 501 dumped core.

I tried running as root:

Aug 21 18:00:28 z170i sudo[24673]: rolf : TTY=pts/4 ; PWD=/home/rolf ; USER=root ; COMMAND=kaffeine/kaffeine/src/kaffeine
Aug 21 18:00:28 z170i audit[24673]: <audit-1123> pid=24673 uid=501 auid=4294967295 ses=4294967295 msg='cwd="/home/rolf" cmd="kaffeine/kaffeine/src/kaffeine" terminal=pts/4 res=success'
Aug 21 18:00:28 z170i audit[24673]: <audit-1110> pid=24673 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
Aug 21 18:00:28 z170i audit[24673]: <audit-1105> pid=24673 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
Aug 21 18:00:28 z170i audit[24674]: <audit-1701> auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24674 comm="kaffeine" exe="/home/rolf/kaffeine/kaffeine/src/kaffeine" sig=6
Aug 21 18:00:28 z170i audit[24673]: <audit-1106> pid=24673 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
Aug 21 18:00:28 z170i audit[24673]: <audit-1104> pid=24673 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/4 res=success'
--
Aug 21 18:00:28 z170i systemd-coredump[24675]: Process 24674 (kaffeine) of user 0 dumped core.
Aug 21 18:01:01 z170i audit[25134]: <audit-1101> pid=25134 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success

When switching between versions of kaffeine, I delete the configuration files under ~:

rm -rf .local/share/kaffeine/
rm -rf .kde4/share/apps/kaffeine

Possibly, I could manage to install kaffeine-2 on ROSA but I'm comfortable with KDE after 16 years of almost exclusively using it, I am tired of plasma5 popping up the little red bug all the time, and it seems I've established a valid problem on different hardware, different distros, with 1.3, which might still be used significantly.

FWIW, these are currently installed on my ROSA R8 installation:

rolf@z170i /mnt/stuff/rosa $ rpm -qa | grep kf5
lib64kf5archive5-5.24.0-1-rosa2014.1.x86_64
lib64kf5i18n5-5.24.0-1-rosa2014.1.x86_64
lib64kf5configcore5-5.24.0-1-rosa2014.1.x86_64
lib64kf5codecs5-5.24.0-1-rosa2014.1.x86_64
lib64kf5configgui5-5.24.0-1-rosa2014.1.x86_64
lib64kf5widgetsaddons5-5.24.0-1-rosa2014.1.x86_64
lib64kf5guiaddons5-5.24.0-1-rosa2014.1.x86_64
lib64kf5coreaddons5-5.24.0-1-rosa2014.1.x86_64
lib64kf5auth5-5.24.0-1-rosa2014.1.x86_64
lib64kf5configwidgets5-5.24.0-1-rosa2014.1.x86_64
lib64kf5itemviews5-5.24.0-1-rosa2014.1.x86_64
lib64kf5windowsystem5-5.24.0-1-rosa2014.1.x86_64
lib64kf5attica5-5.24.0-1-rosa2014.1.x86_64
lib64kf5iconthemes5-5.24.0-1-rosa2014.1.x86_64
lib64kf5crash5-5.24.0-1-rosa2014.1.x86_64
lib64kf5dbusaddons5-5.24.0-1-rosa2014.1.x86_64
lib64kf5service5-5.24.0-1-rosa2014.1.x86_64
lib64kf5sonnetcore5-5.24.0-1-rosa2014.1.x86_64
lib64kf5sonnetui5-5.24.0-1-rosa2014.1.x86_64
lib64kf5globalaccel5-5.24.0-1-rosa2014.1.x86_64
lib64kf5completion5-5.24.0-1-rosa2014.1.x86_64
lib64kf5globalaccelprivate5-5.24.0-1-rosa2014.1.x86_64
lib64kf5textwidgets5-5.24.0-1-rosa2014.1.x86_64
lib64kf5xmlgui5-5.24.0-1-rosa2014.1.x86_64
lib64kf5kiontlm5-5.24.0-1-rosa2014.1.x86_64
lib64kf5solid5-5.24.0-1-rosa2014.1.x86_64
lib64kf5notifications5-5.24.0-1-rosa2014.1.x86_64
lib64kf5solid-qml-5.24.0-1-rosa2014.1.x86_64
lib64kf5wallet5-5.24.0-1-rosa2014.1.x86_64
kwallet-kf5-i18n-5.24.0-1-rosa2014.1.noarch
lib64kf5kiocore5-5.24.0-1-rosa2014.1.x86_64
lib64kf5jobwidgets5-5.24.0-1-rosa2014.1.x86_64
lib64kf5bookmarks5-5.24.0-1-rosa2014.1.x86_64
lib64kf5kiowidgets5-5.24.0-1-rosa2014.1.x86_64
lib64kf5kiofilewidgets5-5.24.0-1-rosa2014.1.x86_64
lib64kf5parts5-5.24.0-1-rosa2014.1.x86_64
lib64kf5kdelibs4support5-5.24.0-1-rosa2014.1.x86_64
lib64kf5plotting5-5.24.0-1-rosa2014.1.x86_64
lib64kf5notifyconfig5-5.24.0-1-rosa2014.1.x86_64
lib64kf5newstuff5-5.24.0-1-rosa2014.1.x86_64
lib64kf5waylandserver5-5.24.0-1-rosa2014.1.x86_64
lib64kf5waylandclient5-5.24.0-1-rosa2014.1.x86_64
kdnssd-kf5-i18n-5.24.0-1-rosa2014.1.noarch
lib64kf5dnssd5-5.24.0-1-rosa2014.1.x86_64
lib64kf5js5-5.24.0-1-rosa2014.1.x86_64
lib64kf5activities5-5.24.0-1-rosa2014.1.x86_64
lib64kf5pty5-5.24.0-1-rosa2014.1.x86_64
lib64kf5activities-qml-5.24.0-1-rosa2014.1.x86_64
lib64kf5khtml5-5.24.0-1-rosa2014.1.x86_64
lib64kf5dbusaddons-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5solid-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5sonnet-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5archive-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5windowsystem-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5attica-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5coreaddons-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5i18n-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5widgetsaddons-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5itemviews-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5config-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5guiaddons-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5codecs-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5auth-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5completion-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5globalaccel-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5jobwidgets-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5service-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5configwidgets-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5iconthemes-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5kiogui5-5.24.0-1-rosa2014.1.x86_64
lib64kf5textwidgets-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5xmlgui-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5bookmarks-devel-5.24.0-1-rosa2014.1.x86_64
lib64kf5kio-devel-5.24.0-1-rosa2014.1.x86_64


Reproducible: Always

Steps to Reproduce:
1.  Start kaffeine-1.3
2.  Recording two programs simultaneously seems to trigger this behavior more reproducibly.
3.  It might be a factor that I usually leave an instance of vlc running all the time with a display of a webcam v4l2:///dev/video0

Actual Results:  
The kernel kills kaffeine, my recordings are not completed.

The referenced bugs have citations of the kernel messages.  Here are some more current ones:

rolf@z170i /mnt/stuff/rosa $ sudo journalctl | grep kaffeine -A 2
--
Aug 16 06:51:23 z170i kernel: [ 7396]   501  7396  4549369  3848963    8639      20   383171             0 kaffeine
Aug 16 06:51:23 z170i kernel: [ 7843]   501  7843   342966    12103     359       5     2560             0 vlc
Aug 16 06:51:23 z170i kernel: [11204]     0 11204    12953        2      30       3      203             0 sshd
--
Aug 16 06:51:23 z170i kernel: Out of memory: Kill process 7396 (kaffeine) score 922 or sacrifice child
Aug 16 06:51:23 z170i kernel: Killed process 7396 (kaffeine) total-vm:18197476kB, anon-rss:15395332kB, file-rss:0kB, shmem-rss:520kB
Aug 16 06:51:23 z170i kernel: oom_reaper: reaped process 7396 (kaffeine), now anon-rss:0kB, file-rss:0kB, shmem-rss:520kB
Aug 16 07:01:01 z170i audit[3927]: <audit-1101> pid=3927 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
Aug 16 07:01:01 z170i audit[3927]: <audit-1103> pid=3927 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_rootok acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
--
Aug 20 07:39:40 z170i kernel: [13367]   501 13367  4506444  3852945    8563      19   339794             0 kaffeine
Aug 20 07:39:40 z170i kernel: [18071]     0 18071    12953      205      30       3        0             0 sshd
Aug 20 07:39:40 z170i kernel: [18073]   501 18073    12953      203      29       3        0             0 sshd
--
Aug 20 07:39:40 z170i kernel: Out of memory: Kill process 13367 (kaffeine) score 914 or sacrifice child
Aug 20 07:39:40 z170i kernel: Killed process 13367 (kaffeine) total-vm:18025776kB, anon-rss:15408436kB, file-rss:0kB, shmem-rss:3344kB
Aug 20 07:39:40 z170i kernel: oom_reaper: reaped process 13367 (kaffeine), now anon-rss:0kB, file-rss:0kB, shmem-rss:3344kB
Aug 20 08:01:01 z170i audit[1048]: <audit-1101> pid=1048 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
Aug 20 08:01:01 z170i audit[1048]: <audit-1103> pid=1048 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_rootok acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
--
Aug 21 15:53:22 z170i kernel: [20522]   501 20522  4497367  3823965    8605      20   388373             0 kaffeine
Aug 21 15:53:22 z170i kernel: Out of memory: Kill process 20522 (kaffeine) score 918 or sacrifice child
Aug 21 15:53:22 z170i kernel: Killed process 20522 (kaffeine) total-vm:17989468kB, anon-rss:15292484kB, file-rss:0kB, shmem-rss:3376kB
Aug 21 15:53:22 z170i kernel: oom_reaper: reaped process 20522 (kaffeine), now anon-rss:0kB, file-rss:0kB, shmem-rss:3376kB
Aug 21 16:01:01 z170i audit[26866]: <audit-1101> pid=26866 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
Aug 21 16:01:01 z170i audit[26866]: <audit-1103> pid=26866 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_rootok acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
--


Expected Results:  
I'd expect kaffeine-1.3 to work at least as well as kaffeine-1.2

Thanks.
Comment 1 Rolf Pedersen 2016-08-24 11:59:12 UTC
"2. Recording two programs simultaneously seems to trigger this behavior more reproducibly."

rolf@z170i ~ $ rpm -q kaffeine
kaffeine-1.3.1-3-rosa2014.1.x86_64

2016-08-22, kaffeine was killed by this kernel process while two simultaneous 2-hour programs were being recorded after 1 hour 22 minutes:

rolf@z170i ~ $ sudo journalctl | grep kaffeine -A 2

--
Aug 22 21:22:43 z170i kernel: [22386]   501 22386  4589199  3910579    8780      20   378664             0 kaffeine
Aug 22 21:22:43 z170i kernel: [24688]   501 24688   342993     5325     346       4     3657             0 vlc
Aug 22 21:22:43 z170i kernel: [16557]     0 16557    12953      205      30       3        0             0 sshd
--
Aug 22 21:22:43 z170i kernel: Out of memory: Kill process 22386 (kaffeine) score 935 or sacrifice child
Aug 22 21:22:43 z170i kernel: Killed process 22386 (kaffeine) total-vm:18356796kB, anon-rss:15638972kB, file-rss:0kB, shmem-rss:3344kB
Aug 22 21:22:43 z170i kernel: oom_reaper: reaped process 22386 (kaffeine), now anon-rss:0kB, file-rss:0kB, shmem-rss:3344kB
Aug 22 22:01:01 z170i audit[32498]: <audit-1101> pid=32498 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
Aug 22 22:01:01 z170i audit[32498]: <audit-1103> pid=32498 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_rootok acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
--

Last night, 2016-08-23, a solitary 2-hour recording made it to about 1 hour 58 minutes before kaffeine ran out of memory:

--
Aug 23 21:58:52 z170i kernel: [24858]   501 24858  4557346  3831631    8691      21   411371             0 kaffeine
Aug 23 21:58:52 z170i kernel: [ 2511]     0  2511    12953      131      28       3       73             0 sshd
Aug 23 21:58:52 z170i kernel: [ 2513]   501  2513    12953      147      27       3       55             0 sshd
--
Aug 23 21:58:52 z170i kernel: Out of memory: Kill process 24858 (kaffeine) score 925 or sacrifice child
Aug 23 21:58:52 z170i kernel: Killed process 24858 (kaffeine) total-vm:18229384kB, anon-rss:15323012kB, file-rss:0kB, shmem-rss:3512kB
Aug 23 21:58:52 z170i kernel: oom_reaper: reaped process 24858 (kaffeine), now anon-rss:0kB, file-rss:0kB, shmem-rss:3512kB
Aug 23 22:01:01 z170i audit[20033]: <audit-1101> pid=20033 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
Aug 23 22:01:01 z170i audit[20033]: <audit-1103> pid=20033 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_rootok acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'

Not to throw around terms  I don't understand but, taken together with at least one occasion where I was able to observe the gradual filling of /tmp, "memory leak" comes to my mind.

Thanks.
Comment 2 Mauro Carvalho Chehab 2016-08-24 16:06:33 UTC
(In reply to Rolf Pedersen from comment #0)
> When Mageia 5 updated to kaffeine-1.3, I started having problems with
> kaffeine exiting by itself, usually during unattended scheduled recordings,
> and I found kaffeine was no longer running, my recordings were incomplete,
> when I looked.  On the occasion or two I monitored the machine, I saw that
> /tmp filled completely.

Unfortunately, we're not maintaining Kaffeine 1.x upstream anymore. Too much changes since 1.3. There were a similar bug for Kaffeine 1.3. Migrating to Kaffeine 2.x solved it.

> I have tried building kaffeine-2 on ROSA, including libdvbv5,
> 
> $ cmake .
> $ make
> 
> When I 'run command' or from a custom icon, it doesn't start.  When I invoke
> it from terminal, I only see:
> 
> rolf@z170i ~/kaffeine/kaffeine (master) $ src/kaffeine 
> Segmentation fault (core dumped)

If you were compiling libdvbv5 from its source, there was a bug on it, due to some recent features that are under development.

I just added a fix there for it. In such case, please update libdvbv5 from its git tree and recompile/reinstall it. This should solve the issue with kaffeine 2.x.

> I tried running as root:

Not need to run it as root, except if you have broken permissions for the devices under /dev/dvb. In such case, the best would be to fix the permissions, instead of running it as root.
Comment 3 Rolf Pedersen 2016-08-25 01:32:11 UTC
> If you were compiling libdvbv5 from its source, there was a bug on it, due to
> some recent features that are under development.
>
> I just added a fix there for it. In such case, please update libdvbv5 from its
> git tree and recompile/reinstall it. This should solve the issue with kaffeine
> 2.x.

I followed the instructions in README.md of the kaffeine git source:

Compiling libdvbv5 (as normal user):

        wget https://linuxtv.org/downloads/v4l-utils/v4l-utils-1.10.0.tar.bz2
        tar xvf v4l-utils-1.10.0.tar.bz2
        cd v4l-utils
        ./bootstrap.sh && ./configure && make

Installing the library (as root):

        make install

which, it seems to me, built a lot more than libdvbv5.  So, I don't know where is the git source, whether the instructions to build are the same.

Furthermore, I found I had a ROSA package installed that had libdvdv5 in it, afaict:

rolf@z170i ~ $ rpm -ql lib64v4l0
/usr/lib64/libdvbv5.so.0
/usr/lib64/libdvbv5.so.0.0.0
/usr/lib64/libv4l1.so.0
/usr/lib64/libv4l1.so.0.0.0
/usr/lib64/libv4l2.so.0
/usr/lib64/libv4l2.so.0.0.0
/usr/lib64/libv4l2rds.so.0
/usr/lib64/libv4l2rds.so.0.0.0
/usr/lib64/libv4lconvert.so.0
/usr/lib64/libv4lconvert.so.0.0.0

I did sudo make uninstall in the v4l-utils sources, re-installed lib64v4l0, got a fresh copy of kaffeine

git clone git://anongit.kde.org/kaffeine.git

then

cmake .
make

From cmake:

-- The following OPTIONAL packages have not been found:

 * KF5DocTools (required version >= 5.11.0)

-- Looking for include file /home/rolf/kaffeine/kaffeine/include/frontend.h
-- Looking for include file /home/rolf/kaffeine/kaffeine/include/frontend.h - found
-- Checking for module 'libdvbv5'
--   Found libdvbv5, version 1.8.1
-- Found Libdvbv5: /usr/lib64/libdvbv5.so (found version "1.8.1")
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rolf/kaffeine/kaffeine

However, after building and executing kaffeine,
 
Aug 24 18:24:13 z170i audit[8335]: <audit-1701> auid=4294967295 uid=501 gid=501 ses=4294967295 pid=8335 comm="kaffeine" exe="/home/rolf/kaffeine/kaffeine/src/kaffeine" sig=11
Aug 24 18:24:13 z170i kernel: kaffeine[8335]: segfault at 7fbcbe0b90f0 ip 00007fbc9ab3814c sp 00007ffeb3683e30 error 7 in libQtGui.so.4.8.7[7fbc9a983000+a1e000]
Aug 24 18:24:14 z170i systemd-coredump[8338]: Process 8335 (kaffeine) of user 501 dumped core.

Thanks.
Comment 4 Mauro Carvalho Chehab 2016-09-15 11:57:29 UTC
(In reply to Rolf Pedersen from comment #3)
> However, after building and executing kaffeine,
>  
> Aug 24 18:24:13 z170i audit[8335]: <audit-1701> auid=4294967295 uid=501
> gid=501 ses=4294967295 pid=8335 comm="kaffeine"
> exe="/home/rolf/kaffeine/kaffeine/src/kaffeine" sig=11
> Aug 24 18:24:13 z170i kernel: kaffeine[8335]: segfault at 7fbcbe0b90f0 ip
> 00007fbc9ab3814c sp 00007ffeb3683e30 error 7 in
> libQtGui.so.4.8.7[7fbc9a983000+a1e000]

That's weird! why is it trying to use QT4? It seems that there's something wrong on your environment.
Comment 5 Rolf Pedersen 2016-09-15 12:43:57 UTC
Hi, yes.  Kaffeine built, cmake showed everything was available, there were no errors with make, except:

..
[ 95%] Linking CXX executable kaffeine
[ 95%] Built target kaffeine
Scanning dependencies of target doc-kaffeine-1
[ 97%] Generating kaffeine.1
Warn: AUTHOR sect.: no personblurb|contrib for Burkhard Lück       kaffeine
Note: AUTHOR sect.: see see http://docbook.sf.net/el/contrib       kaffeine
Note: AUTHOR sect.: see see http://docbook.sf.net/el/personblurb   kaffeine
Note: Writing kaffeine.1
[ 97%] Built target doc-kaffeine-1
Scanning dependencies of target doc-index-cache-bz2
[100%] Generating index.cache.bz2
[100%] Built target doc-index-cache-bz2
 
I have tried resetting the vlc config, per a bug with similar symptoms.  Probably, this problem of mine is because I'm trying to run kaffeine2 in kde4?  Plasma 5 is very immature and buggy where I'm currently living, ROSA R8, but I've got an installation of that desktop on the machine and I'll try this build, there.

Thanks.
Comment 6 Rolf Pedersen 2016-10-04 18:52:43 UTC
(In reply to Mauro Carvalho Chehab from comment #4)
> (In reply to Rolf Pedersen from comment #3)
> > However, after building and executing kaffeine,
> >  
> > Aug 24 18:24:13 z170i audit[8335]: <audit-1701> auid=4294967295 uid=501
> > gid=501 ses=4294967295 pid=8335 comm="kaffeine"
> > exe="/home/rolf/kaffeine/kaffeine/src/kaffeine" sig=11
> > Aug 24 18:24:13 z170i kernel: kaffeine[8335]: segfault at 7fbcbe0b90f0 ip
> > 00007fbc9ab3814c sp 00007ffeb3683e30 error 7 in
> > libQtGui.so.4.8.7[7fbc9a983000+a1e000]
> 
> That's weird! why is it trying to use QT4? It seems that there's something
> wrong on your environment.

I didn't give up!  Although it might be a bit messy to talk about kaffeine-2 in this bug, I think I found a solution to the qt4 problem here: https://bugs.launchpad.net/ubuntu/+source/vlc/+bug/1328466

"Running a Qt5 application using libvlc crashes that application, apparently because of outdated/non-existing VLC cache (backtrace attached below).

Running "/usr/lib/vlc/vlc-cache-gen -f /usr/lib/vlc/plugins/" as root fixes the crash; apparently the Qt4 GUI is being loaded during introspection, causing a symbol clash crash.

According Project Neon packagers, it's a bug in the VLC package as that command should be run after installing to make sure the cache actually reflects what is installed."

What I tried, after locating the proper files in vlc-2.2.4-1plf-plf2014.1.x86_64 on ROSA Desktop Fresh R8 release 2014.1 for x86_64 is

sudo /usr/lib64/vlc/vlc-cache-gen -f /usr/lib64/vlc/plugins/

Right after that, the kaffeine-2.0.5 built from a git pull this morning launched, I was able to configure it, and it's working for me, so far.  (The same build segfaulted as previously before vlc built the cache.)

Still, if I have kaffeine tune and display an ATSC channel, htop reports it uses more than 2 of 4 cores on the i5-6500 CPU @ 3.20GHz (> 200% cpu across several processes).  If I stop the playback, htop shows kaffeine relaxes to one process at 100% and stays there for the few minutes I watched.  If I close kaffeine and start it without opening Digital TV, it doesn't even show up on the first page of htop.  Here, I'm only using to record, so I can workaround, probably, but it doesn't seem healthy, overall, to me.

Thanks.
Comment 7 Mauro Carvalho Chehab 2017-02-16 12:24:28 UTC
(In reply to Rolf Pedersen from comment #6)

> Still, if I have kaffeine tune and display an ATSC channel, htop reports it
> uses more than 2 of 4 cores on the i5-6500 CPU @ 3.20GHz (> 200% cpu across
> several processes).  If I stop the playback, htop shows kaffeine relaxes to
> one process at 100% and stays there for the few minutes I watched.  If I
> close kaffeine and start it without opening Digital TV, it doesn't even show
> up on the first page of htop.  Here, I'm only using to record, so I can
> workaround, probably, but it doesn't seem healthy, overall, to me.

There were a task at EPG handling that had a high performance impact. I solved it by implementing an algorithm that it is a lot faster than the previous one.
See bug #371579.

Could you please test if the issue was solved?

Could you please test again, against upstream version?
Comment 8 Rolf Pedersen 2017-02-16 12:33:46 UTC
(In reply to Mauro Carvalho Chehab from comment #7)
> (In reply to Rolf Pedersen from comment #6)
> 
> > Still, if I have kaffeine tune and display an ATSC channel, htop reports it
> > uses more than 2 of 4 cores on the i5-6500 CPU @ 3.20GHz (> 200% cpu across
> > several processes).  If I stop the playback, htop shows kaffeine relaxes to
> > one process at 100% and stays there for the few minutes I watched.  If I
> > close kaffeine and start it without opening Digital TV, it doesn't even show
> > up on the first page of htop.  Here, I'm only using to record, so I can
> > workaround, probably, but it doesn't seem healthy, overall, to me.
> 
> There were a task at EPG handling that had a high performance impact. I
> solved it by implementing an algorithm that it is a lot faster than the
> previous one.
> See bug #371579.
> 
> Could you please test if the issue was solved?
> 
> Could you please test again, against upstream version?

Yes, I just noticed how your beast of a machine was (also) crippled in the kaffeine-git news feed and immediately wondered if the commit would help with my usage problem ;)  I will pull and build, use it for a while, then report back.
Thanks.
Comment 9 Rolf Pedersen 2017-07-16 01:25:08 UTC
Somewhat recently, my high-CPU problem with kaffeine appears to have been resolved.  I suspect this is mostly due to my move to the development branch, "Cauldron", of Mageia, what will soon be released as Mageia 6.  Here, we are using plasma 5, while I was in plasma 4, before.  Some information from the gui:

Kaffeine
Version 2.0.10

KDE Frameworks 5.32.0
Qt 5.6.2 (built against 5.6.2)
The xcb windowing system

The rpm in use and installation date (I noticed your recent source edits to mitigate CPU usage but this build came before):

[rolf@z170i ~]$ rpm -qa --last | grep kaffeine
kaffeine-handbook-2.0.10-1.mga6.noarch        Sun 02 Jul 2017 05:34:52 AM PDT
kaffeine-2.0.10-1.mga6.x86_64                 Sun 02 Jul 2017 05:34:51 AM PDT

This official Mageia package is working more smoothly than ever and I have not seen the CPU usage problem I was struggling with.  Thanks for all your work with this program, one of my "must haves".