Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#7266 closed bug (fixed)

E-mail preferences freezes when new mail account is created

Reported by: taos Owned by: czeidler
Priority: normal Milestone: R1
Component: Servers/mail_daemon Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

With hrev40624 the E-mail preferences window freezes when creating a new mail account (both POP3 and IMAP):
Hitting the OK button of the "Create new account - Account settings" dialogue window results in an immediate increase of CPU usage. The E-mail preferences window becomes unresponsive. CPU usage drops as soon as the mail_daemon thread is killed.

A new mail account can be created if Haiku is booted in safe mode.

An existing account can be edited without problems.

A new mail account can be created by copying an existing account (in /boot/home/config/settings/Mail/accounts), renaming, and editing it.

Attachments (5)

syslog_short.txt (9.7 KB ) - added by taos 13 years ago.
E-mail.txt (2.8 KB ) - added by taos 13 years ago.
Debug_E-mail.txt (3.5 KB ) - added by taos 13 years ago.
syslog_short.2.txt (4.9 KB ) - added by taos 13 years ago.
DebugBacktrace (1.5 KB ) - added by czeidler 13 years ago.
Debug bt

Download all attachments as: .zip

Change History (14)

by taos, 13 years ago

Attachment: syslog_short.txt added

by taos, 13 years ago

Attachment: E-mail.txt added

comment:1 by taos, 13 years ago

Sorry, it's of course the E-mail w>Create new account thread or the E-mail team that must be killed in order to regain a responsive system. Debug output ("E-mail.txt") and part of syslog ("syslog_short.txt") are attached (ignore "syslog_short.2.txt").

BTW I noticed that it's sometimes (but not always) possible to create an IMAP account. That can be used as a workaround for creating a POP3 account: Start E-mail preferences, add new account, choose IMAP, fill in all blanks, and only then choose POP3 from pull down menu before you finally hit the OK button. If you choose POP3 before completing the window freezes.

comment:2 by luroh, 13 years ago

Component: - GeneralServers/mail_server
Owner: changed from nobody to czeidler
Status: newassigned

comment:3 by czeidler, 13 years ago

Could you check if hrev40798 fix it? Does the fetched server looks fine?

comment:4 by taos, 13 years ago

Problem still exists with hrev40806. Debug output is attached as "Debug_E-mail.txt", last part of syslog as "syslog_short.2.txt".

by taos, 13 years ago

Attachment: Debug_E-mail.txt added

by taos, 13 years ago

Attachment: syslog_short.2.txt added

comment:5 by czeidler, 13 years ago

At least the crash should be fixed now. But its strange that nothing comes back from the server. Which provider are you using? Please tell me the domain name of your email address.

comment:6 by czeidler, 13 years ago

The crash occurres when removing the first char in ConvertFromDNSName:

BString
DNSTools::ConvertFromDNSName(const BString& string)
{
	if (string.Length() == 0)
		return string;

	BString outString = string;
	int32 dot = string[0];
	int32 nextDot = dot;
	outString.Remove(0, 1);

I'm a bit lost how could this happen? The code where this is called looks thread safe... It allways crashes in realloc in the BString class see debug backtrace. Could somebody help me out here?

Last edited 13 years ago by czeidler (previous) (diff)

by czeidler, 13 years ago

Attachment: DebugBacktrace added

Debug bt

comment:7 by korli, 13 years ago

It seems HEAP_WALL is activated in malloc wrapper and you just hit the check_wall().

I suppose the above code works in a unit testcase (did you check this?), so there is memory corruption happening somewhere. BTW outString copy should only happen in BString::Remove().

comment:8 by czeidler, 13 years ago

Resolution: fixed
Status: assignedclosed

Think I found the problem in hrev40895.

comment:9 by taos, 13 years ago

Thanks. Everything now works as expected when creating new mail accounts - no more freezes (tested with hrev40913).

Note: See TracTickets for help on using tickets.