help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can reproduce the crash systematically.


From: Hans Deragon
Subject: Can reproduce the crash systematically.
Date: Tue, 23 Sep 2003 16:23:07 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030905

Greetings.


Me again. I found a way to systematically reproduce the crash. I simply need to ¨rm -f /var/cfengine/cf*¨ (deleting the berkeley database of cfengine) and rerun cfagent.

I found out that when it crashed, it left some locks dangling. Thus, the next time I ran cfagent, it would not crash because of the already existing lock (which explains the ¨already running!¨ errors I was having and the fact that cfagent would simply not execute how I would expect) and bypass the code that would cause the program to crash.

So, now I am at the stage of running gdb to figure out where it crashes. By running strace on it, I notice it crashes everytime at the same place.

Unfortunatly, I am not a C programmer (Java, Python yes, but I haven't touch C for more than 4 years now). Thus, I do not remember how to use gdb. I read some manuals and tutorials and got the following backtrace just after the crash:

(gdb) backtrace
#0  0x0805fbfc in ?? ()
#1  0x080691dc in ?? ()
#2  0x08068212 in ?? ()
#3  0x08053300 in ?? ()
#4  0x0804d1ea in ?? ()
#5  0x0804af21 in ?? ()
#6  0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6

As you see, it is not very usefull. By default, cfengine does compile with ¨-g -O2¨ option, so the symbols should be in the executable. Yet, they do not show.

  BTW, I tried to reconfigure cfengine to compile with ¨-g¨ only, using:

     export CFLAGS=-g
     configure

...as instructed by ¨configure --help¨, but it does not work, i.e. -O2 still show up on the gcc command line (and I noticed to that there are multiple -g commands on the gcc command line). It would be nice if when one follows the instructions, the requested compilation flags would be taken into account.

  Anyhow, anybody can suggest how to get the symbols to show up in gdb?


Best regards,
Hans Deragon
--
Consultant en informatique/Software Consultant
Deragon Informatique inc.         Open source:
http://www.deragon.biz            http://swtmvcwrapper.sourceforge.net
mailto://hans@deragon.biz         http://autopoweroff.sourceforge.net






reply via email to

[Prev in Thread] Current Thread [Next in Thread]