From xemacs-m  Thu Mar 27 11:48:30 1997
Received: from hubbub.cisco.com (mailgate-sj-1.cisco.com [198.92.30.31])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id LAA18760
	for <xemacs-beta@xemacs.org>; Thu, 27 Mar 1997 11:48:29 -0600 (CST)
Received: from sandman (sandman.cisco.com [171.68.209.51]) by hubbub.cisco.com (8.8.4-Cisco.1/CISCO.GATE.1.1) with ESMTP id JAA23645; Thu, 27 Mar 1997 09:48:01 -0800 (PST)
Received: (from drich@localhost) by sandman (SMI-8.6/8.6.12) id JAA02124; Thu, 27 Mar 1997 09:48:00 -0800
From: Dan Rich <drich@cisco.com>
Message-Id: <199703271748.JAA02124@sandman>
Subject: Re: 20.1b9 still very slow
To: dmoore@ucsd.edu (David Moore)
Date: Thu, 27 Mar 1997 09:47:59 -0800 (PST)
Cc: xemacs-beta@xemacs.org
In-Reply-To: <rvafnqmojb.fsf@sdnp5.ucsd.edu> from "David Moore" at Mar 26, 97 11:38:48 am
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

> Dan Rich <drich@cisco.com> writes:
> 
> > ....  I timed it yesterday, and on my system it took over 15 seconds 
> > for XEmacs to display a line of text that I typed in an outgoing
> > e-mail buffer (in VM 6.22).
> Hmm, something sounds broken. :) Although, since you are using vm
> (mailer of the gods!), what might be happening is that a timer went off
> to update the cache in your various vm files.  Although, I think it's
> supposed to stop updating it if it notices you typing.

This would be a bit surprising, as I only had a single mailbox open at 
the time, and it's happening for almost every message I send!

> > Running a truss doesn't show anything too interesting, except that it
> > is making hundreds of calls to getcontext().  Is this normal?  
> Righto.  Solaris has a threaded X client library.  So you'll see lots of
> calls to getcontext around select/poll or read/write which is typically
> related to the x code doing something.  So I'd just ignore those from
> truss.

Even though I'm not using Sun's X11 libs?  This is a "real" X11 install,
built from source.  I have very little faith in Sun's X11 offerings -- I
know too many people who work there! :-)

> Two other things you can do:
> 1) C level:
> When you see it going mad like this, you might want to use gdb from an
> *xterm* to attach to the running process and get a stack trace.  To do
> this just run:

Here's the stack trace from this morning's hang.  This one was a little
different, I was reading e-mail and it just went out to lunch.  I'm
assuming it's going to come back shortly, but it's not updating anything --
the message highlighting (in the summary buffer) has stopped, as has the
response to scrollbars.  Here's where gdb says I am.....(I'll include
the symbol list just in case anyone sees anything strange with my libs):

drich@sandman|834> gdb /local/beta/bin/xemacs 15011
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (sparc-sun-solaris2.5.1), 
Copyright 1996 Free Software Foundation, Inc...

/home/drich/Src/bsd-make/15011: No such file or directory.
Attaching to program `/local/beta/bin/xemacs', process 15011
Reading symbols from /usr/dt/lib/libDtSvc.so.1...done.
Reading symbols from /usr/dt/lib/libtt.so.2...done.
Reading symbols from /usr/openwin/lib/libce.so.0...done.
Reading symbols from /usr/dt/lib/libXm.so.3...done.
Reading symbols from /opt/local/X11R6/lib/libXpm.so.4.9...done.
Reading symbols from /opt/local/X11R6/lib/libXmu.so.6.0...done.
Reading symbols from /opt/local/X11R6/lib/libXt.so.6.0...done.
Reading symbols from /opt/local/X11R6/lib/libSM.so.6.0...done.
Reading symbols from /opt/local/X11R6/lib/libICE.so.6.3...done.
Reading symbols from /usr/lib/libw.so.1...done.
Reading symbols from /opt/local/X11R6/lib/libXext.so.6.3...done.
Reading symbols from /opt/local/X11R6/lib/libX11.so.6.1...done.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libkvm.so.1...done.
Reading symbols from /usr/lib/libelf.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libkstat.so.1...done.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/openwin/lib/libXt.so.4...done.
Reading symbols from /usr/openwin/lib/libXext.so.0...done.
Reading symbols from /usr/openwin/lib/libX11.so.4...done.
Reading symbols from /usr/lib/libintl.so.1...done.
Reading symbols from /usr/lib/libmp.so.1...done.
Reading symbols from /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1...done.
Flength (obj=268435455) at fns.c:204
204     {
(gdb) where
#0  Flength (obj=268435455) at fns.c:204
#1  0x951cc in condition_case_1 (handlers=554142396, bfun=0x972e4 <Feval>, 
    barg=554142308, hfun=0x95238 <run_condition_case_handlers>, harg=272285700)
    at eval.c:1647
#2  0x95438 in Fcondition_case_3 (bodyform=554142308, var=272285700, 
    handlers=554142396) at eval.c:1710
#3  0x5fc68 in Fbyte_code (bytestr=815765068, vector=1090966848, maxdepth=4)
    at bytecode.c:578
#4  0x99140 in funcall_lambda (fun=285410756, nargs=0, arg_vector=0xeffff128)
    at eval.c:3591
#5  0x980b8 in funcall_recording_as (recorded_as=285410756, nargs=0, 
    args=0xeffff124) at eval.c:3189
#6  0x98110 in Ffuncall (nargs=1, args=0xeffff124) at eval.c:3217
#7  0x99940 in run_hook_with_args_in_buffer (buf=0x103ac004, nargs=1, 
    args=0xeffff124, cond=RUN_HOOKS_TO_COMPLETION) at eval.c:3772
#8  0x999b8 in run_hook_with_args (nargs=1, args=0xeffff124, 
    cond=RUN_HOOKS_TO_COMPLETION) at eval.c:3785
#9  0x995b4 in Frun_hooks (nargs=1, args=0xeffff1ec) at eval.c:3648
#10 0x99b10 in run_hook (hook=272371612) at eval.c:3889
#11 0x9a840 in catch_them_squirmers_run_hook (hook_symbol=272371612)
    at eval.c:4361
#12 0x951cc in condition_case_1 (handlers=272285796, 
    bfun=0x9a834 <catch_them_squirmers_run_hook>, barg=272371612, 
    hfun=0x9a4a4 <allow_quit_safe_run_hook_caught_a_squirmer>, harg=554025276)
    at eval.c:1647
#13 0x9aac4 in safe_run_hook_trapping_errors (
    warning_string=0x2603d0 "Error in `pre-idle-hook' (setting hook to nil)", 
    hook_symbol=272371612, allow_quit=1) at eval.c:4421
#14 0xaa65c in run_pre_idle_hook () at event-stream.c:1933
#15 0xaadb0 in Fnext_event (event=290022656, prompt=272285700)
    at event-stream.c:2111
#16 0x6f3d0 in Fcommand_loop_1 () at cmdloop.c:531
#17 0x6f034 in command_loop_1 (dummy=272285700) at cmdloop.c:460
#18 0x951cc in condition_case_1 (handlers=272285796, 
    bfun=0x6ef90 <command_loop_1>, barg=272285700, hfun=0x6e120 <cmd_error>, 
    harg=272285700) at eval.c:1647
#19 0x6e220 in command_loop_3 () at cmdloop.c:222
#20 0x6e248 in command_loop_2 (dummy=272285700) at cmdloop.c:233
#21 0x94cec in internal_catch (tag=272363548, func=0x6e23c <command_loop_2>, 
    arg=272285700, threw=0x0) at eval.c:1324
#22 0x6e6e0 in initial_command_loop (load_me=451132) at cmdloop.c:271
#23 0x91c00 in main_1 (argc=1, argv=0xeffffa64, envp=0xeffffa6c)
    at emacs.c:1475
#24 0x923cc in main (argc=1, argv=0xeffffa64, envp=0xeffffa6c) at emacs.c:1826

> 2) Lisp level:

I'll have to turn this on and see what happens....

