Keep getting Segmentation fault (core dumped)

General support for problems installing or using Deluge
daddy
Seeder
Seeder
Posts: 100
Joined: Sun Jul 22, 2007 12:14 am

Re: Keep getting Segmentation fault (core dumped)

Post by daddy »

By the way, if any devs are reading this, try running deluge with electric fence. On my box I've never been able to get the interface to show before a segfault. Should help you find a lot of these problems you blame on unclean build environments.
shirish
Seeder
Seeder
Posts: 163
Joined: Fri May 25, 2007 4:01 am
Location: South Asia, India

Re: Keep getting Segmentation fault (core dumped)

Post by shirish »

Daddy,
Another user here, dunno anything about electric fence, but if you make a detailed post how to do stuff with it, then maybe we can give the devs. some usable reports to do stuff.
Debian Sid, Intel Dual-Core, 512 kbps DL , 64 Kbps UL, deluge-1.3.5, pieces plugin, GNOME 3.4.x

All posts under creative commons http://creativecommons.org/licenses/by-nc/3.0/
daddy
Seeder
Seeder
Posts: 100
Joined: Sun Jul 22, 2007 12:14 am

Re: Keep getting Segmentation fault (core dumped)

Post by daddy »

Well, I can't really add anything to `man 3 efence`, so here are the juicy parts:
Electric Fence uses the virtual memory hardware of your computer to place an inaccessible memory page immediately after (or before, at the user's option) each memory allocation. When software reads or writes this inaccessible page, the hardware issues a segmentation fault, stopping the program at the offending instruction. It is then trivial to find the erroneous statement using your favorite debugger. In a similar manner, memory that has been released by free() is made inaccessible, and any code that touches it will get a segmentation fault.

...

Link your program with the library libefence.a . Make sure you are not linking with -lmalloc, -lmallocdebug, or with other malloc-debugger or malloc-enhancer libraries. You can only use one at a time. If your system administrator has installed Electric Fence for public use, you'll be able to use the -lefence argument to the linker, otherwise you'll have to put the path-name for libefence.a in the linker's command line. You can also use dynamic linking. If you're using a Bourne shell, the statement export LD_PRELOAD=libefence.so.0.0 will cause Electric Fence to be loaded to run all dynamic executables. The command ef command runs a single command under Electric Fence.
So, basically, after you install it (electric-fence on debian/ubuntu), start up GDB with `gdb -args python /usr/bin/deluge`, when the (gdb) prompt appears type 'set env LD_PRELOAD=libefence.so' (without the quotes, obviously), then 'run'. wait for the SIGSEGV (you won't have to wait long, trust me), and... well, I'm not going to write a GDB tutorial here, but at the very least get friendly with the 'bt' command.

Obviously, you should enable debugging symbols in your deluge compile (the -g flag to gcc/g++), and it would probably help to install a -dbg package or two (e.g., python's).
Anubis

Re: Keep getting Segmentation fault (core dumped)

Post by Anubis »

I also confirm that after deleting the preferences (~/.config/deluge) folder, starting Deluge, enabling UPnP, closing and attempting to restart does give me a segmentation fault.

Using the 0.5.4.1 Deluge .deb package supplied on the front page with Ubuntu Feisty

No plugins. Nothing.

No option except UPnP is changed.

Its a fresh install.
Post Reply