After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 514434 - Writes to disk every 40s
Writes to disk every 40s
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
unspecified
Other Linux
: High normal
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-04 23:13 UTC by Benoît Dejean
Modified: 2009-04-23 02:14 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Benoît Dejean 2008-02-04 23:13:24 UTC
iotop shows that tomboy writes to disk every 10sec. That's bad for power consumption.
Comment 1 Kevin Kubasik 2008-02-06 15:17:08 UTC
Def something to address ASAP. Milestoning to 9.x release 
Comment 2 Boyd Timothy 2008-02-26 19:15:38 UTC
Setting the default assignee and QA Contact to "tomboy-maint@gnome.bugs".
Comment 3 Michael Gratton 2008-07-07 15:08:54 UTC
I can confirm this - iotop shows the same thing on my notebook.

tomboy: 0.10.2-0ubuntu1
mono: 1.2.6+dfsg-6ubuntu3

Comment 4 Greg Grossmeier 2008-09-26 20:58:48 UTC
From Launchpad ( https://launchpad.net/bugs/222907 ) people are reporting both 10 seconds and 40 seconds.

From the original reporter in LP (which was taken in April of 2008):
------
Some diagnosis shows that the files affected are in ~.wapi, and that those files are being used by Tomboy.

$ while true; do find . -mmin -1 -type f -print0 | xargs -0 ls --full-time -ltr; echo; sleep 1; done
-rw------- 1 mukesh mukesh 252905 2008-04-26 22:06:54.000000000 -0700 ./.mozilla/firefox/gudrke3v.default/sessionstore.js
-rw------- 1 mukesh mukesh 3686404 2008-04-26 22:07:31.000000000 -0700 ./.wapi/shared_fileshare-qube-Linux-i686-36-11-0
-rw------- 1 mukesh mukesh 1277960 2008-04-26 22:07:31.000000000 -0700 ./.wapi/shared_data-qube-Linux-i686-312-11-0

[9 seconds of output clipped]

-rw------- 1 mukesh mukesh 252905 2008-04-26 22:06:54.000000000 -0700 ./.mozilla/firefox/gudrke3v.default/sessionstore.js
-rw------- 1 mukesh mukesh 3686404 2008-04-26 22:07:41.000000000 -0700 ./.wapi/shared_fileshare-qube-Linux-i686-36-11-0
-rw------- 1 mukesh mukesh 1277960 2008-04-26 22:07:41.000000000 -0700 ./.wapi/shared_data-qube-Linux-i686-312-11-0

[9 seconds of output clipped]

-rw------- 1 mukesh mukesh 252905 2008-04-26 22:06:54.000000000 -0700 ./.mozilla/firefox/gudrke3v.default/sessionstore.js
-rw------- 1 mukesh mukesh 3686404 2008-04-26 22:07:51.000000000 -0700 ./.wapi/shared_fileshare-qube-Linux-i686-36-11-0
-rw------- 1 mukesh mukesh 1277960 2008-04-26 22:07:51.000000000 -0700 ./.wapi/shared_data-qube-Linux-i686-312-11-0

$ lsof -n | grep wapi
tomboy 12832 mukesh mem REG 8,3 3686404 1737315 /home/mukesh/.wapi/shared_fileshare-qube-Linux-i686-36-11-0
tomboy 12832 mukesh mem REG 8,3 1277960 1736941 /home/mukesh/.wapi/shared_data-qube-Linux-i686-312-11-0
------

Also the latest comments says:
"Confirmed on Intrepid Alpha 6 with tomboy 0.11.3-0ubuntu1, and on a fully-updated install with tomboy 0.12.0-0ubuntu1. The update interval appears to be forty seconds."
Comment 5 Benoît Dejean 2008-09-26 21:26:22 UTC
With 0.10.2 (debian/sid) i don't see this behaviour anymore. Tomboy only wakes up every 10s

[pid  5989]      0.000091 semop(0x40008, 0x1, 0, 0x48aa7af8) = 0
[pid  5989]      0.000840 semop(0x40008, 0x1, 0, 0x48aa7af8) = 0
[pid  5989]      0.000104 semop(0x40008, 0x1, 0, 0x48aa7af8) = 0
[pid  5989]      0.000154 waitpid(5987, 0x48aa7a9c, WNOHANG) = -1 ECHILD (No child processes)
[pid  5989]      0.016258 nanosleep({10, 0}, NULL) = 0
[pid  5989]     10.000248 time(NULL)    = 1222464325
[pid  5989]      0.000083 semop(0x40008, 0x1, 0, 0x48aa7af8) = 0
[pid  5989]      0.000091 semop(0x40008, 0x1, 0, 0x48aa7af8) = 0
[pid  5989]      0.000882 semop(0x40008, 0x1, 0, 0x48aa7af8) = 0
[pid  5989]      0.000106 semop(0x40008, 0x1, 0, 0x48aa7af8) = 0
[pid  5989]      0.000153 waitpid(5987, 0x48aa7a9c, WNOHANG) = -1 ECHILD (No child processes)
[pid  5989]      0.000273 nanosleep({10, 0}, NULL) = 0
[pid  5989]     10.000232 time(NULL)    = 1222464335
[pid  5989]      0.000082 semop(0x40008, 0x1, 0, 0x48aa7af8) = 0
[pid  5989]      0.000093 semop(0x40008, 0x1, 0, 0x48aa7af8) = 0
[pid  5989]      0.000945 semop(0x40008, 0x1, 0, 0x48aa7af8) = 0
[pid  5989]      0.000112 semop(0x40008, 0x1, 0, 0x48aa7af8) = 0
[pid  5989]      0.000155 waitpid(5987, 0x48aa7a9c, WNOHANG) = -1 ECHILD (No child processes)
[pid  5989]      0.000275 nanosleep({10, 0}, NULL) = 0
[pid  5989]     10.000228 time(NULL)    = 1222464345
Comment 6 Adam Buchbinder 2008-10-07 16:38:35 UTC
Benoît, did you see something in the systrace -f output when you could reproduce the problem? Are writes not happening on your setup? I don't know exactly what's doing it, but writes are occurring regularly, meaning that I/O is happening even when the machine is idle. It doesn't happen when Tomboy is shut down. Is there a better way for me to trace this so that you can see what I mean? If you run "watch 'find ~/.wapi -mmin -1 -type f -print0 | xargs -0 ls --full-time -ltr'", you'll see it happening with the current version.
Comment 7 Adam Buchbinder 2008-10-07 16:44:59 UTC
Additionally, if you use iotop, you can see that writes being performed by the Tomboy process. (It's easier to see with "iotop -d 10 -u `whoami`", so that it doesn't disappear right after it performs its write.)
Comment 8 Benoît Dejean 2008-10-07 20:43:02 UTC
It's already a strace -f, a bit weird since the child 5989 waits for it's parent 5987 ... no write at all, from time to time, i can see some poll waking up and then doing little chat on a unix socket.

But indeed, these wapi files are mapped :
48566000   1252K rw-s-  /home/benoit/.wapi/shared_data-ibook-Linux-ppc-312-11-0
4869f000   4004K rw-s-  /home/benoit/.wapi/shared_fileshare-ibook-Linux-ppc-40-11-0

and are update every ~40s. So Greg is right, the problem is different from what i saw from the start (write(2)).

(Increasing that 10s interval would anyway save some power)
Comment 9 Sandy Armstrong 2008-10-07 21:05:54 UTC
Is this only happening with Tomboy, or does it happen with other Mono apps?
Comment 10 Benoît Dejean 2008-10-10 21:04:26 UTC
Indeed:

Mono JIT compiler version 1.9.1 (tarball)
Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com
	TLS:           __thread
	GC:            Included Boehm (with typed GC)
	SIGSEGV:       normal
	Notifications: epoll
	Architecture:  ppc
	Disabled:      none


+

public class Sleep
{
	public static void Main()
	{
		System.Threading.Thread.Sleep(3600000);
	}
}

=

~/.wapi/shared_* files are updated every 40s.
Comment 11 Bertrand Lorentz 2008-10-11 10:38:54 UTC
I think it might be related to this :
http://www.mono-project.com/Article:IOChanges#Keeping_State
Comment 12 Sandy Armstrong 2008-10-11 13:28:51 UTC
(In reply to comment #11)
> I think it might be related to this :
> http://www.mono-project.com/Article:IOChanges#Keeping_State

Agreed...please file in Mono bugzilla.  Marking NOTGNOME.
Comment 13 Benoît Dejean 2008-10-11 21:50:46 UTC
https://bugzilla.novell.com/show_bug.cgi?id=434566
Comment 14 Benoît Dejean 2008-10-12 17:36:16 UTC
What about experimenting that workaround https://bugzilla.novell.com/show_bug.cgi?id=434566#c2 ?
Comment 15 Sandy Armstrong 2008-10-12 17:45:55 UTC
(In reply to comment #14)
> What about experimenting that workaround
> https://bugzilla.novell.com/show_bug.cgi?id=434566#c2 ?

Good point.  Re-opening.
Comment 16 Zoltan Varga 2008-10-13 21:52:13 UTC
Setting MONO_DISABLE_SHM means that some things like cross-process mutexes/
semaphores will not work. If tomboy doesn't use those things (likely), then it
will work fine, and won't write to the disk every 40s (I tested this).
Comment 17 Zoltan Varga 2009-02-03 00:06:17 UTC
The underlying problem is now fixed in mono SVN by using Posix shared memory
instead of a file for IPC.
Comment 18 Sandy Armstrong 2009-02-03 00:16:53 UTC
Awesome, thanks Zoltan! Need to look at MONO_DISABLE_SHM and make sure it doesn't cause any problems with dbus, etc.
Comment 19 Sandy Armstrong 2009-02-16 19:12:32 UTC
Okay, committed this fix in r2345.  Works fine for me in openSUSE. If anybody has troubles please let me know!