Re: 2.1.80 crashes netscape

Mike Jagdis (mike@roan.co.uk)
Tue, 27 Jan 1998 11:10:14 +0000 (GMT/BST)


On Mon, 26 Jan 1998, Jamie Lokier wrote:

> I've found that Netscape 4.03 and 4.04 crash, as soon as I click
> anything or type anything into the window. They crash with a SIGSEGV.
> Other X events, like simply redrawing the screen, are fine. OTOH, after
> a time delay, the programs crash anyway. It looks like the crash occurs
> when Netscape tries to fetch the first web page (be it a local file or
> some remote thing).
>
> Netscape 3.04 is fine, as are every other program I've used so far.
>
> I can't `strace' the processes properly, and GDB doesn't catch them
> either. I suspect they use threads with shared pids or something.
> However I did attach to the process, and find the SEGV occurs during a
> `select' call, shortly after opening and dup'ing various file
> descriptors.
>
> Who knows what's going on...

I'll try a guess for free :-). Untrappable SEGV exits are usually
in the signal code (arch/i386/kernel/signal.h). There are two,
no three, possibilities there. Firstly on return from a signal
handler when the stack frame has been corrupted (buffer overrun?),
secondly when the code is trying to set up a stack frame for a
handler but the verify_area fails (stack collision with mapped
data perhaps?), and thirdly when the SS register is set to a segment
other than the usual USER_DS (emulator? dosemu? wine? x286emul?)
and the sa_restorer field of the sigaction structure doesn't
point somewhere we can build a stack frame for the signal handler.
If you want to find out which case has bitten you you probably
need to instrument the kernel code.

The kernel handling doesn't seem entirely correct here. The code
calls do_exit directly rather than queuing the SIGSEGV - which
may be the only sane thing to do after a stack frame error in
signal handling code - but is a core dump possible? At the very
least a printk so you knew which problem had bitten would be
helpful. Linus?

Mike

-- 
.----------------------------------------------------------------------.
|  Mike Jagdis                  |  Internet:  mailto:mike@roan.co.uk   |
|  Roan Technology Ltd.         |                                      |
|  54A Peach Street, Wokingham  |  Telephone:  +44 118 989 0403        |
|  RG40 1XG, ENGLAND            |  Fax:        +44 118 989 1195        |
`----------------------------------------------------------------------'