swarm-support
[Top][All Lists]
Advanced

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

Ever use electric fence with Swarm?


From: pauljohn
Subject: Ever use electric fence with Swarm?
Date: Wed, 13 Jun 2001 10:57:17 -0500

Dear everybody:
I'm trying to pin down a dynamically allocated memory error.  It is a
bad one because it only seg faults on MS Windows, for selected
parameter/seed values, and never (yet) on Linux, so it is hard to pin
down.

I Installed the bounds-checking package ElectricFence to see what it
finds.
I read the man page :)

I linked in EF with
$ make EXTRALDFLAGS=-lefence

(One might, instead, do this in the environment 
$ export LD_PRELOAD=libefence.so.0.0
and then run gdb without recompiling)

I found swarm archive email from Steve Emsley and Marcus Daniels who in
1998 figured out it is necessary to set this to make EF run on linux,
$ export EF_ALIGNMENT=8

otherwise you get this error:
$ gdb .libs/rb
(gdb) run
Starting program:
/home/pauljohn/swarm/WorkingExampleCode/objc/modReb-2001-05-06-dumper/.libs/rb
--run=9993 -e0 -w1 -d1 -a.25 -j.25 -c8 -q16 -n1000 -S8804 -p50 -r7
[New Thread 1024 (LWP 12572)]

  Electric Fence 2.2.0 Copyright (C) 1987-1999 Bruce Perens
<address@hidden>
Double word alignment of malloc allocations not guaranteed
on local machine architecture.
Please report to address@hidden
Standard fixup taken, execution continuing...

ElectricFence Aborting: free(44ba5fe8): address not from malloc().

Program received signal SIGILL, Illegal instruction.
[Switching to Thread 1024 (LWP 12572)]
0x406c4801 in __kill () from /lib/i686/libc.so.6


I've run heatbugs under gdb with EF enabled and, although it is slow, i
does run.

However, if I run my test application, then the swarm menus come up and
as soon as I hit the start button, the machine starts running but
apparently the number of agents is too great to ever show any progress.
The rasters never get illustrated or anything. Since the crash only
happens with lots of agents, I've got no alternative but to run it that
way, right? So, it looks to me like running this program under EF will
be a multi-day experience, and I want to ask a theoretical question
before I spend the time:

My program causes crashes only on Windows computers, not Linux, but I'm
hoping that if I do the bounds/memory checking on Linux, I will find the
overrun or underrun.  From study of the code, the problem is almost
certainly a dynamic memory usage error, such as attempting to read off
the end of a dynamically allocated array.  I hypothesize that there is
something more forgiving in a Linux environment than in Windows, so it
does not crash on Linux, but the problem must still exist on both
platforms since the code is the same. So perhaps EF under Linux will
find the overrun, even though it does not crash the system. 

Is this reasonable?
Possible?


-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

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