Opened 9 years ago

Closed 8 years ago

#4869 closed Bug (incomplete)

Segmentation fault in funciton malloc of libc

Reported by: jianmeng Owned by:
Priority: Normal Milestone: None Set
Component: Transmission Version: 2.51
Severity: Normal Keywords: SIGSEGV malloc
Cc:

Description

I meet a strange Segmentation fault using manually compile version transmission-daemon from svn.

In my torrents home directory (~/.config/transmission-daemon/torrents),there are several torrents here. After I run the transmission-daemon command in shell,it crash. But when I put only one torrents file in that directory, it run normally.

my linux version is Linux 3.0.0-17-generic-pae #30-Ubuntu SMP Thu Mar 8 17:53:35 UTC 2012 i686 i686 i386 GNU/Linux.

GDB output is in here: http://pastebin.com/gxwVEuRe

x-valgrind file is in here: http://pastebin.com/wG6zFunh

I guess probable reasons is using malloc in multi-threads which cause a internal state error of function malloc. So I add a lock to tr_malloc function in libtransmission directory, and using set event_set_mem_functions method of libevent to set new with-lock version tr_malloc. Here is my svn diff: http://pastebin.com/fFdxQH70

But after compile code I still got same malloc error.

So help.

Change History (4)

comment:1 Changed 9 years ago by x190

Don't know if this is relevant or not, but I have run Transmission (Mac Client) in Xcode->Instruments->Leaks before and the "makeroom" function does sometimes show up as a leak. Also, "malloc", when attaching to the process.

Quote from your Valgrind report:

"==4925== by 0x804DECB: makeroom (bencode.c:176)"

comment:2 Changed 9 years ago by jianmeng

And here is after my hack version gdb output: http://pastebin.com/X9AQAE3j

tr_malloc code has already changed, but problem still occurs.

comment:3 Changed 8 years ago by jordan

Is this still an issue in Transmission 2.75?

comment:4 Changed 8 years ago by jordan

  • Resolution set to incomplete
  • Status changed from new to closed

If this is still happening in newer versions of Transmission, please set this ticket's resolution to "New" and answer these questions:

  • Is this reproducible?
  • If so, what specific steps should we take to recreate this bug?

This will help us to find and resolve the problem. Thanks again for reporting this bug and helping to make Transmission better.

Note: See TracTickets for help on using tickets.