Subject: pine crash on osx

From: Matt Ackeret <[email-masked]>
Date: Wed, 24 Oct 2001 12:33:13 -0700 (PDT)

On Mon, 22 Oct 2001 [email-masked] wrote:
>Date: Mon, 22 Oct 2001 16:51:40 -0400
>From: Tim Gray <[email-masked]>
>To: [email-masked]
>Subject: Pine and OS X crash
>Message-ID: <p05101021b7fa37296916@[140.180.142.226]>
....
>Ok, here is the log.  And to clarify, the crash that happens on OS X
>happens with or without the GPG filter.  I have uninstalled it and it
>still happens:
>
>Date/Time:  2001-10-22 16:49:45 -0400
>OS Version: 10.1 (Build 5L14)
>
>Command:    pine
>PID:        997
>
>Exception:  EXC_BAD_ACCESS (0x0001)
>Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
>
>Thread 0:
>  #0   0x00000000 in 0x0
>  #1   0x7000f81c in _sigtramp
>  #2   0x0017bb28 in piped_getline
>  #3   0x70001818 in __sflush
>  #4   0xc24bc195 in 0xc24bc195
>
>
>PPC Thread State:
>   srr0: 0x00000000 srr1: 0x4000d030                vrsave: 0x00000000
>    xer: 0x00000010   lr: 0x7000f81c  ctr: 0x00000000   mq: 0x00000000
>     r0: 0x00000000   r1: 0xbfffca40   r2: 0x005eb6a0   r3: 0x00000014
>     r4: 0x00000000   r5: 0xbfffccc8   r6: 0x00000000   r7: 0x00000000
>     r8: 0x00018001   r9: 0x00000001  r10: 0x00000000  r11: 0x00367aa8
>    r12: 0x00000000  r13: 0x00000000  r14: 0x00000036  r15: 0x00063810
>    r16: 0x00000001  r17: 0x80160e88  r18: 0x000603b8  r19: 0x00001107
>    r20: 0x00000000  r21: 0x0000001c  r22: 0x70004bc4  r23: 0x70004c58
>    r24: 0x7016b214  r25: 0x006bac3c  r26: 0x8081ab5c  r27: 0xc0cc2000
>    r28: 0x00000000  r29: 0xbfffef00  r30: 0x00000000  r31: 0x00000001

btw do you know you sent this in both text/plain and text/html?

This is very similar to, if not the same as, a problem I have mentioned
previously..  I can crash pine by quitting an URL viewer launched by pine.
I never got a response from this mailing list, so I finally wrote up a bug
in Apple's internal bug system.  I am not sure if external users can see
much if any useful info on bugs, but the bug # is 2791338.  (You can check
it out at bugreporter.apple.com, but you need a [free] login account to use it)

My crash was:
Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

Thread 0:
 #0   0x00000000 in 0x0
 #1   0x7000f81c in _sigtramp
 #2   0x70006af0 in nanosleep
 #3   0x7000be90 in closedir

These may in fact be the same problem, since I presume pine is launching
GPG (though I see you say it happens without the filter?  Are you saying that
EVERY TIME you send a message pine crashes?), and it quits, and causes the
same crash.

Since pine doesn't ship with the OS, I don't suspect that my bug will have
a huge priority, but hopefully they'll track it down to see if it's some kind
of internal OS problem or a pine problem.

-- 
-----------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/pine/pine-info/
-----------------------------------------------------------------

---

From: "Timothy G. Gray" <[email-masked]>
Date: Wed, 24 Oct 2001 15:59:13 -0400 (EDT)

Yes, this happens everytime I send a mail, no matter what plugins are
installed, what settings I use, etc.  Every time.  It started as soon as I
upgraded to 10.1.  Even if I remove the GPG plugin from my system, it
still crashes (default install).

Tim

---

From: Steve Hubert <[email-masked]>
Date: Wed, 24 Oct 2001 14:16:16 -0700 (Pacific Daylight Time)

We finally figured this one out. It will be fixed in pine4.41. The fix is
to uncomment

/* #define vfork fork*/ /* vfork is just a lightweight fork, so can use fork */

in .../pico/osdep/os-osx.h, so that it looks like

#define vfork fork /* vfork is just a lightweight fork, so can use fork */

I'm not sure if it is a MacOS X 10.1 bug or a pine bug. The problem is
that pine is doing a vfork in .../pine/osdep/pipe and then the child is
setting SIGCHLD to its default action. That causes the parent's SIGCHLD
handler to be set to garbage, far as I can tell. This may be legitimate
behavior after a vfork, I'm not sure, but we haven't seen the problem on
other OS's. Changing that vfork to a fork fixes the problem.

-- 
Steve Hubert <[email-masked]>
Networks and Distributed Computing, Univ. of Washington, Seattle

---

From: "Steven R. Loomis" <[email-masked]>
Date: Thu, 25 Oct 2001 00:50:13 +0200 (CEST)

> #define vfork fork /* vfork is just a lightweight fork, so can use fork */

I had to remove vfork in pine/os.c also (which is a symlink).  Working
great now!  I suspected this was something to do with signal handlers.
It's so annoying to debug them.

-steven