6.0.0-beta1
7/7/25

[#711] Segfault in IMAP_Tree
Summary Segfault in IMAP_Tree
Queue Horde Base
Queue Version HEAD
Type Bug
State Resolved
Priority 3. High
Owners slusarz (at) horde (dot) org
Requester vilius (at) lnk (dot) lt
Created 10/21/2004 (7564 days ago)
Due
Updated 07/22/2005 (7290 days ago)
Assigned 12/02/2004 (7522 days ago)
Resolved 12/18/2004 (7506 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/22/2005 03:30:05 PM Michael Slusarz Comment #52 Reply to this comment
Added info on chroot to imp/docs/INSTALL.
07/22/2005 02:35:25 PM ryan (dot) flannery (at) gmail (dot) com Comment #51 Reply to this comment
Solved!  Thought i'd post this here...



The solution posted here helped tremendously, after some "fiddling"

http://lists.horde.org/archives/imp/Week-of-Mon-20050321/041502.html



Horde + IMP can be run in chroot, but c-client needs access to the 
"www" entry (or whatever user Apache is running) in the 
/etc/master.passwd file.



So, for OpenBSD, do the following...

    # mkdir /var/www/etc

    # cp /etc/master.passwd /var/www/etc/

    # vi /var/www/etc/master.passwd

        (remove all entries except the one for "www" acount)

    # pwd_mkdb -d /var/www/etc /var/www/etc/master.passwd

  Then make sure user "www" (again, whatever Apache is running as) can 
read the /var/www/etc/master.passwd file.



That's it!  This fixes everything!

Thanks for the help everyone.
07/19/2005 07:47:13 PM ryan (dot) flannery (at) gmail (dot) com Comment #50 Reply to this comment
I prevent the 'imp-folders' block from being rendered, and that   
clears up the sidebar issue.  However,  users can still not use 
folders in IMP (they cannot move/copy messages there, nor can they 
click on the "Folders" button).
07/19/2005 07:38:40 PM vilius (at) lnk (dot) lt Comment #49 Reply to this comment
For the time being if you don't need Outlook style imp folders block 
you can disable it and see if it helps.
07/19/2005 07:24:19 PM ryan (dot) flannery (at) gmail (dot) com Comment #48 Reply to this comment
This is happening 100% of the time for me...



Do you know of anyone with working installations of Horde 3.x and IMP 
4.x on OpenBSD, using IMAP for email?  If so, was there anything 
*specific* they had to do to get this working? (Or perhaps you could 
just put me in touch with them.)



I've tried installing the OpenBSD Horde/IMP pkgs, d'loading the source 
from Horde's ftp site (every version since 3.0 & 4.0, including some 
nightly snapshots for both), and all of this on 3 different machines.   
I've followed the directions word-for-word, and I'm reasonably certain 
that it's not a configuration issue.  I just can't for-the-life-of-me 
figure out what the problem is.



Do you know of anyone willing to work on this further?  As I stated 
before, I'd be glad to offer an account on one of the machines.



Many thanks for your help this far.
07/19/2005 06:53:26 PM Michael Slusarz Comment #47 Reply to this comment
If it is truly an OpenBSD specific bug, then someone else will have to 
analyze this.  I just have not seen a single segfault since this bug 
was resolved, and that is tens of thousands of page loads.  Before 
this issue was resolved, I could reproduce this on a somewhat regular 
basis (i.e. once or twice a session).  But without being able to 
reproduce the error, I can't help much.
07/19/2005 03:06:51 PM ryan (dot) flannery (at) gmail (dot) com Comment #46 Reply to this comment
*bangs head against wall*



my apologies... Apache is, in fact, segfaulting.
07/19/2005 02:23:41 PM ryan (dot) flannery (at) gmail (dot) com Comment #45 Reply to this comment
whoops...also, PHP is not segfaulting.


07/19/2005 02:21:45 PM ryan (dot) flannery (at) gmail (dot) com Comment #44 Reply to this comment
yes, display_errors=On in php.ini, and in /imp/config/servers.php I 
have folders="INBOX." (also tried namespace set to the same thing).



This seems to be an OpenBSD specific thing, gauging by

http://lists.horde.org/archives/imp/Week-of-Mon-20050131/040862.html

and

http://lists.horde.org/archives/imp/Week-of-Mon-20050314/041374.html



It seems to be IMAP server independent (similar problem with dovecote, 
UW-IMAP, and currently with Courier-IMAP).



Ever since Horde 3.0 came out, I've tried installing it on OpenBSD 
3.5, 3.6, and currently 3.7, but I've always had this exact same 
issue.  Previously, I had just brushed it off and stuck with Horde 
2.x, but Horde 3.x is now desired (features, look, etc.... in short, 
it just rocks).   But I can't get the folders to work., and that seems 
to kill the sidebar when rendering the 'imp-folders' block.



Horde 2.x and SquirrelMail can manage folders just fine.  Not sure 
where the problem is *exactly*, but  this post

http://lists.horde.org/archives/imp/Week-of-Mon-20050711/042657.html

explains roughly where it's at (which is very similar to some of the 
areas mentioned below).



I've tried various versions of PHP, both via packages and compiling 
myself, but no help.



Also, in case you're curious, I've tried running OpenBSD un-chroot'ed, 
but that didn't help.
07/19/2005 04:41:38 AM Michael Slusarz Comment #43 Reply to this comment
Is PHP segfaulting?  Are you running with display errors=On?  I'm not 
going to reopen this bug on a single error report with incomplete 
details when thousands of others using Horde/IMP (w/Courier) do not 
have this issue.



Also, looking at your configuration, you need 'INBOX.' in either 
folders or namespace or Courier probably won't work correctly.
07/16/2005 11:52:32 PM ryan (dot) flannery (at) gmail (dot) com Comment #42 Reply to this comment
I'm having the exact same issue.

OpenBSD 3.7, Apache 1.3.29, PHP 4.3.1 (also tried PHP5), Horde & IMP 
(every release since Horde 3.0, including snapshots from last night), 
Courier-IMAP 3.0.5.



Mailed initial info to the IMP list here:

http://lists.horde.org/archives/imp/Week-of-Mon-20050711/042653.html

(sorry for not posting here first...i did search the bugs database, 
but never found this.)



The error is somewhere in IMAP_Tree's  init  function, and seems to be 
quite elusive.



I'd be glad to offer an account on the machine in question to any 
developer willing to work on this.
01/04/2005 10:26:26 PM gryp (at) dakin (dot) be Comment #41 Reply to this comment
I am having a similar errors with imp 4.0.1 (and 4.0.0) and horde 
3.0.1 (and 3.0.0).

I'm using php 4.3.10 with apache 1.3.29 (chrooted) on OpenBSD 3.6. 
c-client version 4.61.



More information can be provided on request. If I need to debug, 
please tell me how (or point me some doc).



My sidebar segfaults.



Also going to mail from my personal emailaccount doesn't work.

All the other mailboxes of the server work, maybe the cause is because 
i have about 25 folders AND its 700mb big (my inbox contains about 
3000 emails)?
12/18/2004 11:39:21 PM Jan Schneider Comment #40
State ⇒ Resolved
Reply to this comment
I can't reproduce this anymore either. Closing for now, I'll watch 
this further.
12/18/2004 08:10:37 PM Michael Slusarz Comment #39 Reply to this comment
How is current HEAD looking now?  I've fixed at least 3 or 4 fairly 
critical looking bugs and have made several performance improvements 
(sort a level only once, don't save on traverse only) over the last 
week or so.  I was breifly able to reproduce the segfaults on my 
system last week (although they were completely random and only 
occurred maybe 1 of 10 times I logged in), but with all the recent 
changes I haven't seen any segfaults in 5 or 6 days.
12/15/2004 07:27:18 AM Michael Slusarz Comment #38 Reply to this comment
As to my previous comment, obviously I mean 
Horde_Block_imp_tree_folders instead of Horde_Block_imp_summary.
12/15/2004 07:21:47 AM Michael Slusarz Comment #37 Reply to this comment
Unfortunately, I still can't produce a segfault so that I can get a 
backtrace so it remains very frustrating to try and track this down.   
ugh.



Since it is not reproducible, it makes me think that maybe it doesn't 
have anything to do with the logic of the code.  Maybe some kind of 
concurrent access to the IMAP_tree object that is somehow changing the 
object in mid-stream of one of the occurrances, which is affecting the 
other occurrance (any kind of change in the object/data structure 
during a sort() call, for example, would very easily cause a segfault 
in there).  Maybe accessing the IMP_Tree object in 
Horde_block_imp_summary could be done via a copy of the object, for 
example, which would fix this problem?  I'm starting to run short of 
ideas (actually, I've been running short of ideas for months...)
12/09/2004 02:18:33 PM Jan Schneider Comment #36
New Attachment: segfault_bt.txt Download
Reply to this comment
Attached are complete backtraces of all calls to 
IMAP_Sort::sortMailboxesByKey() just before the uksort() call. That's 
where it segfaults, though I don't remember right now if in uksort() 
or _mbox_cmp().



Unfortunately PHP does *not* segfault when I create these backtraces 
(it's harder to reproduce the segfaults anyway atm), so I can't tell 
you which of the backtraces is causing this.
12/09/2004 07:19:29 AM Michael Slusarz Comment #35 Reply to this comment
Jan - Can you try to pinpoint the call to IMAP_Tree right before the 
segfault?  Is it the IMP_Tree::singleton call at line 52 of 
imp/lib/Block/tree_folders?  Or possibly a call to IMP_Tree::next() 
further down (without being able to reproduce locally, these would be 
my guesses as to the functions that would cause any problems).
12/07/2004 04:30:30 PM Chuck Hagenbuch Comment #34 Reply to this comment
Michael's change, or another very recent one, fixed the only place 
where I was reproducing these crashes (on a winxp box).
12/07/2004 01:20:15 PM Jan Schneider Comment #33 Reply to this comment
Unfortunately not.
12/06/2004 08:58:13 AM Jan Schneider Comment #31 Reply to this comment
After logging in, in the left frame. The tree dump can be retrieved 
fine anytime after the first segfault of the user session.
12/06/2004 07:20:50 AM Michael Slusarz Comment #30 Reply to this comment
Hmmm... if I remember correctly, previously the code was segfaulting 
before the IMAP_Tree object could be fully created.  It appears that 
the IMAP_Tree object is now being created just fine (since you 
provided the dump of the object :).  When exactly are you seeing the 
segfaults occur now?
12/03/2004 12:41:41 PM Jan Schneider Comment #29 Reply to this comment
class imp_tree {

   var $_vfolders =

   array (

     '**vfolder_2m24ckpvxyqsk8wgoc' => 'From Chuck',

   );

   var $_initmask = 5;

   var $_tree =

   array (

     'INBOX' =>

     array (

       'a' => 4000,

       'p' => NULL,

       'v' => 'INBOX',

       'c' => 0,

       'l' => 'INBOX',

     ),

     'INBOX.AMMMa' =>

     array (

       'a' => 1696,

       'p' => 'INBOX',

       'v' => 'INBOX.AMMMa',

       'c' => 1,

       'l' => 'AMMMa',

     ),

     'INBOX.AMMMa.C::Web' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.AMMMa',

       'v' => 'INBOX.AMMMa.C::Web',

       'c' => 2,

       'l' => 'C::Web',

     ),

     'INBOX.AMMMa.Learn::Web' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.AMMMa',

       'v' => 'INBOX.AMMMa.Learn::Web',

       'c' => 2,

       'l' => 'Learn::Web',

     ),

     'INBOX.AMMMa.Projekte' =>

     array (

       'a' => 1696,

       'p' => 'INBOX.AMMMa',

       'v' => 'INBOX.AMMMa.Projekte',

       'c' => 2,

       'l' => 'Projekte',

     ),

     'INBOX.AMMMa.Projekte.Boeker &- Co' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.AMMMa.Projekte',

       'v' => 'INBOX.AMMMa.Projekte.Boeker &- Co',

       'c' => 3,

       'l' => 'Boeker & Co',

     ),

     'INBOX.AMMMa.Projekte.Cornelsen' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.AMMMa.Projekte',

       'v' => 'INBOX.AMMMa.Projekte.Cornelsen',

       'c' => 3,

       'l' => 'Cornelsen',

     ),

     'INBOX.AMMMa.Projekte.ESTA' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.AMMMa.Projekte',

       'v' => 'INBOX.AMMMa.Projekte.ESTA',

       'c' => 3,

       'l' => 'ESTA',

     ),

     'INBOX.AMMMa.Projekte.Girls Day' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.AMMMa.Projekte',

       'v' => 'INBOX.AMMMa.Projekte.Girls Day',

       'c' => 3,

       'l' => 'Girls Day',

     ),

     'INBOX.AMMMa.Projekte.LZU' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.AMMMa.Projekte',

       'v' => 'INBOX.AMMMa.Projekte.LZU',

       'c' => 3,

       'l' => 'LZU',

     ),

     'INBOX.AMMMa.Projekte.VINGS' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.AMMMa.Projekte',

       'v' => 'INBOX.AMMMa.Projekte.VINGS',

       'c' => 3,

       'l' => 'VINGS',

     ),

     'INBOX.AMMMa.Server &- B&APw-ro' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.AMMMa',

       'v' => 'INBOX.AMMMa.Server &- B&APw-ro',

       'c' => 2,

       'l' => 'Server & Büro',

     ),

     'INBOX.Bugtraq' =>

     array (

       'a' => 1536,

       'p' => 'INBOX',

       'v' => 'INBOX.Bugtraq',

       'c' => 1,

       'l' => 'Bugtraq',

     ),

     'INBOX.Consulting' =>

     array (

       'a' => 1696,

       'p' => 'INBOX',

       'v' => 'INBOX.Consulting',

       'c' => 1,

       'l' => 'Consulting',

     ),

     'INBOX.Consulting.Chris Bishop' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Consulting',

       'v' => 'INBOX.Consulting.Chris Bishop',

       'c' => 2,

       'l' => 'Chris Bishop',

     ),

     'INBOX.Consulting.Customer Care Direct' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Consulting',

       'v' => 'INBOX.Consulting.Customer Care Direct',

       'c' => 2,

       'l' => 'Customer Care Direct',

     ),

     'INBOX.Consulting.dpunkt' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Consulting',

       'v' => 'INBOX.Consulting.dpunkt',

       'c' => 2,

       'l' => 'dpunkt',

     ),

     'INBOX.Consulting.GlobalCerts' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Consulting',

       'v' => 'INBOX.Consulting.GlobalCerts',

       'c' => 2,

       'l' => 'GlobalCerts',

     ),

     'INBOX.Consulting.Mondfabrik' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Consulting',

       'v' => 'INBOX.Consulting.Mondfabrik',

       'c' => 2,

       'l' => 'Mondfabrik',

     ),

     'INBOX.Consulting.Sadeghi' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Consulting',

       'v' => 'INBOX.Consulting.Sadeghi',

       'c' => 2,

       'l' => 'Sadeghi',

     ),

     'INBOX.Consulting.Select Marketing Hotels' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Consulting',

       'v' => 'INBOX.Consulting.Select Marketing Hotels',

       'c' => 2,

       'l' => 'Select Marketing Hotels',

     ),

     'INBOX.Consulting.STS' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Consulting',

       'v' => 'INBOX.Consulting.STS',

       'c' => 2,

       'l' => 'STS',

     ),

     'INBOX.Consulting.Sutton' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Consulting',

       'v' => 'INBOX.Consulting.Sutton',

       'c' => 2,

       'l' => 'Sutton',

     ),

     'INBOX.Drafts' =>

     array (

       'a' => 1536,

       'p' => 'INBOX',

       'v' => 'INBOX.Drafts',

       'c' => 1,

       'l' => 'Drafts',

     ),

     'INBOX.horde' =>

     array (

       'a' => 1952,

       'p' => 'INBOX',

       'v' => 'INBOX.horde',

       'c' => 1,

       'l' => 'horde',

     ),

     'INBOX.horde.apps' =>

     array (

       'a' => 3584,

       'p' => 'INBOX.horde',

       'v' => 'INBOX.horde.apps',

       'c' => 2,

       'l' => 'apps',

     ),

     'INBOX.horde.bugs' =>

     array (

       'a' => 3584,

       'p' => 'INBOX.horde',

       'v' => 'INBOX.horde.bugs',

       'c' => 2,

       'l' => 'bugs',

     ),

     'INBOX.horde.cvs' =>

     array (

       'a' => 3584,

       'p' => 'INBOX.horde',

       'v' => 'INBOX.horde.cvs',

       'c' => 2,

       'l' => 'cvs',

     ),

     'INBOX.horde.dev' =>

     array (

       'a' => 3584,

       'p' => 'INBOX.horde',

       'v' => 'INBOX.horde.dev',

       'c' => 2,

       'l' => 'dev',

     ),

     'INBOX.horde.imp' =>

     array (

       'a' => 3584,

       'p' => 'INBOX.horde',

       'v' => 'INBOX.horde.imp',

       'c' => 2,

       'l' => 'imp',

     ),

     'INBOX.horde.patches' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.horde',

       'v' => 'INBOX.horde.patches',

       'c' => 2,

       'l' => 'patches',

     ),

     'INBOX.Mailinglisten' =>

     array (

       'a' => 1696,

       'p' => 'INBOX',

       'v' => 'INBOX.Mailinglisten',

       'c' => 1,

       'l' => 'Mailinglisten',

     ),

     'INBOX.Mailinglisten.cnet' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Mailinglisten',

       'v' => 'INBOX.Mailinglisten.cnet',

       'c' => 2,

       'l' => 'cnet',

     ),

     'INBOX.Mailinglisten.CodeProject' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Mailinglisten',

       'v' => 'INBOX.Mailinglisten.CodeProject',

       'c' => 2,

       'l' => 'CodeProject',

     ),

     'INBOX.Mailinglisten.Dr Web' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Mailinglisten',

       'v' => 'INBOX.Mailinglisten.Dr Web',

       'c' => 2,

       'l' => 'Dr Web',

     ),

     'INBOX.Mailinglisten.Kolab' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Mailinglisten',

       'v' => 'INBOX.Mailinglisten.Kolab',

       'c' => 2,

       'l' => 'Kolab',

     ),

     'INBOX.Mailinglisten.pear-dev' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Mailinglisten',

       'v' => 'INBOX.Mailinglisten.pear-dev',

       'c' => 2,

       'l' => 'pear-dev',

     ),

     'INBOX.Mailinglisten.php-dev' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Mailinglisten',

       'v' => 'INBOX.Mailinglisten.php-dev',

       'c' => 2,

       'l' => 'php-dev',

     ),

     'INBOX.PHP + Web' =>

     array (

       'a' => 1536,

       'p' => 'INBOX',

       'v' => 'INBOX.PHP + Web',

       'c' => 1,

       'l' => 'PHP + Web',

     ),

     'INBOX.Privat' =>

     array (

       'a' => 1536,

       'p' => 'INBOX',

       'v' => 'INBOX.Privat',

       'c' => 1,

       'l' => 'Privat',

     ),

     'INBOX.sent' =>

     array (

       'a' => 1186,

       'p' => 'INBOX',

       'v' => 'INBOX.sent',

       'c' => 1,

       'l' => 'sent',

     ),

     'INBOX.sent.sent-AMMMa' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-AMMMa',

       'c' => 2,

       'l' => 'sent-AMMMa',

     ),

     'INBOX.sent.sent-AMMMa-10-2004' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-AMMMa-10-2004',

       'c' => 2,

       'l' => 'sent-AMMMa-10-2004',

     ),

     'INBOX.sent.sent-AMMMa-11-2004' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-AMMMa-11-2004',

       'c' => 2,

       'l' => 'sent-AMMMa-11-2004',

     ),

     'INBOX.sent.sent-Consulting' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-Consulting',

       'c' => 2,

       'l' => 'sent-Consulting',

     ),

     'INBOX.sent.sent-Consulting-10-2004' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-Consulting-10-2004',

       'c' => 2,

       'l' => 'sent-Consulting-10-2004',

     ),

     'INBOX.sent.sent-Consulting-11-2004' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-Consulting-11-2004',

       'c' => 2,

       'l' => 'sent-Consulting-11-2004',

     ),

     'INBOX.sent.sent-Horde' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-Horde',

       'c' => 2,

       'l' => 'sent-Horde',

     ),

     'INBOX.sent.sent-Horde-10-2004' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-Horde-10-2004',

       'c' => 2,

       'l' => 'sent-Horde-10-2004',

     ),

     'INBOX.sent.sent-Horde-11-2004' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-Horde-11-2004',

       'c' => 2,

       'l' => 'sent-Horde-11-2004',

     ),

     'INBOX.sent.sent-Privat' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-Privat',

       'c' => 2,

       'l' => 'sent-Privat',

     ),

     'INBOX.sent.sent-Privat-10-2004' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-Privat-10-2004',

       'c' => 2,

       'l' => 'sent-Privat-10-2004',

     ),

     'INBOX.sent.sent-Privat-11-2004' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-Privat-11-2004',

       'c' => 2,

       'l' => 'sent-Privat-11-2004',

     ),

     'INBOX.sent.sent-tip4all' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-tip4all',

       'c' => 2,

       'l' => 'sent-tip4all',

     ),

     'INBOX.sent.sent-tip4all-10-2004' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-tip4all-10-2004',

       'c' => 2,

       'l' => 'sent-tip4all-10-2004',

     ),

     'INBOX.sent.sent-tip4all-11-2004' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.sent',

       'v' => 'INBOX.sent.sent-tip4all-11-2004',

       'c' => 2,

       'l' => 'sent-tip4all-11-2004',

     ),

     'INBOX.Spam' =>

     array (

       'a' => 1696,

       'p' => 'INBOX',

       'v' => 'INBOX.Spam',

       'c' => 1,

       'l' => 'Spam',

     ),

     'INBOX.Spam.Learn' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Spam',

       'v' => 'INBOX.Spam.Learn',

       'c' => 2,

       'l' => 'Learn',

     ),

     'INBOX.Support etc' =>

     array (

       'a' => 1536,

       'p' => 'INBOX',

       'v' => 'INBOX.Support etc',

       'c' => 1,

       'l' => 'Support etc',

     ),

     'INBOX.Test' =>

     array (

       'a' => 1696,

       'p' => 'INBOX',

       'v' => 'INBOX.Test',

       'c' => 1,

       'l' => 'Test',

     ),

     'INBOX.Test.MIME' =>

     array (

       'a' => 1536,

       'p' => 'INBOX.Test',

       'v' => 'INBOX.Test.MIME',

       'c' => 2,

       'l' => 'MIME',

     ),

     'INBOX.tip4all' =>

     array (

       'a' => 1536,

       'p' => 'INBOX',

       'v' => 'INBOX.tip4all',

       'c' => 1,

       'l' => 'tip4all',

     ),

     'INBOX.Trash' =>

     array (

       'a' => 1536,

       'p' => 'INBOX',

       'v' => 'INBOX.Trash',

       'c' => 1,

       'l' => 'Trash',

     ),

     '**vfolder_2m24ckpvxyqsk8wgoc' =>

     array (

       'a' => 5696,

       'p' => 'Virtuelle Ordner',

       'v' => '**vfolder_2m24ckpvxyqsk8wgoc',

       'c' => 1,

       'l' => 'From Chuck',

     ),

     'Virtuelle Ordner' =>

     array (

       'a' => 5794,

       'p' => NULL,

       'v' => 'Virtuelle Ordner',

       'c' => 0,

       'l' => 'Virtuelle Ordner',

     ),

   );

   var $_currparent = NULL;

   var $_currkey = NULL;

   var $_currstack =

   array (

   );

   var $_first = 'INBOX';

   var $_showunsub = 0;

   var $_prefixnodelim = '';

   var $_parent =

   array (

     '' =>

     array (

       0 => 'INBOX',

       1 => 'Virtuelle Ordner',

     ),

     'INBOX' =>

     array (

       0 => 'INBOX.AMMMa',

       1 => 'INBOX.Bugtraq',

       2 => 'INBOX.Consulting',

       3 => 'INBOX.Drafts',

       4 => 'INBOX.horde',

       5 => 'INBOX.Mailinglisten',

       6 => 'INBOX.PHP + Web',

       7 => 'INBOX.Privat',

       8 => 'INBOX.sent',

       9 => 'INBOX.Spam',

       10 => 'INBOX.Support etc',

       11 => 'INBOX.Test',

       12 => 'INBOX.tip4all',

       13 => 'INBOX.Trash',

     ),

     'INBOX.AMMMa' =>

     array (

       0 => 'INBOX.AMMMa.C::Web',

       1 => 'INBOX.AMMMa.Learn::Web',

       2 => 'INBOX.AMMMa.Projekte',

       3 => 'INBOX.AMMMa.Server &- B&APw-ro',

     ),

     'INBOX.AMMMa.Projekte' =>

     array (

       0 => 'INBOX.AMMMa.Projekte.Boeker &- Co',

       1 => 'INBOX.AMMMa.Projekte.Cornelsen',

       2 => 'INBOX.AMMMa.Projekte.ESTA',

       3 => 'INBOX.AMMMa.Projekte.Girls Day',

       4 => 'INBOX.AMMMa.Projekte.LZU',

       5 => 'INBOX.AMMMa.Projekte.VINGS',

     ),

     'INBOX.Consulting' =>

     array (

       0 => 'INBOX.Consulting.Chris Bishop',

       1 => 'INBOX.Consulting.Customer Care Direct',

       2 => 'INBOX.Consulting.dpunkt',

       3 => 'INBOX.Consulting.GlobalCerts',

       4 => 'INBOX.Consulting.Mondfabrik',

       5 => 'INBOX.Consulting.Sadeghi',

       6 => 'INBOX.Consulting.Select Marketing Hotels',

       7 => 'INBOX.Consulting.STS',

       8 => 'INBOX.Consulting.Sutton',

     ),

     'INBOX.horde' =>

     array (

       0 => 'INBOX.horde.apps',

       1 => 'INBOX.horde.bugs',

       2 => 'INBOX.horde.cvs',

       3 => 'INBOX.horde.dev',

       4 => 'INBOX.horde.imp',

       5 => 'INBOX.horde.patches',

     ),

     'INBOX.Mailinglisten' =>

     array (

       0 => 'INBOX.Mailinglisten.cnet',

       1 => 'INBOX.Mailinglisten.CodeProject',

       2 => 'INBOX.Mailinglisten.Dr Web',

       3 => 'INBOX.Mailinglisten.Kolab',

       4 => 'INBOX.Mailinglisten.pear-dev',

       5 => 'INBOX.Mailinglisten.php-dev',

     ),

     'INBOX.sent' =>

     array (

       0 => 'INBOX.sent.sent-AMMMa',

       1 => 'INBOX.sent.sent-AMMMa-10-2004',

       2 => 'INBOX.sent.sent-AMMMa-11-2004',

       3 => 'INBOX.sent.sent-Consulting',

       4 => 'INBOX.sent.sent-Consulting-10-2004',

       5 => 'INBOX.sent.sent-Consulting-11-2004',

       6 => 'INBOX.sent.sent-Horde',

       7 => 'INBOX.sent.sent-Horde-10-2004',

       8 => 'INBOX.sent.sent-Horde-11-2004',

       9 => 'INBOX.sent.sent-Privat',

       10 => 'INBOX.sent.sent-Privat-10-2004',

       11 => 'INBOX.sent.sent-Privat-11-2004',

       12 => 'INBOX.sent.sent-tip4all',

       13 => 'INBOX.sent.sent-tip4all-10-2004',

       14 => 'INBOX.sent.sent-tip4all-11-2004',

     ),

     'INBOX.Spam' =>

     array (

       0 => 'INBOX.Spam.Learn',

     ),

     'INBOX.Test' =>

     array (

       0 => 'INBOX.Test.MIME',

     ),

     'Virtuelle Ordner' =>

     array (

       0 => '**vfolder_2m24ckpvxyqsk8wgoc',

     ),

   );

   var $_poll = NULL;

   var $_expanded = NULL;

   var $_subscribed = NULL;

   var $_unsubscribed = NULL;

   var $_initmode = false;

   var $_changed = false;

   var $_children = NULL;

   var $_unsubview = 0;

   var $_hasChildrenCache =

   array (

   );

   var $_imap_sort = NULL;

   var $_nonimapelt = false;

   var $_cachename = 'imaptree';

   var $_app = 'imp';

   var $_server = '{mail.wg.de:143/imap/notls}';

   var $_delimiter = '.';

   var $_prefix = '';

   var $_dotfiles = false;

   var $_mode = 0;

}
12/03/2004 08:10:15 AM Michael Slusarz Comment #28 Reply to this comment
Arrrrrghh.  For now, could you provide me with a mailbox list of a 
folder view that is causing the segfault.  I can't (and haven't) been 
able to reproduce this for at least a month here.
12/02/2004 04:22:55 PM Jan Schneider Comment #27
State ⇒ Assigned
Reply to this comment
This is still, or again happening. Michael, any chance you can take a 
look at this before the next RC? You fixed it once, maybe you can do 
it a second time. ;-)



If you need I can provide you with an accout on my dev machine where 
it's reproduceable.
11/18/2004 08:14:50 PM Chuck Hagenbuch Summary ⇒ Segfault in IMAP_Tree
 
11/06/2004 09:05:36 AM Jan Schneider State ⇒ Resolved
 
11/06/2004 09:01:16 AM vilius (at) lnk (dot) lt Comment #26 Reply to this comment
Fine here too. Thanks!
11/05/2004 06:56:34 PM Jan Schneider Comment #25 Reply to this comment
That fixed it for me.
11/05/2004 06:48:43 PM Chuck Hagenbuch Comment #24 Reply to this comment
What does my latest commit (see 
http://cvs.horde.org/framework/IMAP/IMAP/Tree.php for the commit 
message and 
http://cvs.horde.org/diff.php/framework/IMAP/IMAP/Tree.php?r1=1.30&r2=1.31&ty=u for the diff) do for everyone? Seems to clear up everything that I can replicate 
here.
11/05/2004 09:39:33 AM Jan Schneider Comment #23 Reply to this comment
Well, for me it worked between the two "fixes", ie. after changing the 
String::upper() calls to strtoupper(). I thought I had tracked it down 
to these calls too when I debugged it the first time, but finally it 
didn't change anything. Now it did, strange enough.



After the second change, removing the strtoupper() completely, I 
experience the same as Vilius, I was able to login at all. Even 
reverting Sort.php to the version that worked for me didn't help.
11/05/2004 08:58:57 AM vilius (at) lnk (dot) lt Comment #22 Reply to this comment
The changes commited are even worse for me too. Now commenting out 
uksort() doesn't help at all. Before these changes apache segfaulted 
only just right after login. Then I could click on Mail in the left 
menu, and everything began to work as expected. But now, I can't even 
get to IMP. Apache segfaults everytime when I click on Mail. So, I 
reverted back to yesterday's CVS.
11/05/2004 03:31:25 AM Chuck Hagenbuch Comment #21 Reply to this comment
For me, this makes the problems worse; my left menu would clear up 
after a bit of being logged in; now it doesn't seem to at all. Also, 
the folder screen itself won't display some of my folders now, and 
Expand All works erratically at best.
11/05/2004 12:33:14 AM Michael Slusarz Comment #20 Reply to this comment
Try what I just committed.
11/04/2004 09:27:40 PM vilius (at) lnk (dot) lt Comment #19 Reply to this comment
Try inactivating imp-folders block in registry. This should bring your 
menu back, well at least it helped for me.
11/04/2004 09:22:26 PM joho (at) webbplatsen (dot) se Comment #18 Reply to this comment
I'm seeing this too; with PHP 4.3.8 and PHP 4.3.9; Courier IMAP in use 
here. This must have started happening at the same time as for the 
others; the result in MSIE (for me) is that the left tree frame isn't 
displayed. Perhaps the IMAP c-client library has a problem with the 
changes.. ?
11/04/2004 09:14:05 PM   New Attachment: mbox_array_full.txt Download
 
11/04/2004 09:13:09 PM vilius (at) lnk (dot) lt Comment #17
New Attachment: mbox_array.txt Download
Reply to this comment
Line 110 is the last in this file, so I've put print_r($mbox) right 
before uksort(), and this is what I got. First file is print_r's 
output. As you see array is not full, and I have no idea why. I 
thought that might by because of apache crash so I commented uksort() 
and got full array printed out (see second file). Some really strange 
things happening here.



My directory stucture goes as follows:

INBOX.

INBOX.Horde

INBOX.Horde.announce

INBOX.Horde.dev

INBOX.Horde.i18n

INBOX.Horde.ulaform

INBOX.Horde.vilma

INBOX.Registracijos

INBOX.Spam

INBOX.Sent Mail

INBOX.tbbeta

INBOX.Technikai

INBOX.Trash
11/04/2004 07:13:28 PM Michael Slusarz Comment #16 Reply to this comment
Can someone post the results of a print_r($mbox) statement on line 110 
of IMAP_Sort?  (i.e. the array that we are passing to uksort() right 
before it crashes)
11/02/2004 03:57:03 PM Jan Schneider Comment #15 Reply to this comment
This seems to be a Cyrus thing then, which is what I am using here. Or 
rather a namespace thing, Dovecot doesn't use namespaces, does it?
11/02/2004 03:52:41 PM Michael Slusarz Comment #14 Reply to this comment
I'm with Chuck - not seeing anything and I'm running an identical 
setup to his - PHP 4.3.9 and dovecot.
11/02/2004 03:46:41 PM vilius (at) lnk (dot) lt Comment #13 Reply to this comment
Still there in BETA. PHP 4.3.2 (from Redhat's rpm), Cyrus.
11/02/2004 03:35:42 PM Chuck Hagenbuch Comment #12 Reply to this comment
I'm not seeing this after updating this morning. PHP 4.3.9, Dovecot.
11/02/2004 10:26:55 AM Jan Schneider Comment #11 Reply to this comment
As already mentioned on the mailing list I'm seeing this now too. But 
I'm banging my head to find out what exactly is causing this segfault. 
I already tried to replace uksort with uasort to no avail.



Let's try to find a common pattern. I'm using PHP 4.3.10-dev. This 
happens only with one of ca. a dozen folder listings that get passed 
to IMAP_Sort::sortMailboxesByKey(). This certain folder list has 13 
elements, another list with 15 elements works fine. The affected list 
contains my top level folders; using Cyrus this is a list like 
(INBOX.AMMMa, INBOX.Bugtraq, INBOX.Consulting, etc.)
10/28/2004 03:13:12 AM Michael Slusarz Comment #10 Reply to this comment
The only thing different is that another _sortList() was added to 
IMAP_Tree.  And this additional _sortList() is entirely necessary.   
And, furthermore, this addition should not cause PHP to segfault 
because it is simply doing an array sort.  Without knowing exactly 
where PHP is breaking, my guess is that you have a bad PHP build or a 
buggy PHP version.  I can not reproduce this at all (and have not 
received any other reports of this since I made this change a while 
back).
10/26/2004 06:56:44 PM Chuck Hagenbuch Assigned to Michael Slusarz
State ⇒ Assigned
 
10/26/2004 07:09:54 AM vilius (at) lnk (dot) lt Comment #9 Reply to this comment
I started with fresh new server today. I've got latest horde from CVS, 
installed it. First login was without problems. I went to 
administration meniu, configured horde, imp, etc.. After that I logged 
out, and then logged back on. Apache segfaulted. So apache segfaults 
when IMP is set to hordeauth = true.



In second stage I tried replacing different files in IMP by 
overwriting them with copy that worked for me (CVS 3-4 weeks ago). 
Nothing helped.



Then I found that not all accounts have this problem. I tried clearing 
preferences, user data, so on... Again nothing helped. Then I started 
with fresh new account. It worked. So I spent half a day by recreating 
MY preferences. It worked again. So I decided to move my folders to 
this account. After the move apache segfaulted on first atempt to 
login. I also tried with another test account, by only creating new 
folders, and see where it brakes. After some experiments, I found that 
apache segfaults (and brakes login) almost everytime when there is 
more than 5 folders in account. For example:



INBOX

INBOX.Horde

INBOX.Horde.announce

INBOX.Horde.dev

INBOX.Horde.i18n

INBOX.Horde.ulaform

INBOX.Horde.vilma



but this works:



INBOX

INBOX.Horde

INBOX.Horde.announce

INBOX.Horde.dev

INBOX.Horde.i18n

INBOX.Horde.ulaform



So something must be bad in IMAP tree code. I reverted this change:

http://cvs.horde.org/diff.php/framework/IMAP/IMAP/Tree.php?ws=0&r1=1.24&r2=1.25&ty=u



And login works again.



I must say, that I couldn't login not only from IE (as I stated 
before), but from other browsers too, because of this apache segfault.



I don't know what EXACTLY causes this, so I leave it to you guys, but 
this solution worked for me.



Using:

RH Enterprise 3

Apache 2.0.46

PHP 4.3.2

IMAP c-Client Version  2001

SSL Support  enabled


10/22/2004 12:45:39 PM vilius (at) lnk (dot) lt Comment #8 Reply to this comment
Nope, I haven't. I tested it twice. Second time with fresh cvs code.
10/22/2004 12:37:21 PM Jan Schneider Comment #7 Reply to this comment
None of the lines that are referred in the error message output 
anything. I have no idea how that URL gets printed before the header 
is sent. Any chance you have inserted some debug code in login.php, 
Util.php, or Horde.php?
10/22/2004 11:45:34 AM vilius (at) lnk (dot) lt Comment #6
New Attachment: httpwarch_report.xml Download
Reply to this comment
I tried to debug this today.



1) I tried watching requests with HTTPWatch. Attached report file. See 
the line with:



https://mail.lnk.lt/horde/index.php?frameset=0<br />

<b>Warning</b>:  Cannot modify header information - headers already 
sent by (output started at /var/www/html/horde/login.php:87) in 
<b>/var/www/html/horde/login.php</b> on line <b>88</b><br />



2) So I tried reverting recent changes in horde/login.php. But with no luck.



3) I reverted horde/index.php to rev 2.100 and removed html.php 
checks. And wuola. Horde login is working again.



So I think some bad code is present in initialPage() code. Hadn't much 
time to debug deeper. More to come later.


10/21/2004 09:38:35 AM Jan Schneider Comment #5 Reply to this comment
1) I can't reproduce the HTTPS behaviour, once I use the HTTPS 
protocol, the browser stays on that protocol correctly.



2) Segfaults are never Horde's fault.



3) I only get requests for blank.gif once for each browser *session*. 
That means one time when the user first hit a PNG file with IE. After 
that the browser caches the image. If the browser comes back with a 
new session, the server correctly response with a "Not modified" 
header, so the image is not transferred either.
10/21/2004 08:38:43 AM vilius (at) lnk (dot) lt Comment #4 Reply to this comment
No and no. Horde is configured to autodetect https. And there where no 
changes in IE security settings. All I did is update of Horde 
(framework and modules) from CVS. So configuration remains the same (i 
updated .dist files too). But everything worked like a charm before 
recent changes in cvs (regarding PNG and themes).



Apache seems to segfault very often on this new (PNG powered :)) 
horde. I think this is because of I have ~50 users using horde 
simulationesly. So I get about 500 request of blank.gif per second.
10/21/2004 08:28:12 AM Jan Schneider Comment #3
State ⇒ Feedback
Reply to this comment
I don't think these are related.



Any chance you configured Horde to use HTTPS on login only? Then this 
popup is normal behaviour if you didn't IE to *not* warn you when 
changing between secure and insecure sites.



No idea about the "action cancelled" screen. Any paranoid security 
settings in IE?
10/21/2004 08:17:35 AM vilius (at) lnk (dot) lt Comment #2 Reply to this comment
More on this; IE6 on Windows 98 works more horribly. Login seems to 
hang very often. If login is succesful I can't get to my INBOX. 
IExplorer hangs just right after showing mail quota.
10/21/2004 08:05:01 AM vilius (at) lnk (dot) lt Comment #1
Priority ⇒ 3. High
State ⇒ Unconfirmed
Queue ⇒ Horde Base
Type ⇒ Bug
Summary ⇒ login script broken in IE
Reply to this comment
I'm using HEAD20041021. Everytime I login in IE (on WinXP) I get 
"redirecting to insecure website" popup and the "action canceled" 
screen. With Mozilla and Firefox it works OK.



I'm using secure HTTPS connection, Horde cyrus authentification. 
Application to show after login is Portal.


Saved Queries