luke-jr / bfgminer

Modular ASIC/FPGA miner written in C, featuring overclocking, monitoring, fan speed control and remote interface capabilities.
http://luke.dashjr.org/programs/bitcoin/files/bfgminer/
Other
1.84k stars 813 forks source link

Segfault on MAC OSX 10.8 with BPMC BF1 #300

Closed TrooperT closed 11 years ago

TrooperT commented 11 years ago

screen shot 2013-10-10 at 12 32 14 pm compiled from git source using nwools brew script with --HEAD.

command run: bfgminer --config ~/bfgminer.conf -S bigpic:/dev/cu.usbmodem1d11431 -D 2>debug.log

log available at: https://gist.github.com/Taugeran/6921416

luke-jr commented 11 years ago

Can you get a backtrace?

TrooperT commented 11 years ago

if i knew how yes. im going to try it by itself with no BES attached b/c i can get it to run on a linux box by itself with the same code

TrooperT commented 11 years ago

update: still does it while the only mining device on the system macOSX

luke-jr commented 11 years ago
gdb --args <bfgminer command>
run
(wait for it to crash)
bt
thr app all bt
TrooperT commented 11 years ago

https://gist.github.com/Taugeran/6923335

login to thr app all bt

luke-jr commented 11 years ago

Seems to be missing quite a bit, including the crash info itself? :/

TrooperT commented 11 years ago

thats all that it printed to screen following your instructions.

if it doesnt work on mac im not bothered. ive got an rPI just sitting around that can run it ^_^

luke-jr commented 11 years ago

I don't even see where you typed the 'thr app all bt' command, so something went wrong making the log I think :/

TrooperT commented 11 years ago

Ill redo it after work

On Oct 10, 2013, at 3:22 PM, Luke-Jr notifications@github.com wrote:

I don't even see where you typed the 'thr app all bt' command, so something went wrong making the log I think :/

— Reply to this email directly or view it on GitHub.

luke-jr commented 11 years ago

Maybe with --text-only will work better

TrooperT commented 11 years ago

Bfgminer --text-only

That?

Sam Johnson P: 937.825.6346 E: Samuel.Johnson.Bungie@Gmail.com

On Oct 10, 2013, at 5:14 PM, Luke-Jr notifications@github.com wrote:

Maybe with --text-only will work better

— Reply to this email directly or view it on GitHub.

luke-jr commented 11 years ago

Right, with the same gdb setup as before.

TrooperT commented 11 years ago

http://imgur.com/a/Kp8YF

album of screens after each command looks about the same

luke-jr commented 11 years ago

Is it possible to rebuild with debug symbols, and meet me on IRC to interactively debug it?

luke-jr commented 11 years ago

@Taugeran I have a unit to test with myself, and am unable to reproduce (on Linux). Can you try with debug symbols? :/

TrooperT commented 11 years ago

that would be

CFLAGS="-g -O3" ./configure .....

?

luke-jr commented 11 years ago

./configure ... CFLAGS='-O0 -ggdb'

TrooperT commented 11 years ago

brewed with the command: brew install -vd --env=std bfgminer --HEAD

got more from the app all bt this time:

https://gist.github.com/Taugeran/7148480

nwoolls commented 11 years ago

You can download the Homebrew script for bfgminer here: https://raw.github.com/nwoolls/homebrew-xgminer/master/bfgminer.rb

Just save that file locally. Then you can edit it with any text editor, e.g. TextEdit. There is a block in there that includes the ./configure arguments. Add the one that Luke is suggesting and save the changes.

After that you can install your local copy of the Homebrew formula by doing:

brew install ~/path/to/bfgminer.rb
TrooperT commented 11 years ago

thats actually how ive been compiling it.

in the install block I've added:

ENV['CFLAGS']="-ggdb -O0"

but without --env=std while brew installing, it strips those flags :/... as far as i can tell from the verbose output

luke-jr commented 11 years ago

@Taugeran Even with your --env=std, you've failed to produce results with debugging symbols :(

TrooperT commented 11 years ago

alas apple has failed me :/ no worries. if its ok ill close this since im sure only a microscopic fraction of people mine with asics on a mac. if they have asics they're probably going for efficiency ( hint: not a mac).

and besides ive got em running on an rpi

but if its anything to you i have something in the works for you :)

luke-jr commented 11 years ago

If you get time, I'd still like to fix this some day :)

TrooperT commented 11 years ago

will keep it in mind :)

nwoolls commented 11 years ago

If you are unable to get Homebrew to pass in the proper flags you could also try using the shell scripts here to build bfgminer with those flags:

https://github.com/nwoolls/xgminer-osx

There are instructions. You'll need to edit the build_miner.sh script to add set the CFLAGS argument.

TrooperT commented 11 years ago

cool deal. will give her a try. and if all else. its mac and asics. not a smart plan for power efficiency anyway (85W laptop yada yada ...)

TrooperT commented 11 years ago

we found it. we found it!!! thank you nwoolls for the tip on xgminer-osx. it was the saviours grace. the whole problem was 3 lines of timing code in driver-bigpic.c :S

nwoolls commented 11 years ago

Glad to hear it @Taugeran

TrooperT commented 11 years ago

edit: those 3 lines shouldn't have even been there regardless of OS. ljr was surprised this wasn't showing up on windows or generic linux

TrooperT commented 11 years ago

closing issue :)

luke-jr commented 11 years ago

For reference, fixed in efe47d5