2004-01-13 17:44:19

by Gene Heskett

[permalink] [raw]
Subject: ANother debugging Q

Greetings all;

I have a problem running a kde app (ksysguard or kpm) that forks the
actual app from the script that runs it, but the actual app itself
has connection problems. An strace only traces the apps invocation
up to the point of the fork call, and it is therefore no help with
the application proper as it doesn't get traced.

Is there a way to make the app itself inherit the strace so that its
errors can be located/defined and fixed?

--
Cheers, Gene
"There are four boxes to be used in defense of liberty: soap,
ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.22% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2003 by Maurice Eugene Heskett, all rights reserved.


2004-01-13 17:56:50

by Muli Ben-Yehuda

[permalink] [raw]
Subject: Re: ANother debugging Q

On Tue, Jan 13, 2004 at 12:43:27PM -0500, Gene Heskett wrote:

> Is there a way to make the app itself inherit the strace so that its
> errors can be located/defined and fixed?

Short answer: man strace.
Long answer: strace -f (or -ff).

Cheers,
Muli
--
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/

"the nucleus of linux oscillates my world" - gccbot@#offtopic


Attachments:
(No filename) (391.00 B)
signature.asc (189.00 B)
Digital signature
Download all attachments

2004-01-13 23:17:53

by Gene Heskett

[permalink] [raw]
Subject: Re: ANother debugging Q

On Tuesday 13 January 2004 12:56, Muli Ben-Yehuda wrote:
>On Tue, Jan 13, 2004 at 12:43:27PM -0500, Gene Heskett wrote:
>> Is there a way to make the app itself inherit the strace so that
>> its errors can be located/defined and fixed?
>
>Short answer: man strace.
>Long answer: strace -f (or -ff).
>
>Cheers,
>Muli

Unforch, that seems to shut down the opening of the error advisory
window. It just sits there showing a blank (data wise) screen. And
extensive scrolling back thru about 5 megs of the output doesn't
disclose a missing file that I can see. How would I go about
redirecting that output to grep, it seems to bypass an

"strace -f ksysguard|grep open"

--
Cheers, Gene
"There are four boxes to be used in defense of liberty: soap,
ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.22% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2003 by Maurice Eugene Heskett, all rights reserved.

2004-01-14 00:59:15

by Nuno Silva

[permalink] [raw]
Subject: Re: ANother debugging Q



Gene Heskett wrote:
> Unforch, that seems to shut down the opening of the error advisory
> window. It just sits there showing a blank (data wise) screen. And
> extensive scrolling back thru about 5 megs of the output doesn't
> disclose a missing file that I can see. How would I go about
> redirecting that output to grep, it seems to bypass an
>
> "strace -f ksysguard|grep open"
>

Do "man strace" again :-)

Then see the -o option or the -e option.

(Or "man bash" and read about output redirection 2>&1 )

Regards,
Nuno Silva

2004-01-14 03:16:17

by Gene Heskett

[permalink] [raw]
Subject: Re: ANother debugging Q

On Tuesday 13 January 2004 20:01, Nuno Silva wrote:
>Gene Heskett wrote:
>> Unforch, that seems to shut down the opening of the error advisory
>> window. It just sits there showing a blank (data wise) screen.
>> And extensive scrolling back thru about 5 megs of the output
>> doesn't disclose a missing file that I can see. How would I go
>> about redirecting that output to grep, it seems to bypass an
>>
>> "strace -f ksysguard|grep open"
>
>Do "man strace" again :-)
>
>Then see the -o option or the -e option.
>
>(Or "man bash" and read about output redirection 2>&1 )
>
I did that last, almost automaticly, and got nothing, not even an
invocation of ksysguard. I think I should have. However in another
day or so I should have enough of kde-3.2-beta built to switch and
see if that works.

However, this finally spit out something, but I don't know what to do
about it:
----------------------
[root@coyote usr]# strace -f -e trace=network ksysguard
[pid 23529] socket(PF_UNIX, SOCK_STREAM, 0) = 3
[pid 23529] connect(3, {sin_family=AF_UNIX, path="/tmp/.X11-unix/X0"},
19) = 0
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0".
[pid 23529] socket(PF_UNIX, SOCK_STREAM, 0) = 5
[pid 23529] connect(5, {sin_family=AF_UNIX,
path="/tmp/.ICE-unix/1367"}, 21) = 0
[pid 23529] socket(PF_UNIX, SOCK_STREAM, 0) = 10
[pid 23529] connect(10, {sin_family=AF_UNIX,
path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file
or directory)
[pid 23529] socket(PF_UNIX, SOCK_STREAM, 0) = 10
[pid 23529] connect(10, {sin_family=AF_UNIX,
path="/tmp/.ICE-unix/dcop1326-1073910398"}, 37) = 0
[pid 23529] getsockopt(10, SOL_SOCKET, SO_PEERCRED, [1326], [12]) = 0
socketpair(PF_UNIX, SOCK_STREAM, 0, [4, 11]) = 0
socketpair(PF_UNIX, SOCK_STREAM, 0, [12, 13]) = 0
socketpair(PF_UNIX, SOCK_STREAM, 0, [14, 15]) = 0
[pid 23530] setsockopt(13, SOL_SOCKET, SO_LINGER, [0], 8) = 0
[pid 23530] setsockopt(15, SOL_SOCKET, SO_LINGER, [0], 8) = 0
[pid 23530] getpeername(0, {sin_family=AF_UNIX, path="??/"}, [2]) = 0
[pid 23532] socket(PF_UNIX, SOCK_STREAM, 0) = 3
[pid 23532] connect(3, {sin_family=AF_UNIX,
path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file
or directory)
[pid 23534] socket(PF_UNIX, SOCK_STREAM, 0) = 3
[pid 23534] connect(3, {sin_family=AF_UNIX,
path="/var/run/.nscd_socket"}, 110) = -1 ENOENT (No such file
or directory)
--- SIGPIPE (Broken pipe) ---
[root@coyote usr]#
-------------------
I closed the ksysguard window, which made the broken pipe.
AFAIK, nscd is not running, and hasn't in years, I'm using a hosts
file on this teeny network.

Also, changing it to look at opens, libsensors.so.1 failed, but it
hasn't existed since lm_sensors-2.7.0 was fresh. Thats at least
collecting social security by now. I have lots of libsensors.so.3's
though :)

>Regards,
>Nuno Silva

--
Cheers & thanks Nuno, Gene
"There are four boxes to be used in defense of liberty: soap,
ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.22% setiathome rank, not too shabby for a WV hillbilly
Yahoo.com attornies please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.