On Fri, Oct 12, 2012 at 5:23 PM, David Korn <d...@research.att.com> wrote:
[CC:'ing ast-developers@ so that others can help with debugging, too]
> cc: olga.kryzhanov...@gmail.com g...@research.att.com
> Subject: Re: Crash in shpiano.sh demo with ast-ksh.2012-10-04...
> --------
>
> I don't have /dev/audio on my linux system and I don't have root permission.

Erm... most Unix/Linux audio applications which use /dev/audio honor
the AUDIODEV env variable...
... AFAIK this should work in your case for debugging:
-- snip --
$ AUDIODEV=/dev/null ~/bin/ksh shpiano.sh
-- snip --
... and then press some keys like 'd', 'e', 'f' ...

> Maybe you can get some information that will help from the core dump.
>
> What is sh.inlineno?

See below...

> What is *np?

Se below...

> what is *ap

See below...

I switched to a Solaris 11/SPARC machine for better debugging
abilities and to ast-ksh.2012-10-12...
... basically the crash looks like this:
-- snip --
program terminated by signal SEGV (no mapping at the fault address)
Current function is bestreclaim
  401                           list = LINK(list);
/**/ASSERT(!vmonlist(list,fp));
(dbx) where
=>[1] bestreclaim(vd = 0x10039b4a8, wanted = (nil), c = 1), line 401
in "vmbest.c"
  [2] bestalloc(vm = 0x10039b520, size = 32U, local = 1), line 661 in "vmbest.c"
  [3] _ast_malloc(size = 17U), line 521 in "malloc.c"
  [4] nv_putval(np = 0xffffffff7c701980, string = 0xffffffff7e81503a
"tones[G3]", flags = 0), line 1939 in "name.c"
  [5] nv_open(name = 0xffffffff7e815030 "curr_note=tones[G3]", root =
0xffffffff7e81dff0, flags = 8929920), line 1525 in "name.c"
  [6] sh_setlist(shp = 0x100396dc0, arg = 0xffffffff7c5281e0, flags =
8929920, typ = (nil)), line 592 in "name.c"
  [7] sh_exec(shp = 0x100396dc0, t = 0xffffffff7c528180, flags = 4),
line 1135 in "xec.c"
  [8] sh_exec(shp = 0x100396dc0, t = 0xffffffff7c528380, flags = 4),
line 2159 in "xec.c"
  [9] sh_exec(shp = 0x100396dc0, t = 0xffffffff7c528010, flags = 4),
line 2478 in "xec.c"
  [10] sh_exec(shp = 0x100396dc0, t = 0xffffffff7c529a70, flags = 4),
line 2159 in "xec.c"
  [11] sh_exec(shp = 0x100396dc0, t = 0xffffffff7c527a10, flags = 4),
line 2402 in "xec.c"
  [12] sh_exec(shp = 0x100396dc0, t = 0xffffffff7c529f50, flags = 6),
line 2159 in "xec.c"
  [13] sh_funscope_20120720(shp = 0x100396dc0, argn = 1, argv =
0xffffffff7e814128, fun = (nil), arg = 0xffffffff7ffff1e8, execflg =
4), line 3980 in "xec.c"
  [14] sh_funct(shp = 0x100396dc0, np = 0xffffffff7e91c0c0, argn = 1,
argv = 0xffffffff7e814128, envlist = (nil), execflg = 4), line 3297 in
"xec.c"
  [15] sh_exec(shp = 0x100396dc0, t = 0xffffffff7e8140c0, flags = 4),
line 1514 in "xec.c"
  [16] exfile(shp = 0x100396dc0, iop = 0xffffffff7e81fbf0, fno = 11),
line 582 in "main.c"
  [17] sh_main(ac = 2, av = 0xffffffff7ffffa88, userinit = (nil)),
line 354 in "main.c"
  [18] main(argc = 2, argv = 0xffffffff7ffffa88), line 45 in "pmain.c"
(dbx) print sh.inlineno
sh.inlineno = 1433
(dbx) up
Current function is bestalloc
  661           {       bestreclaim(vd,NIL(Block_t*),n);
(dbx) up
Current function is _ast_malloc
  521           addr = (*vm->meth.allocf)(vm, size, local);
(dbx) up
Current function is nv_putval
 1939                                                   cp =
(char*)malloc(((unsigned)dot+8));
(dbx) print np
np = 0xffffffff7c701980
(dbx) print *np
*np = {
    nvlink  = {
        rh = {
            __rght = 0xffffffff7c52c040
            __ptbl = 0xffffffff7c52c040
        }
        lh = {
            __left = 0xffffffff7c52bfe0
            __hash = 4294967295U
        }
    }
    nvname  = 0xffffffff7c7019c0 "curr_note"
    pad1    = 0
    nvflag  = 0
    nvsize  = 0
    nvfun   = (nil)
    nvalue  = {
        cp    = (nil)
        ip    = (nil)
        c     = '\0'
        i     = 0
        u     = 0
        lp    = (nil)
        idp   = (nil)
        llp   = (nil)
        s     = 0
        sp    = (nil)
        dp    = (nil)
        ldp   = (nil)
        array = (nil)
        np    = (nil)
        up    = (nil)
        rp    = (nil)
        funp  = (nil)
        nrp   = (nil)
        bfp   = (nil)
    }
    nvshell = 0x100396dc0
    nvenv   = (nil)
}
(dbx) print ap
ap = 0x3d
(dbx) print *ap
dbx: cannot access address 0x3d
-- snip --

Does that help somehow ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.ma...@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
ast-developers@research.att.com
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to