Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OT: Linux problem

2 views
Skip to first unread message

jacob navia

unread,
Mar 29, 2010, 5:17:22 AM3/29/10
to
I have a problem:
I need to figure out why a program is crashing under linux 64 bits.

I need a utility like Dr Watson under windows that would allow me to see
a stak trace and a register dump. Is there a&nything like that under linux?

Thanks

Igmar Palsenberg

unread,
Mar 29, 2010, 5:42:37 AM3/29/10
to

Use GDB


Igmar

jacob navia

unread,
Mar 29, 2010, 7:08:23 AM3/29/10
to
Igmar Palsenberg a écrit :

No I can't. There is no debugger. I just want something that will write a
stack trace and register dump to a log file at the customer site...

I know gdb but this is not possible.

Thanks anyway

jacob

Ben Bacarisse

unread,
Mar 29, 2010, 7:42:08 AM3/29/10
to
jacob navia <ja...@nospam.org> writes:

> Igmar Palsenberg a écrit :
>> On 3/29/10 11:17 AM, jacob navia wrote:

<snip>


>>> I need a utility like Dr Watson under windows that would allow me to see
>>> a stak trace and a register dump. Is there a&nything like that
>>> under linux?
>>
>> Use GDB
>

> No I can't. There is no debugger. I just want something that will write a
> stack trace and register dump to a log file at the customer site...

You really need to ask in a Unix/Linux group. You must have a
peculiar situation if there is no gdb and that will need specialist
advice. Remember to give as much detail as you can.

--
Ben.

Rob Kendrick

unread,
Mar 29, 2010, 8:07:23 AM3/29/10
to
On Mon, 29 Mar 2010 13:08:23 +0200
jacob navia <ja...@nospam.org> wrote:

> No I can't. There is no debugger. I just want something that will
> write a stack trace and register dump to a log file at the customer
> site...

If it's a matter of not wanting to explain to the customer how to drive
GDB over the 'phone, then perhaps valgrind would be a better option?
(As it essentially requires no human to drive, and just dumps out a
report.)

B.

jacob navia

unread,
Mar 29, 2010, 8:45:49 AM3/29/10
to
Rob Kendrick a écrit :

> On Mon, 29 Mar 2010 13:08:23 +0200
> jacob navia <ja...@nospam.org> wrote:
>
>> No I can't. There is no debugger. I just want something that will
>> write a stack trace and register dump to a log file at the customer
>> site...
>
> If it's a matter of not wanting to explain to the customer how to drive
> GDB over the 'phone,

Customer (C): Your DAMMED programmed crashed AGAIN you MORON!
Jacob(j): Gulp... Sorry Sir, I can't explain it, I tested and tested.
Please can you open a command line?
C: A what?
j: A command line. You go into Applications, then Utilities and then
command line.
C: I can't see any "applications" I just see: "login".
j: Ah of course. Then you just write: root/password.
C: Now I see a black screen with a pound sign.
j: OK. Now you type:
cd /home/database/applications/start
C: It says -bash: /home is a directory
j: What? Ah OK. Do not put a space between the /home and the
directory word.

etc... etc... etc

Imagine explaining gdb to them. Besides, there is no core
file and gdb would be completely useless after the program
has exited.

> then perhaps valgrind would be a better option?
> (As it essentially requires no human to drive, and just dumps out a
> report.)

But it would affect performance isn't it?

I mean, my application doesn't crash all the time.

Thanks for your help.

jacob

Tom St Denis

unread,
Mar 29, 2010, 8:51:35 AM3/29/10
to

If you're linking against glibc you can get a backtrace with the
backtrace() functionm, just call it from a signal handler for SIGSEGV.

Tom

Ben Bacarisse

unread,
Mar 29, 2010, 9:53:44 AM3/29/10
to
jacob navia <ja...@nospam.org> writes:

> Rob Kendrick a écrit :
>> On Mon, 29 Mar 2010 13:08:23 +0200
>> jacob navia <ja...@nospam.org> wrote:
>>
>>> No I can't. There is no debugger. I just want something that will
>>> write a stack trace and register dump to a log file at the customer
>>> site...
>>
>> If it's a matter of not wanting to explain to the customer how to drive
>> GDB over the 'phone,
>
> Customer (C): Your DAMMED programmed crashed AGAIN you MORON!
> Jacob(j): Gulp... Sorry Sir, I can't explain it, I tested and tested.
> Please can you open a command line?
> C: A what?
> j: A command line. You go into Applications, then Utilities and then
> command line.
> C: I can't see any "applications" I just see: "login".
> j: Ah of course. Then you just write: root/password.
> C: Now I see a black screen with a pound sign.
> j: OK. Now you type:
> cd /home/database/applications/start
> C: It says -bash: /home is a directory
> j: What? Ah OK. Do not put a space between the /home and the
> directory word.

Obviously that's not how one should do support. Why not ask in a
group where people will be able to discuss all the options that are
available to you? Remember to tell people there what constraints you
are working under along with as much as possible about the target
environment.

<snip>
--
Ben.

Branimir Maksimovic

unread,
Mar 29, 2010, 12:36:55 PM3/29/10
to
On Mon, 29 Mar 2010 14:45:49 +0200
jacob navia <ja...@nospam.org> wrote:

>
> Imagine explaining gdb to them. Besides, there is no core
> file and gdb would be completely useless after the program
> has exited.

Well you can enable core file , with setrlimit (RLIMIT_CORE).
If you can examine logs on user machine, then you can download
core file and examine in your machine with gdb, too.
Core file is far better anyway than plain log,
as you can debug program and examine situation.
Of course don't forget to compile with debug info (-g option)
so you can trace with source code, not just function names.

Greets!


--
http://maxa.homedns.org/

Sometimes online sometimes not


Mark Bluemel

unread,
Mar 29, 2010, 12:43:58 PM3/29/10
to

Why not ask in a newsgroup where you don't believe it to be OT, such
as comp.unix.programmer?

You might want to tell them a) what you mean by "crashing" and b) why
you don't get a core file that can be examined.

(see http://www.catb.org/~esr/faqs/smart-questions.html)

Seebs

unread,
Mar 29, 2010, 1:47:21 PM3/29/10
to
On 2010-03-29, jacob navia <ja...@nospam.org> wrote:
> No I can't. There is no debugger. I just want something that will write a
> stack trace and register dump to a log file at the customer site...
>
> I know gdb but this is not possible.

There's code in glibc to do a little bit of this, but a register dump really
MUST be done by some other program.

Anyway, what you probably *really* want is a core file. A lot of modern
Linux systems turn off coredumps by default, but if you turn them back on,
you get a file which has not only stack and registers, but the complete
memory image of the executable, allowing you to use gdb at your leisure
to explore the various stack frames.

-s
--
Copyright 2010, all wrongs reversed. Peter Seebach / usenet...@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!

Noob

unread,
Mar 30, 2010, 4:20:33 AM3/30/10
to
Mark Bluemel wrote:

> Why not ask in a newsgroup where you don't believe it to be OT, such
> as comp.unix.programmer?

Because he would very much rather pollute this news group.

Kenneth Brody

unread,
Apr 2, 2010, 4:27:31 PM4/2/10
to

Depending on the particular flavor of Linux, you should have one or more of:

adb, sdb, gdb, dbx, debug

(No significance to the order other than that's what has been burned into
ROM in my brain.)

Type the command "type adb sdb gdb dbx debug" and see which ones give you a
path to the executable rather than "not found".

My preference du jour is "debug", followed by "gdb".

--
Kenneth Brody

Adam Risi

unread,
Apr 3, 2010, 5:01:57 PM4/3/10
to

IMHO, valgrind is great for this kind of problem - if you can, compile
your code with debugging symbols for even better results

Tim Rentsch

unread,
Apr 6, 2010, 3:47:40 AM4/6/10
to
Please excuse this non-C related query. My source for NNTP
service has decided to drop it (and recommended me to web-based
news reading - HAH!), so I am looking for suggestions and/or
recommendations for someplace where I can read/post news.
My search parameters are as follows. (1) Reliable, available.
(2) No cost would be nice, but if not no cost then low or
at least reasonable. (3) In case it matters, I read news
using gnus in gnu emacs.

My thanks and much appreciation for any suggestions. Email
can be sent to me at the above address (txr AT alumni.caltech.edu).
I will be able to read c.l.c for a time in case someone
can't easily send email or prefers to post to the newsgroup
(please remember to include the "OT" in the Subject: line).

Default User

unread,
Apr 6, 2010, 2:23:34 PM4/6/10
to

"Tim Rentsch" <t...@alumni.caltech.edu> wrote in message
news:kfnpr2d...@x-alumni2.alumni.caltech.edu...

> Please excuse this non-C related query. My source for NNTP
> service has decided to drop it (and recommended me to web-based
> news reading - HAH!), so I am looking for suggestions and/or
> recommendations for someplace where I can read/post news.
> My search parameters are as follows. (1) Reliable, available.
> (2) No cost would be nice, but if not no cost then low or
> at least reasonable. (3) In case it matters, I read news
> using gnus in gnu emacs.

For text-only access, reasonable free options are <http://www.aioe.org> and
http://www.eternal-september.org/
A good, low-cost solution is http://news.individual.net

If you need binary access, look into block accounts. You purchase a chunk of
bandwidth and use it up at your own rate.

Brian


Tim Rentsch

unread,
Apr 7, 2010, 2:47:57 AM4/7/10
to
"Default User" <defaul...@yahoo.com> writes:

My thanks and appreciation to everyone who replied (most
did by email). I'm still on my old service but the
cutoff date for that is April 7 (ie, today in most parts
of the world, including here soon). Now for trying to
get a new service working....

Seebs

unread,
Apr 11, 2010, 11:05:18 PM4/11/10
to
On 2010-04-06, Default User <defaul...@yahoo.com> wrote:
> For text-only access, reasonable free options are <http://www.aioe.org> and
> http://www.eternal-september.org/

aioe.org is the host of the troll posting the "seebs/schildt" messages. A
bit of research turns up general suspicions that this is not a good choice
for news servers -- because the troll picked them for a good reason.

Basically, their policy comes down to "you can pursue your vendetta here
for free and with total anonymity", so the rational thing to do is probably
to ignore anything from them -- making it a bad choice for people whose goals
include participation in topical discussions.

One of the big problems you face picking a news server is that you
want something that deals with outbound abuse, rather than only filtering
incoming abuse. Otherwise, your messages will tend to get lost. It looks
like, at this point, aioe.org is best if you have a need to maintain total
anonymity, but otherwise not so great. Use it to post harassment, don't
use it to post topical discussion on technical topics.

Phil Carmody

unread,
Apr 12, 2010, 2:37:24 AM4/12/10
to
Seebs <usenet...@seebs.net> writes:
> On 2010-04-06, Default User <defaul...@yahoo.com> wrote:
>> For text-only access, reasonable free options are <http://www.aioe.org> and
>> http://www.eternal-september.org/
>
> aioe.org is the host of the troll posting the "seebs/schildt" messages. A
> bit of research turns up general suspicions that this is not a good choice
> for news servers -- because the troll picked them for a good reason.

Any time I see idiocy on usenet, one of the first things that goes
through my mind is that it's just another aioe idiot. So much so
that kooks, cranks, and trolls from there now have a blanket ban
in some of the newsgroups I read:
~/News/rec.autos.sport.f1.SCORE:5: ("aioe.org!not-for-mail" -1000 nil s)
~/News/sci.crypt.SCORE:138: ("user.aioe.org" -1000 nil s)
~/sci.math.SCORE:342: ("X-Complaints-To: ab...@aioe.org" -1000 nil s)
(I'm surprised it not more than just 3 groups, to be honest!)

> Basically, their policy comes down to "you can pursue your vendetta here
> for free and with total anonymity", so the rational thing to do is probably
> to ignore anything from them -- making it a bad choice for people whose goals
> include participation in topical discussions.

It's not total anonymity any more, it's pseudonymity, as they do
have a consistent identification for each account that can be kill-
filed or reported for abuse purposes. However, there's little to
stop trolls registering a steady stream of such accounts. I've not
been tempted to remove aioe from any of the killfiles, shall we say.

Phil
--
I find the easiest thing to do is to k/f myself and just troll away
-- David Melville on r.a.s.f1

Nick Keighley

unread,
Apr 12, 2010, 3:28:25 AM4/12/10
to
On 29 Mar, 13:45, jacob navia <ja...@nospam.org> wrote:
> Rob Kendrick a écrit :
> > On Mon, 29 Mar 2010 13:08:23 +0200
> > jacob navia <ja...@nospam.org> wrote:

[program crashed on customer site- suggestion: use gdb]

> >> No I can't. There is no debugger. I just want something that will
> >> write a stack trace and register dump to a log file at the customer
> >> site...
>
> > If it's a matter of not wanting to explain to the customer how to drive
> > GDB over the 'phone,

this kind of blows Richard <always use a debugger>'s argument out of
the water. This is one of the classic instances where a decent log
file would be massivly helpful.

I really do feel for you, no matter how much you testing you do the
real world can ambush you.

This is also why I leave the assert()s in...

can the customer email the core dump to you?


> Customer (C): Your DAMMED programmed crashed AGAIN you MORON!
> Jacob(j): Gulp... Sorry Sir, I can't explain it, I tested and tested.
>           Please can you open a command line?
> C: A what?
> j: A command line. You go into Applications, then Utilities and then
>     command line.
> C: I can't see any "applications" I just see: "login".
> j: Ah of course. Then you just write: root/password.
> C: Now I see a black screen with a pound sign.
> j: OK. Now you type:
>     cd /home/database/applications/start
> C: It says -bash: /home is a directory
> j: What? Ah OK. Do not put a space between the /home and the
>     directory word.
>
> etc... etc... etc
>
> Imagine explaining gdb to them.

:-)

I've done things like this. Fun isn't it?


> Besides, there is no core file

so enable core files

> and gdb would be completely useless after the program
> has exited.
>
> > then perhaps valgrind would be a better option?
> > (As it essentially requires no human to drive, and just dumps out a
> > report.)
>
> But it would affect performance isn't it?
>
> I mean, my application doesn't crash all the time.

richard <no-name>: what would you do?

Robert Miles

unread,
May 2, 2010, 6:22:26 AM5/2/10
to
"Tim Rentsch" <t...@alumni.caltech.edu> wrote in message
news:kfnpr2d...@x-alumni2.alumni.caltech.edu...


Cheap but reliable, with most of the spam filtered out. No binaries.

http://www.news.individual.net/

Cheap among providers offering binaries.

http://www.teranews.com/
https://secure.usenetbilling.com/newbilling/manageaccount.cgi?referredby=1215986668&action=Create+New+Account&vendor=teranews


Free but not especially reliable

http://www.aioe.org/

Free, reported as rather reliable:

http://www.eternal-september.org/

Is that enough?

I'm not familiar with gnus.

Robert Miles


0 new messages