Erik Andersen wrote:
>
> On Mon Apr 09, 2001 at 06:25:20PM -0500, David Douthitt wrote:
> > I previously compiled tinyps (with glibc 2.0.7) and have been using it
> > in a glibc 2.0.7 environment. Recently I shifted to a glibc 2.1.3
> > environment, and tinyps stopped working - it gives a SegFault right
> > after the title line.
> >
> > I thought this was just the time to shift to busybox ps - after all,
> > that is much more likely to work in my opinion. However, the results
> > were exactly the same: SegFault right after title line. busybox was
> > also compiled against glibc 2.0 libraries.
> >
> > I'd like to find out what the trouble is. I may just compile busybox
> > for glibc 2.1, but it would be nice to find out why it (and tinyps)
> > breaks...
>
> any chance we could have you compile with debugging enabled and
> try the problem case again running under gdb? Or can you give
> us an strace or ltrace? As is, I have tried it with libc5,
> uClibc, glibc 2.1.3, and glibc 2.2.2 and it works for
> all of those...
I tried it, with debugging symbols in place (nice!)... I'm still
learning about gdb.
It had a back trace similar to this (abbreviated):
#0 0x0 in ?? ()
#1 0x127901 in ()
#2 0x17dafe in vsscanf ()
#3 0x17b8cf in sscanf ()
#4 0x806332c in parse_proc_status (S=0xbffffabc "Name:\tinit\nState
[..snip!...] ..." P=0xbffffdb58) at ps.c:87
#5 [...snip!...] ps.c:150
#6 [...snip!...] applets.c:96
#7 [...snip!...] busybox.c:100
I also took a look at tinyps (the current ps implementation); it
doesn't have debugging symbols but it too failed in sscanf/vsscanf. I
looked at the call for sscanf, and nothing seems out of place. Here
is what is reported for the data:
P = (proc_t *) 0xbffffd58
*P = { cmd = \000 (15x), ruid = 134656002, rgid = -1073742125, pid =
134689808, ppid = 72, state = 12 '\f' }
I suspect the glibc libraries would be Debian's last glibc 2.1.3
security update; should I be using a different version?
_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel