Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23232 - pine-maildir 4.50 and higher segfaults when TAB-ing to next folder
Summary: pine-maildir 4.50 and higher segfaults when TAB-ing to next folder
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on: 50696
Blocks:
  Show dependency tree
 
Reported: 2003-06-21 08:45 UTC by Maurice van der Pot (RETIRED)
Modified: 2004-06-08 16:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Pine configuration file (.pinerc,15.76 KB, text/plain)
2003-06-21 08:46 UTC, Maurice van der Pot (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maurice van der Pot (RETIRED) gentoo-dev 2003-06-21 08:45:23 UTC
When I press TAB to go to the next folder, pine crashes with a segfault:

Problem detected: "Received abort signal(sig=11)".
Pine Exiting.

Going to the other folders using the folder list works like it should though.

Attached is my .pinerc
Comment 1 Maurice van der Pot (RETIRED) gentoo-dev 2003-06-21 08:46:27 UTC
Created attachment 13651 [details]
Pine configuration file
Comment 2 Nick Hadaway 2003-08-15 19:03:02 UTC
I don't experience the same problem... Can you give me some more details... i.e. output of "emerge info" ... does this error still happen with the latest 4.56 ebuild?
Comment 3 Maurice van der Pot (RETIRED) gentoo-dev 2003-08-16 02:58:50 UTC
Yes, this problem still happens with 4.56

The output from emerge info:

Portage 2.0.48-r7 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.19 i686 Pentium III (Coppermine)
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/portage_overlay"
USE="foomaticdb mad -3dfx -3dnow -aalib -acl -acpi -afs alsa apache2 -apm -arts -atlas avi -berkdb bonobo -canna cdr -cjk crypt -cups dga directfb -doc dvd encode -esd ethereal -evo -ev6 -fbcon -flash -freewnn -gb gd gdbm ggi gif -gnome -gphoto2 gpm -gps gtk gtk2 -gtkhtml -guile -icc -icc-pgo imap imlib -innodb ipv6 -java -jikes jpeg -junit -kde -kerberos -lcms -ldap -leim -libg++ -libgda libwww -matrox maildir mbox mikmod mmx -motif mozilla mpeg -mule mysql -nas ncurses -nls -nocardbus oav -oci8 -odbc oggvorbis opengl oss pam -pcmcia -pda pdflib perl pic plotutils png pnp python qt quicktime readline -ruby samba sasl -scanner sdl slang -slp snmp -socks5 spell sse ssl svga tcltk tcpd -tetex tiff truetype trusted usb -voodoo3 -wavelan wmf X -xface xml xml2 xmms xv -zeo zlib x86"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe"
CXXFLAGS="-march=pentium3 -O3 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 4 Maurice van der Pot (RETIRED) gentoo-dev 2003-09-25 11:58:31 UTC
Should I wait for a new version of pine-maildir (with this bug and bug #28877
fixed) or should I look for another solution (using the normal pine)?

I am willing to help by creating an account on my box for someone who can
fix it (to prevent problems reproducing this bug).
Comment 5 Max Kalika (RETIRED) gentoo-dev 2003-09-25 13:11:37 UTC
I'll try to get this updated tonight if no one beats me to it.  Though I
have no way of testing maildir.  All I can do is see if pine starts up. 
Stay tuned.
Comment 6 Max Kalika (RETIRED) gentoo-dev 2003-11-08 12:31:57 UTC
Side question:  Is pine-maildir need to be a separate package?  I've got
a new pine ebuild that supports the maildir USE flag.  Can this be all rolled
into one package?  The reason I bring this up is that I've added a bunch
more functionality to the pine ebuild (i.e. IPV6, UTF8, passfile, new chappa
patch, etc).  I would really hate to duplicate all this effort into another
package when a simple USE flag can suffice for maildir support.  Opinions?
Comment 7 Max Kalika (RETIRED) gentoo-dev 2003-11-08 23:48:22 UTC
Please give the new pine ebuild a try.  Unmerge old pine-maildir and emerge
pine-4.58-r3.  Make sure you have "maildir" in your USE flags.
Comment 8 Maurice van der Pot (RETIRED) gentoo-dev 2003-12-04 06:22:21 UTC
Sorry it took me so long to reply, I haven't been online for a month.

I think you forgot to gzip some of the patches. Either that or you forgot to remove the unpack command (I get some warnings when emerging).

As usual there is some good and some bad news.
The good news is that the build succeeded and that I can use this version of pine to read the mail in my maildir folders.
The bad news is that the segfault problem is still present.

If you can't reproduce it, I can give you a temporary account on my box. Mail me if you need it.
Comment 9 Maurice van der Pot (RETIRED) gentoo-dev 2003-12-11 06:22:46 UTC
I think I figured out what the problem is.

When TAB-ing to the next folder, mail_status() is invoked.
That function returns SAFE_STATUS (dtb,stream,mbx,flags);
SAFE_STATUS is #defined as (*dtb->status) (stream,mbx,flags)
and the maildir driver has this in its driver struct:
  NIL,                          /* status of mailbox */
resulting in a call to a NULL function pointer.

I think that there are 2 reasons that this caused a problem at all.

1) Pine does not always check if the maildriver functions 
that it uses are actually defined in the maildriver structure.
It does in the case of the subscribe function:

  return factory ?
    (factory->subscribe ?
     (*factory->subscribe) (stream,mailbox) : sm_subscribe (mailbox)) : NIL;

But not in the case of status (and several other functions):

  if (!dtb) return NIL;         /* only if valid */
  if (stream && ((dtb != stream->dtb) ||
                 ((dtb->flags & DR_LOCAL) && strcmp (mbx,stream->mailbox) &&
                  strcmp (mbx,stream->original_mailbox))))
    stream = NIL;               /* stream not suitable */
  return SAFE_STATUS (dtb,stream,mbx,flags);

I can imagine that maildrivers are _required_ to implement some functions,
but the least pine could do is check these function pointers at startup and
give a decent error message if it's NIL, so maildriver programmers know 
immediately what's wrong.

For all functions that are optional, pine should check if they are implemented
before using them.

2) The maildir maildriver does not implement all required functions.
Apparently the status function is a required one, so adding this one should
probably fix the segfault problem.

Oh btw, if I'm barking up the wrong tree here, please let me know.
Comment 10 Max Kalika (RETIRED) gentoo-dev 2004-02-06 09:01:31 UTC
any word from the pine folk on this?
Comment 11 Maurice van der Pot (RETIRED) gentoo-dev 2004-02-06 09:21:14 UTC
Nope, no response at all. I suppose the solution would be to fix the maildir patch by implementing a status function. This would probably be easiest for someone who actually knows what the status function should do (i.e. not me) =]
Comment 12 Max Kalika (RETIRED) gentoo-dev 2004-02-06 10:32:59 UTC
Unfortunately that isn't me either.  Would you mind sending the patch to the pine people one more time?  Hopefully someone will notice this time.
Comment 13 Maurice van der Pot (RETIRED) gentoo-dev 2004-02-06 12:02:21 UTC
What patch? I don't have a patch for the problem.

I previously sent something like comment #8. I'll send it again.
Comment 14 Maurice van der Pot (RETIRED) gentoo-dev 2004-02-06 12:03:05 UTC
00ps, I meant comment #9 
Comment 15 Maurice van der Pot (RETIRED) gentoo-dev 2004-03-04 04:36:43 UTC
Still nobody has replied to either of my messages to the pine-info mailing list.

Because the support is not that great and because pine is non-free, I would just recommend people to move to Mutt like I did.

I'm not up-to-speed on the bug closing policy of Gentoo, but I wouldn't mind if this one is closed.

Thanks for your support Max.
Comment 16 Anders Hellgren gentoo-dev 2004-05-04 04:26:51 UTC
I don't know whether this helps anything, but this problem happens for me too when I have more than one local maildir defined as incoming message folder. Nevertheless, tabbing to INBOX seems to work OK. Defining a local mbox also seems to be unproblematic. I have two remote incoming folders. These two together with the INBOX maildir only is no problem.

Yeah, maybe it is time to give mutt a shot.
Comment 17 Anders Hellgren gentoo-dev 2004-05-04 12:12:05 UTC
Perhaps there is still hope :)

See http://www.math.washington.edu/~chappa/pine/info/maildir.html

Among other things:  Fixes a crashing bug when checking for the STATUS of a maildir mailbox (this is the number of recent messages in the folder).

And yes it is linked to this bug!

I haven't tried it yet, but this seems to be the patch that should be used also in Bug 28877.
Comment 18 Grant Goodyear (RETIRED) gentoo-dev 2004-06-08 16:34:44 UTC
Should be fixed in new pine ebuild (4.60).