User-Agent: Build Identifier: After reloading background image (using xfdesktop -reload) memory usage of xfdesktop always grows, this can be easly seen by $ top. It is likely some metadata memory is not released. Reproducible: Always Steps to Reproduce: 1. Create a large image listing (a lot of file names, mine has 450 entries), e.g. ~/viewlist 2. Setup this file as background images list (e.g. <option name="imagepath_0_0" type="string" value="/home/andrew/viewlist"/> or the same using gui) 3. Issue $ xfdesktop -reload command several times, e.g.: for (( i=0; i<50; i++ )); do xfdesktop -reload; done 4. Compare results of $ top -p `pidof xfdesktop` before and after step 3. Actual Results: Before step 3: 7459 andrew 15 0 79988 10m 9532 S 0.0 0.7 0:00 0 xfdesktop After step 3: 7459 andrew 15 0 82708 13m 9808 S 0.0 0.9 0:27 0 xfdesktop After repeating step 3 again: 7459 andrew 15 0 85384 16m 9808 S 0.0 1.1 0:55 0 xfdesktop Expected Results: Memory usage should not significantly change (perhaps shouldn't change at all). This error was also present in the xfce4-4.2.0.
I can reproduce this with a Xfce 4.4.1 built on a Debian Etch: $ pidof xfdesktop 17164 $ grep RSS /proc/17164/status VmRSS: 17512 kB $ xfdesktop --reload $ grep RSS /proc/17164/status VmRSS: 18976 kB $ My background is set to solid colour.
I tried to create some debug information with valgrind: $ G_DEBUG=gc-friendly G_SLICE=always-malloc valgrind --leak-resolution=high --leak-check=full ./xfdesktop >& valgrind.out After the first try, xfdesktop --reload resulted in this message in valgrind.out: XfceDesktopMenu init failed (The XfceDesktopMenu module could not be loaded: /usr/local/lib/xfce4/modules/xfce4_desktop_menu.so: cannot open shared object fi le: No such file or directory After subsequent runs of xfdesktop --reload, the memory usage didn't increase further. I checked this with the following command: $ grep -E "VmSize|RSS" /proc/`pidof valgrind.bin`/status Then I copied the xfce4_desktop_menu.so from the source directory to /usr/local/lib/xfce4/modules/ and tried again. Now the memory usage grew with each xfdesktop --rebuild run. At the beginning: $ grep -E "VmSize|RSS" /proc/`pidof valgrind.bin`/status VmSize: 146580 kB VmRSS: 71040 kB after 6 reloads: $ grep -E "VmSize|RSS" /proc/`pidof valgrind.bin`/status VmSize: 186872 kB VmRSS: 115920 kB
Created attachment 1347 valgrind output
Comment on attachment 1347 valgrind output Whoops, wrong file.
Created attachment 1348 valgrind output
As I've said elsewhere, you need to pass --num-callers=50 or so to valgrind. At any rate, let's move this back to the old bug. It has more information. *** This bug has been marked as a duplicate of bug 2427 ***
Created attachment 1349 valgrind output for xfce-4.4.1, xfdesktop -reload was issued several times xfce-4.4.1, xfdesktop -reload was issued several times. valgrind command: G_DEBUG=gc-friendly G_SLICE=always-malloc valgrind -v --leak-check=full --leak-resolution=high --num-callers=50 --log-file=xfdesktop-valgrind xfdesktop
(In reply to comment #7) > Created an attachment (id=1349) [details] > valgrind output for xfce-4.4.1, xfdesktop -reload was issued several times > > xfce-4.4.1, xfdesktop -reload was issued several times. > valgrind command: > G_DEBUG=gc-friendly G_SLICE=always-malloc valgrind -v --leak-check=full > --leak-resolution=high --num-callers=50 --log-file=xfdesktop-valgrind xfdesktop > Ooops, wrong list, will resend for bug 2427