• The forum software that supports hummy.tv will be upgraded to XenForo 2.3 on Wednesday the 20th of November 2024 starting at 7pm

    There will be some periods where the forum is unavailable, please bear with us. More details can be found in the upgrade thread.

Auto-unprotect not doing its thing

No, it's a memory leak. At least that confirms my suspicion and it should be fixed after tonight's update.
I am not sure that it is fixed, I've just installed the latest Recmon, Epg and Webif packages. Stopped and restarted Recmon from services menu.

Still have a large and increasing number of anon entries
Code:
pmap `pgrep -f sbin/recmon`
15556:   /mod/sbin/recmon -d -D /media/My Video
00400000     16K r-x--  /mnt/hd2/mod/sbin/recmon
00413000      4K rw---  /mnt/hd2/mod/sbin/recmon
00414000     76K rwx--    [ anon ]
2aaa8000     28K r-x--  /lib/ld-uClibc-0.9.29.so
2aaaf000      4K r----  /lib/ld-uClibc-0.9.29.so
2aab0000      4K rw---  /lib/ld-uClibc-0.9.29.so
2aab1000      8K rw---    [ anon ]
2aab3000     28K r-x--  /mnt/hd2/mod/lib/libinotifytools.so.0.4.1
2aaba000      4K rw---  /mnt/hd2/mod/lib/libinotifytools.so.0.4.1
2aabb000     76K rw---    [ anon ]
2aace000     64K r-x--  /lib/libpthread-0.9.29.so
2aade000      4K r----  /lib/libpthread-0.9.29.so
2aadf000      4K rw---  /lib/libpthread-0.9.29.so
2aae0000      8K rw---    [ anon ]
2aae2000    628K r-x--  /lib/libuClibc-0.9.29.so
2ab7f000      4K r----  /lib/libuClibc-0.9.29.so
2ab80000      4K rw---  /lib/libuClibc-0.9.29.so
2ab81000     24K rw---    [ anon ]
2ab87000      8K r-x--  /lib/libdl-0.9.29.so
2ab89000      4K r----  /lib/libdl-0.9.29.so
2ab8a000      4K rw---  /lib/libdl-0.9.29.so
2ab8b000      4K -----    [ anon ]
2ab8c000   1020K rw---    [ anon ]
2ac8b000      4K -----    [ anon ]
2ac8c000   1020K rw---    [ anon ]
2ad8b000      4K -----    [ anon ]
2ad8c000   1020K rw---    [ anon ]
2ae8b000      4K -----    [ anon ]
2ae8c000   1020K rw---    [ anon ]
2af8b000      4K -----    [ anon ]
2af8c000   1020K rw---    [ anon ]
2b08b000      4K -----    [ anon ]
2b08c000   1020K rw---    [ anon ]
2b18b000      4K -----    [ anon ]
2b18c000   1020K rw---    [ anon ]
2b28b000      4K -----    [ anon ]
2b28c000   1020K rw---    [ anon ]
2b38b000      4K -----    [ anon ]
2b38c000   1020K rw---    [ anon ]
2b48b000      4K -----    [ anon ]
2b48c000   1020K rw---    [ anon ]
2b58b000      4K -----    [ anon ]
2b58c000   1020K rw---    [ anon ]
2b68b000      4K -----    [ anon ]
2b68c000   1020K rw---    [ anon ]
2b78b000      4K -----    [ anon ]
2b78c000   1020K rw---    [ anon ]
2b88b000      4K -----    [ anon ]
2b88c000   1020K rw---    [ anon ]
2b98b000      4K -----    [ anon ]
2b98c000   1020K rw---    [ anon ]
2ba8b000      4K -----    [ anon ]
2ba8c000   1020K rw---    [ anon ]
2bb8b000      4K -----    [ anon ]
2bb8c000   1020K rw---    [ anon ]
7fcc5000     84K rwx--    [ stack ]
total    18496K
A few minutes later
total 23632K
 
I am not sure that it is fixed, I've just installed the latest Recmon, Epg and Webif packages. Stopped and restarted Recmon from services menu.

Still have a large and increasing number of anon entries
I have a small number but it isn't increasing, even when I force through multiple recmon actions.
Code:
humax# pmap 22455 | grep -c 1020K
15
That's normal behaviour - the library keeps the stacks from old threads around and will re-use them for new ones.
Has yours stabilised at all?
I think I need to drop the size of that thread stack though - 1MiB per thread is excessive for this.
 
The highest I reached was 34952K before I restarted Recmon again.
I have 8 entries in my recmon.d so after reboot with 9 stack frames the size is total 10272K

I will monitor usage over the day and see how it goes.

There could be significant bursts of close to simultaneous activity if you select a list of files for moving/deletion (especially with the FlatView clones),
DetectAds also create multiple working files when triggered for recording start and then there is the deletion and renaming of files when detection is completed.

Reducing stack frame size seems like a good idea - very little processing is done under the tasks spawned by recmon, the detectads task just starts, if needed, another task to run asynchronously to do the real work.
 
The new version will use fewer threads in general and a smaller stack size:

Code:
2ab8c000  12K rw---  [ anon ]
2ab8f000  4K -----  [ anon ]
2ab90000  12K rw---  [ anon ]
2ab93000  4K -----  [ anon ]

The stack only needs to be big enough for spawning the job - the job itself runs as a separate process.
 
I tried moving 33 files from the dustbin to My Video and the stack count increased from 9 to 25,
I then deleted the 33 files again and the stack count increased from 25 to 28,
I then started a recording with ad detection and the stack count increased from 28 to 40 (total 42276K)
Stopping the recording and starting another two recordings didn't change the number of stacks so hopefully I have reached the high water mark.

I will repeat the tests with the new version, when available, even if it uses the same number of threads 40x16K will be significantly less than 40x1MB :)
 
New version now available. It limits thread concurrency and uses the smaller stack.
Isn't that mostly just an address space allocation anyway and not committed storage?
Yes but still better to keep it smaller. In the original version recmon was eventually unable to create a new thread as the old ones were never cleaned up.
 
I tried moving 33 files from the dustbin to My Video and the stack count increased from 9 to 25,
I then deleted the 33 files again and the stack count increased from 25 to 28,
I then started a recording with ad detection and the stack count increased from 28 to 40 (total 42276K)
Stopping the recording and starting another two recordings didn't change the number of stacks so hopefully I have reached the high water mark.

I will repeat the tests with the new version, when available, even if it uses the same number of threads 40x16K will be significantly less than 40x1MB :)
Repeating most of my tests with the latest version I peaked at 26 threads and total 1548K

I think the chances of Recmon running out of allocatable storage are now highly remote! :)
 
Typically as soon as I turned off debugging logging for recmon it failed to generate a -start event for a recording and so DetectAds failed to start for that program. :(
Recmon did generate other events at around the same time and there are no dumps so it was running. Start events have been generated for most recording but I am also missing another -start

I will turn on logging again and see if it shows any details but it reminds me of a problem we had a while back when recmon started to generate -start events
 
Back
Top