close
Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Opened 5 months ago

Closed 4 months ago

Last modified 4 months ago

#572 closed bug (worksforme)

"Delete/Remove" old mails on quit - not working on *first* quit

Reported by: Raziel Owned by: tboeckel
Priority: normal Milestone: YAM 2.10
Component: mail indexing Version: 2.9p1
Severity: major Keywords:
Cc: OS Platform: AmigaOS4
Blocked By: Blocking:
Release Notes:

Description

Summary

When i have "deleted" mails sitting in "Trash" and quit YAM it won't delete them.
When i restart YAM, those mails are still there and will get deleted when i quit YAM a second time.

Steps to reproduce

  1. Start YAM
  2. Produce some mails and delete them
  3. Quit YAM
  4. Reopen YAM - the mails are still in trash

(See below, it might be a problem with a second action performed)

Expected results

I have set Config in Startup/Quit to "Delete old mail", "Remove deleted mail" and like it to work as expected

Actual results

Deleted mails stay in Trash until i reopen YAM and quit it again

Regression

Not sure if it's a regression, i never really realized that there were mails still in Trash on a quit. I normally start YAM once and quit it once and then turn off the Amiga.

I don't know the inner workings of YAM but the only thing i could think of interfering here is the "Delete old mail" option...it's doing just that on quit, deleting mails older than 720 days in folders set up to do so.

Maybe that "search and destroy" of old mails keeps YAM from performing the second action of "removing deleted mails" and simply quits after it done it's first action?

After a restart of YAM (on the same day) there are obviously no old mails to delete (as it has been performed just before) so instead of being distracted to look for old mails YAM is actually performing the "Remove old mails" action.

That is, of course, a magnificient shot in the dark ;-)

Notes

Yam 2.9p1 [OS4/PPC]
Compilation Date: 18.04.2014 (GCC 4.7.1.r7798)

AmigaOS4u6 (all updates)

Attachments (3)

Crashlog_YAM.debug_2014-08-22_22-22-14.txt (37.1 KB) - added by Raziel 4 months ago.
Grim Reaper log of YAM.debug crash on quit
YAMdebug.log (86.4 KB) - added by Raziel 4 months ago.
SHows nothing suspicious, i think (and it's working now every time i try)
YAMdebug.2.log (41.7 KB) - added by Raziel 4 months ago.
It doesn't seem to happen anymore

Download all attachments as: .zip

Change History (20)

comment:1 Changed 5 months ago by tboeckel

No problem here, neither with YAM 2.9 nor with 2.10-dev. All the manually deleted mails get correctly removed from the Trash folder. It is empty upon the next start of YAM.

comment:2 Changed 5 months ago by Raziel

Just tried it again

9 Mails in Trashcan (5 of them unread)

On quit YAM is deleting the "old" mails from the different subdirs that match the "Max. Age" setting

After that it quit...without cleaing the trashcan...on restart i still had 9 mails (5 of them unread) in there

Quitting YAM a second time cleansed Trashcan, but that's exactly the problem i was talking about
It shouldn't clean it on the second quit but on the first, something is intercepting the process after the "Max. Age" mails were cleared

comment:3 follow-up: Changed 5 months ago by Raziel

Can i do something to give you more information on whats happening?

Like "yam.debug @all"?

comment:4 in reply to: ↑ 3 Changed 5 months ago by tboeckel

Replying to Raziel:

Can i do something to give you more information on whats happening?

As a very quick and easy test you can check if the Trash folder's directory is really empty (except the .fconfig and .index files) when it should be empty. If that is the case then it is just an indexing problem. Otherwise YAM is really failing to delete the mails. For an really empty folder the .index file should have a size of 28 bytes. If it is larger then there are still some mails under YAM's control which of course should exist as real files within that directory.

comment:5 Changed 5 months ago by Raziel

.index file is 3.173 bytes and the physical mails are also still in there.

comment:6 Changed 4 months ago by tboeckel

In 8169:

  • mui/YAMApplication.c: added some debug output to the trash folder emptying method. This refs #572.

comment:7 Changed 4 months ago by tboeckel

Please create a STARTUP debug log with debug version of the next nightly build of 2.10-dev. That should reveal how many mails YAM is trying to remove from the trash folder or why this fails.

comment:8 Changed 4 months ago by tboeckel

  • Component changed from undefined to mail indexing
  • Milestone set to YAM 2.10
  • Owner set to tboeckel
  • Priority changed from undecided to normal
  • Status changed from new to assigned

comment:9 Changed 4 months ago by Raziel

Sorry, i didn't realize i wasn't logged in when i uploaded the log

Log contains a lot of noise from the Catweasel (and from after YAM.debug crashed).
It crashed after i quit the debug nightly build (i can upload a Reaper log aswell, if needed)

I don't think it helps much though as with the debug build it emptied the trash just fine, as did the 2.9 YAM afterwards (tried three times)

Either it was a problem with the corrupt index file (which YAM2.10 finally fixed on-the-fly)

00:E|22:18:19.298531| YAM_MAf.c:486:index file 'Tools:Internet/YAM/Folders/trash/.index' of folder 'Trash' has invalid size 0 (minimum required 28)
00:W|22:18:19.298597| YAM_MAf.c:507:missing .index file 'Tools:Internet/YAM/Folders/trash/.index' detected, rebuilding...

or i'm just too dumb to use YAM :-)

Right now i can say it works (again)

comment:10 Changed 4 months ago by tboeckel

Well, you did not attach the log. And of course a crash log is always welcome.

comment:11 Changed 4 months ago by Raziel

I did, but i wasn't logged in so it went into oblivion waiting for a mod to be looked at before it being added to this item...

But i'll add the two asap (the grim reaper log might differ a bit, as it is from an earlier crash with the same debug exe)

Changed 4 months ago by Raziel

Grim Reaper log of YAM.debug crash on quit

Changed 4 months ago by Raziel

SHows nothing suspicious, i think (and it's working now every time i try)

comment:12 Changed 4 months ago by tboeckel

In 8199:

  • Timer.c: forget the TimerBase variable right before closing timer.device. This is necessary for the debug build, otherwise any debug output that happens after cleaning up the timers will cause a crash due to the time output for each debug statement. This refs #572.

comment:13 Changed 4 months ago by tboeckel

In 8200:

  • mui/YAMApplication.c: added some more debug output to the EmptyTrashFolder method in case deleting a mail file fails. This refs #572.

comment:14 Changed 4 months ago by tboeckel

The crash upon terminating YAM should be fixed now.

From the debug log I can see that YAM correctly deletes all 2 mails from the Trash folder:

00:D|09:58:11.820030| YAMApplication.c:1706:emptying trash folder 'Trash' with 2 mails
00:D|09:58:11.820498| YAMApplication.c:1720:deleted 2 mails from trash folder 'Trash'

Anyway, I just added some more debug output. So please create another STARTUP debug log. If deleting a mail file fails for any reason the log should point this out.

Changed 4 months ago by Raziel

It doesn't seem to happen anymore

comment:15 follow-up: Changed 4 months ago by Raziel

New debug log attached.

It doesn't seem to happen anymore (might be 2.10 though where a potential problem has been fixed already?)
I'll see if it will still happen in 2.9

A question, is the line "Clearing up zombie files" meant to delete those mails older than what the user set in the mailbox settings?
Because then it would prove that the problem i'm having isn't there with 2.10

Thanks a lot

I think this can be closed :-)

comment:16 in reply to: ↑ 15 Changed 4 months ago by tboeckel

  • Resolution set to worksforme
  • Status changed from assigned to closed

Replying to Raziel:

A question, is the line "Clearing up zombie files" meant to delete those mails older than what the user set in the mailbox settings?
Because then it would prove that the problem i'm having isn't there with 2.10

No. "zombie files" refer to files being opened by external applications like MultiView. When YAM switches to a different mail it tries to delete the temporarily decoded files. If a tool like MultiView keeps the file opened as long as it is displayed YAM fails to delete the temporary file and puts it into a list of "zombie files". These will then be deleted later, at the latest when terminating YAM.

BTW, you can let YAM itself redirect all the debugging messages to a file directly instead of capturing the output with Sashimi. Just add something like "file:path_to_file.txt" to ENV:yamdebug. That's the most easy way to get rid of foreign debug output in the log.

comment:17 Changed 4 months ago by tboeckel

At least the last log shows that all 3 mails residing in the Trash folder got deleted successfully.

Add Comment

Modify Ticket

Action
as closed The owner will remain tboeckel.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber

  • Hubert Maier(Reporter, Participant)
  • Thore Böckelmann(Owner, Participant)