verement / cellminer

Bitcoin miner for the Cell Broadband Engine Architecture
GNU General Public License v2.0
79 stars 18 forks source link

Segmentation fault on spe_context_create() failure #3

Closed verement closed 11 years ago

verement commented 13 years ago

When spe_context_create() fails, for example if spufs is not mounted on /spu, rb_raise() is called within the Bitcoin::SPUMiner allocator function. However, during the subsequent process of creating a stack trace, Ruby will segfault.

verement commented 13 years ago

The trouble appears to stem from:

7 vm_backtrace_push (arg=0xf779fed8, file=272247168, line_no=136, name=0)

at vm.c:766

where vm.c:766 tries to reference RSTRING_PTR(name) and name is NULL.

At this point however I'm not sure whether this is a fault with my implementation or a fault with Ruby.

verement commented 13 years ago

Upgrading Ruby to version 1.9.2.180-5 of Debian's ruby1.9.1 package seems to have solved this, so I suspect it was in fact a bug in Ruby.

sulewski commented 13 years ago

I get segfault and I do have /spu mounted and I use ruby 1.9.2p180 with YDL.

http://pastebin.com/SHbc1Apu

Any idea? BTW running cellminer with -d switch doesn't provide any extra information.

verement commented 13 years ago

That looks to be a very different problem; it appears to be segfaulting within spe_program_load(). Could you open a different tracking issue for that, and include a build log as well as the segfault trace?

Thanks.