Bug 3610 - Modest stays in RAM after being closed although it's not set to check mails
: Modest stays in RAM after being closed although it's not set to check mails
Status: RESOLVED WONTFIX
Product: Email
General
: 4.1.1 (4.2008.30-2)
: All Maemo
: Low normal with 1 vote (vote)
: ---
Assigned To: unassigned
: modest-bugs
:
: moreinfo
:
:
  Show dependency tree
 
Reported: 2008-08-19 12:13 UTC by kenneth
Modified: 2009-11-04 18:59 UTC (History)
4 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description kenneth (reporter) 2008-08-19 12:13:44 UTC
when i close modest and check running processes using load-applet, i find that
modest is still hanging around. further investigation seems to indicate that
its sleeping.

i do not have it set to check for new mail at intervals so i would expect it to
fully close when i close the windows.

also, killing it in this state seems to make it forget what mails and similar i
had deleted the last time i had it open.
Comment 1 Eero Tamminen nokia 2008-08-19 12:39:18 UTC
This doesn't happen after reflash when Modest doesn't have any accounts set up.
Is there anything specific about the accounts you've set up and do you have
multiple accounts?
Comment 2 kenneth (reporter) 2008-08-19 12:51:25 UTC
oops, forgot about that.

there are two pop accounts. set to download headers only.

beyond that i cant think of anything special about them.
Comment 3 kenneth (reporter) 2008-08-19 13:00:26 UTC
here is something i was told to add:

/proc/3105/task/3105/status:State:      S (sleeping)
/proc/3105/task/3105/status:SleepAVG:   91%
/proc/3105/task/3106/status:State:      S (sleeping)
/proc/3105/task/3106/status:SleepAVG:   76%
/proc/3105/task/3107/status:State:      S (sleeping)
/proc/3105/task/3107/status:SleepAVG:   41%
/proc/3105/task/3108/status:State:      S (sleeping)
/proc/3105/task/3108/status:SleepAVG:   35%
/proc/3105/task/3109/status:State:      S (sleeping)
/proc/3105/task/3109/status:SleepAVG:   9%
/proc/3105/task/3110/status:State:      S (sleeping)
/proc/3105/task/3110/status:SleepAVG:   10%
/proc/3105/task/3111/status:State:      S (sleeping)
/proc/3105/task/3111/status:SleepAVG:   6%

im not 100% how long after i last used modest that this output was generated
tho. but im sure its more then 5 minutes at least given that i have
forgotten...
Comment 4 Andre Klapper maemo.org 2008-08-19 23:04:13 UTC
Thanks for reporting this. This bug report isn't very useful because it doesn't
describe the bug well.
There is a template for a good reason. You don't tell us the hardware you use
or the exact software version. We don't even know if you run the latest
version.
Comment 5 kenneth (reporter) 2008-08-20 00:20:36 UTC
itos version: 4.2008.30-2
Comment 6 kenneth (reporter) 2008-08-20 03:45:36 UTC
as for hardware, its a N800.

and here is some data that i gathered while checking to see if it was a
different, already reported bug.

lr-x------    1 user     users          64 Aug 18 21:43 0 -> /dev/null
l-wx------    1 user     users          64 Aug 18 21:43 1 -> /dev/null
lrwx------    1 user     users          64 Aug 18 21:43 10 ->
/home/user/.modest/cache/key3.db
lrwx------    1 user     users          64 Aug 18 21:43 11 ->
/home/user/.modest/cache/mail/pop/"account 1"/journal
lrwx------    1 user     users          64 Aug 18 21:43 12 ->
/home/user/.modest/cache/mail/pop/"account 2"/journal
lrwx------    1 user     users          64 Aug 18 21:43 13 -> socket:[10358]
l-wx------    1 user     users          64 Aug 18 21:43 2 -> /dev/null
lrwx------    1 user     users          64 Aug 18 21:43 3 -> socket:[9231]
lr-x------    1 user     users          64 Aug 18 21:43 4 -> pipe:[9233]
l-wx------    1 user     users          64 Aug 18 21:43 5 -> pipe:[9233]
lrwx------    1 user     users          64 Aug 18 21:43 6 -> socket:[9234]
lrwx------    1 user     users          64 Aug 18 21:43 7 -> socket:[9236]
lrwx------    1 user     users          64 Aug 18 21:43 8 -> socket:[9238]
lrwx------    1 user     users          64 Aug 18 21:43 9 ->
/home/user/.modest/cache/cert8.db

i masked out the accounts dir-names.

modest is set up with two pop3 accounts set to download only headers.

and here is gdb output from the list threads command.

  7 Thread 1118295184 (LWP 2416)  0x40bc6334 in pthread_cond_wait@@GLIBC_2.4 ()
   from /lib/libpthread.so.0
  6 Thread 1126769808 (LWP 2417)  0x40bc6334 in pthread_cond_wait@@GLIBC_2.4 ()
   from /lib/libpthread.so.0
  5 Thread 1136653456 (LWP 2418)  0x40bc6334 in pthread_cond_wait@@GLIBC_2.4 ()
   from /lib/libpthread.so.0
  4 Thread 1145042064 (LWP 2419)  0x40bc6334 in pthread_cond_wait@@GLIBC_2.4 ()
   from /lib/libpthread.so.0
  3 Thread 1153430672 (LWP 2420)  0x40bc6334 in pthread_cond_wait@@GLIBC_2.4 ()
   from /lib/libpthread.so.0
  2 Thread 1161819280 (LWP 2421)  0x40bc6334 in pthread_cond_wait@@GLIBC_2.4 ()
   from /lib/libpthread.so.0
  1 Thread 1073857008 (LWP 2413)  0x4011cd14 in poll () from /lib/libc.so.6

i also have a stack trace from a forced core dump, but i suspect it probably
not be useful.

#0 0x4011cd14 in poll () from /lib/libc.so.6
#1 0x40b4bf54 in ?? () from /usr/lib/libglib-2.0.so.0
Comment 7 Andre Klapper maemo.org 2008-09-15 12:44:09 UTC
(In reply to comment #6)
> i also have a stack trace from a forced core dump, but i suspect it probably
> not be useful.
> 
> #0 0x4011cd14 in poll () from /lib/libc.so.6
> #1 0x40b4bf54 in ?? () from /usr/lib/libglib-2.0.so.0

Both gdb traces are very generic and not helpful.
Do you have the package sp-rich-core installed?
It's available from the tools repository[1] and creates a "core-dumps"
directory to the memory card with at least few megabytes of free space. You can
get core dumps also without the rich-core package, but they are much less
useful.

[1] http://maemo.org/development/tools/
Comment 8 kenneth (reporter) 2008-09-15 15:15:06 UTC
i have it installed, but im somewhat worried about what kind of personal data
that dump may hold...
Comment 9 Eero Tamminen nokia 2008-09-15 17:50:52 UTC
> i have it installed, but im somewhat worried about what kind of personal data
> that dump may hold...

In that case it's better to install debug symbols at least for things showing
in the backtrace (libc and glib, I think you can get them from the SDK repo)
and use Gdb to get backtraces you can paste here.  It's more work though.
Comment 10 kenneth (reporter) 2008-09-16 04:11:23 UTC
i could have sworn i tried that before doing the backtrace i posted the result
from.

but i think i have figured out what the problem is now.

i had some issues with the wan/internet connection of my home network, and
while trying to get it working i discovered that when modest is sitting in ram,
it gave error messages as if it was set to check mails automatically.

and yes, i looked at its settings and it had that turned off.

so it may seem that modest is simply not honoring its automatic mail check
settings properly.
Comment 11 Tim Ashman 2008-09-16 06:28:03 UTC
I'd like to add a comment that I'm not sure is correct here but I didn't want
to create a new bug.  I'm running the latest diablo and did use modest for
about a week or two, however I've stopped using it now, deleted all of the
accounts, and turned off the auto checking feature within modest.  The problem
is that modest still wants to load into memory and do something.  I have know
idea what, but I have even deleted the ~/.modest directory and 5 minutes later
modest is loaded and the directory is recreated.  This doesn't seem right to
me.  I even kill the process and it comes back.
Comment 12 kenneth (reporter) 2008-09-29 01:01:10 UTC
im starting to suspect that modest gets this issue if  a manual check is
initiated while the connection is down.

its not a sure thing except i hhave yet to see it happen if i bring the
connection up manually first.
Comment 13 Andre Klapper maemo.org 2008-11-20 21:11:03 UTC
(In reply to comment #12)
> im starting to suspect that modest gets this issue if  a manual check is
> initiated while the connection is down.

Any confirmations on this?
Comment 14 kenneth (reporter) 2008-11-21 11:45:13 UTC
sadly, no.

it seems to only show up when im not actively looking at the issue.

that is, i cant find any way to provoke it into happening. it just shows up
ever so often in normal use...
Comment 15 kenneth (reporter) 2008-12-15 16:57:45 UTC
ok, i may have found the way to provoke the issue.

basically, have the tablet not connected to wifi.

start modest, then hit the refresh button in the corner.

when the wifi icon starts to blink (meaning its setting up a connection), tap
the refresh button again.

now if one close down modest, it should still show up in top, load-applet or
similar.
Comment 16 kenneth (reporter) 2008-12-16 22:43:55 UTC
cute, there may be more then one thing going on here.

i just fould that modest do no respect that i have turned automated mail checks
off, and it results in the same symptom, modest staying in ram with no ui open.

spotted this by setting the check interval at 5 min.

if i then wait at least 5 min with wifi off and connect, modest shows up in top
and stays there even after the connection has closed.
Comment 17 Andre Klapper maemo.org 2009-06-05 15:21:19 UTC
I think this is a duplicate of bug 3953...
Comment 18 Sergio Villar Senin 2009-11-03 18:49:52 UTC
The rationale of the bug report is not correct. Modest does not stay in RAM in
order to check emails. We do that in order to speed up the time the device
needs to show the first window of the application. It's what it's called
preloading.

The mechanism used to check email every X minutes does not need Modest to be
running. It's far more efficient. It's just a D-Bus message that wakes up the
application and performs the email check. After that the application will
gracefully close.

If we keep it alive (currently for 30 minutes in Fremantle) it's only for
performance reasons as I have explained. And don't worry about RAM, there is
enough memory to have Modest (and some more applications) preloaded because the
benefit for th user is huge.
Comment 19 Eero Tamminen nokia 2009-11-04 18:15:07 UTC
(In reply to comment #18)
> The rationale of the bug report is not correct. Modest does not stay in RAM in
> order to check emails.

Sergio, this bug report is for Diablo.

(And I think more appropriate resolution would be wontfix.  Modest really is
running although user doesn't want it to run and has done everything he can
from the GUI to get it out.)
Comment 20 Sergio Villar Senin 2009-11-04 18:59:00 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > The rationale of the bug report is not correct. Modest does not stay in RAM in
> > order to check emails.
> 
> Sergio, this bug report is for Diablo.

Ups, I'm sorry I didn't realize. Anyway in Diablo Modest behaviour is the same.
What I suspect is that it could happen that Modest had some deadlock in the
code or something that prevented it from being properly closed.

> (And I think more appropriate resolution would be wontfix.  Modest really is
> running although user doesn't want it to run and has done everything he can
> from the GUI to get it out.)

I agree. reopening...
Comment 21 Sergio Villar Senin 2009-11-04 18:59:15 UTC
Closing as wontfix