Adium

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#15147 closed defect (fixed)

Adium is constantly writing when computer screen is off for a long time

Reported by: eabalea Owned by:
Milestone: Adium 1.4.3 Component: Adium Core
Version: 1.4.1 Severity: normal
Keywords: Cc:
Patch Status:

Description

Summary

Adium keeps writing the same things over and over, every second.

Steps to reproduce

  1. have at least one account connected (I use MSN)
  2. wait for your computer to activate its screen saver, and power the screen off
  3. go yourself to sleep
  4. be awaken by constant 'tick' of your harddrive, about 1 par second
  5. use another machine to connect to your noise-making Mac by SSH
  6. run "sudo fs_usage -f filesys"
  7. see that Adium keeps creating the same directories and writing to the same files every second, and fs_eventd be awaken just after, and mdworker look at what Adium just wrote

Expected results

Well. Not doing useless things?

Actual results

Regression

I use Adium 1.4.1, on MacOSX 10.6.7, and this is an iMac 27" corei5 (late 2009).

Notes

This is a fs_usage trace when this happened this morning (I know, I wake up late on week-ends):

12:20:32  mkdir             /Users                                                                           0.000004   Adium
12:20:32  stat64            /Users                                                                           0.000004   Adium
12:20:32  mkdir             /Users/eabalea                                                                   0.000002   Adium
12:20:32  stat64            /Users/eabalea                                                                   0.000003   Adium
12:20:32  mkdir             /Users/eabalea/Library                                                           0.000002   Adium
12:20:32  stat64            /Users/eabalea/Library                                                           0.000012   Adium
12:20:32  mkdir             /Users/eabalea/Library/Application Support                                       0.000003   Adium
12:20:32  stat64            /Users/eabalea/Library/Application Support                                       0.000009   Adium
12:20:32  mkdir             /Users/eabalea/Library/Application Support/Adium 2.0                             0.000008   Adium
12:20:32  stat64            /Users/eabalea/Library/Application Support/Adium 2.0                             0.000003   Adium
12:20:32  mkdir             /Users/eabalea/Library/Application Support/Adium 2.0/Users                       0.000003   Adium
12:20:32  stat64            /Users/eabalea/Library/Application Support/Adium 2.0/Users                       0.000003   Adium
12:20:32  mkdir             /Users/eabalea/Library/Application Support/Adium 2.0/Users/Default               0.000003   Adium
12:20:32  stat64            /Users/eabalea/Library/Application Support/Adium 2.0/Users/Default               0.000009   Adium
12:20:32  lstat64           alea/Library/Application Support/Adium 2.0/Users/Default/Account Status.plist    0.000017   Adium
12:20:32  open              sers/eabalea/Library/Application Support/Adium 2.0/Users/Default/.dat99a9.5b5    0.000217   Adium
12:20:32  write                                                                                              0.000052   Adium
12:20:32    WrData[async]                                                                                    0.000875 W Adium
12:20:32  fsync                                                                                              0.000917 W Adium
12:20:32  close                                                                                              0.000012   Adium
12:20:32  rename            sers/eabalea/Library/Application Support/Adium 2.0/Users/Default/.dat99a9.5b5    0.000130   Adium
12:20:32  chmod             alea/Library/Application Support/Adium 2.0/Users/Default/Account Status.plist    0.000019   Adium
12:20:32  lstat64           /Users/eabalea/Library/Application Support/Adium 2.0/Users/Default               0.000039   fseventsd
12:20:32  read                                                                                               0.000009   mds
12:20:32  fcntl                                                                                              0.000012   mds
12:20:32  fcntl                                                                                              0.000008   mds
12:20:32  fcntl                                                                                              0.000009   mds
12:20:32  fcntl                                                                                              0.000009   mds
12:20:32  getfsstat64                                                                                        0.000005   coreservices
12:20:32  getfsstat64                                                                                        0.000006   coreservices
12:20:32  fstat64                                                                                            0.000004   mds
12:20:32  open              .                                                                                0.000010   mds
12:20:32  pthread_fchdir                                                                                     0.000002   mds
12:20:32  pthread_fchdir                                                                                     0.000001   mds
12:20:32  close                                                                                              0.000004   mds
12:20:32  fcntl                                                                                              0.000022   mds
12:20:32  lstat64           alea/Library/Application Support/Adium 2.0/Users/Default/Account Status.plist    0.000036   mdworker
12:20:32  getattrlist       alea/Library/Application Support/Adium 2.0/Users/Default/Account Status.plist    0.000007   mdworker
12:20:32  getattrlist       alea/Library/Application Support/Adium 2.0/Users/Default/Account Status.plist    0.000010   mdworker
12:20:32  open              alea/Library/Application Support/Adium 2.0/Users/Default/Account Status.plist    0.000010   mdworker
12:20:32  fstat64                                                                                            0.000002   mdworker
12:20:32  fcntl                                                                                              0.000001   mdworker
12:20:32  flistxattr                                                                                         0.000003   mdworker
12:20:32  close                                                                                              0.000005   mdworker
12:20:32  fstat64                                                                                            0.000003   mds
12:20:32  open              .                                                                                0.000007   mds
12:20:32  pthread_fchdir                                                                                     0.000002   mds
12:20:32  pthread_fchdir                                                                                     0.000003   mds
12:20:32  close                                                                                              0.000004   mds

This pattern repeats every second. As soon as I wake the screen up (touching the mouse or keyboard), this stops. Another day, I noticed that if someone wrote me during the night, then Adium did the same work (mkdir, stat64, open, write, ...) with chat history directories and files.

Change History (6)

comment:1 Changed 8 years ago by jshier

I see this exact behavior on my '09 i7 iMac running 1.4.2 on Lion. Starts after 20 minutes of inactivity with my energy saver set to turn off the screen at 10.

comment:2 follow-ups: Changed 8 years ago by wixardy

I'm going to say it's caused by AIAutomaticStatus.m:237

// Update our idle time
	if (reportIdleEnabled) {
		[adium.preferenceController setPreference:[[notification userInfo]
					     objectForKey:@"idleSince"]
						   forKey:@"idleSince"
						    group:GROUP_ACCOUNT_STATUS];

We could increase the time between updates, or people could get quieter drives.

comment:3 in reply to: ↑ 2 Changed 8 years ago by eabalea

Replying to wixardy:

Thanks for having looked at this, and given an answer.

I'm going to say it's caused by AIAutomaticStatus.m:237

// Update our idle time
	if (reportIdleEnabled) {
    [...]

Are you saying that it works every second because it's idle?
Every second, it wakes up everybody to say "Hey! I'm idle!"... "Hey! Look! I'm not doing anything useful!" :)

I unchecked the preferences boxes, then.

We could increase the time between updates, or people could get quieter drives.

Already did that on my early 2010 iMac (not to solve the problem, but because of SMART failures). You either have to stick to Apple firmwared drives, or launch some software to change the HD fan speed based on SMART-reported HD temperature, or accept your HD fan speed to go crazy. Apple uses a modified firmware in its hard drives, and analog temperature sensors. The firmware changes the way this temperature is reported. As a side effect, periodically reading the SMART temperature produces some hard drive noise.

How could these repeated writes affect SSD drives?

comment:4 in reply to: ↑ 2 Changed 8 years ago by sphynx

Replying to wixardy:

I'm going to say it's caused by AIAutomaticStatus.m:237

// Update our idle time
	if (reportIdleEnabled) {
		[adium.preferenceController setPreference:[[notification userInfo]
					     objectForKey:@"idleSince"]
						   forKey:@"idleSince"
						    group:GROUP_ACCOUNT_STATUS];

We could increase the time between updates, or people could get quieter drives.

Ignoring the questionableness of saving the idleness in preferences, and not buffering this when writing to disk, this shouldn't happen once every second. After the first time, [[adium.preferenceController preferenceForKey:@"IdleSince" group:GROUP_ACCOUNT_STATUS] isEqualToDate:idleSince] should always be true.

comment:5 Changed 8 years ago by Thijs Alkemade <thijsalkemade@…>

  • Resolution set to fixed
  • Status changed from new to closed

(In c80f7570db0a) Separate the setting of auto-idle and auto-away, which can both be enabled or disabled by the user. Compare the new idle time with the old idle time only on seconds, the comparison seemed to fail even when using objects that should be identical, causing Adium to send and write to disk every second.

Fixes #15147, fixes #15364

comment:6 Changed 8 years ago by sphynx

  • Milestone set to Adium 1.4.3

There will hopefully be a new beta next week. Please report if this bug still occurs with that. :)

Note: See TracTickets for help on using tickets.