Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault with PyOpenCL 2011.2 on OS X 10.6.8 #46

Closed
praus opened this issue Feb 8, 2012 · 2 comments
Closed

Segfault with PyOpenCL 2011.2 on OS X 10.6.8 #46

praus opened this issue Feb 8, 2012 · 2 comments

Comments

@praus
Copy link

praus commented Feb 8, 2012

Hello, I'm trying to use poclbm (most recent one from master) for GPU mining on Mac OS X 10.6.8 with HD 5750. I've everything setup correctly, pyopencl is installed using pip and CPU mining works. However when I choose GPU as a mining device I get a segfault. The segfault is caused by a build issue with the kernel file for SHA computation.

I traced the problem to the following line in BitcoinMiner.py:
self.miner = cl.Program(self.context, kernel).build(self.defines)

I also checked with the most recent development version of PyOpenCL from their Git repository and the issue persists. Is there something I can do? I thought about trying to swap the phatk kernel for something different but I haven't explored further yet.

Thanks

Here's a stack trace from gdb:

#1  0x00000001132263d8 in glrCompLoadBinary ()
#2  0x00000001132264db in glrCompLoadBinary ()
#3  0x0000000113226692 in glrCompBuildProgram ()
#4  0x00007fff85027175 in clBuildProgram ()
#5  0x00000001015ff736 in pyopencl::program::build ()
#6  0x00000001015ead40 in pyopenclboost::python::objects::caller_py_function_impl<pyopenclboost::python::detail::caller<void (pyopencl::program::*)(std::string, pyopenclboost::python::api::object), pyopenclboost::python::default_call_policies, pyopenclboost::mpl::vector4<void, pyopencl::program&, std::string, pyopenclboost::python::api::object> > >::operator() ()
#7  0x000000010163aa6a in pyopenclboost::python::objects::function::call ()
#8  0x000000010163ae00 in pyopenclboost::detail::function::void_function_ref_invoker0<pyopenclboost::python::objects::(anonymous namespace)::bind_return, void>::invoke ()
#9  0x0000000101649be1 in pyopenclboost::python::detail::exception_handler::operator() ()
#10 0x0000000101622d02 in pyopenclboost::detail::function::function_obj_invoker2<pyopenclboost::_bi::bind_t<bool, pyopenclboost::python::detail::translate_exception<pyopencl::error, void (*)(pyopencl::error const&)>, pyopenclboost::_bi::list3pyopenclboost::arg<1, pyopenclboost::arg<2>, pyopenclboost::_bi::value<void (*)(pyopencl::error const&)> > >, bool, pyopenclboost::python::detail::exception_handler const&, pyopenclboost::function0<void> const&>::invoke ()
#11 0x000000010164981b in pyopenclboost::python::handle_exception_impl ()
#12 0x00000001016379ce in function_call ()
#13 0x000000010000c122 in PyObject_Call ()
#14 0x00000001000c279a in PyEval_EvalFrameEx ()
#15 0x00000001000c66f6 in PyEval_EvalCodeEx ()
#16 0x00000001000c46d3 in PyEval_EvalFrameEx ()
#17 0x00000001000c66f6 in PyEval_EvalCodeEx ()
#18 0x00000001000c46d3 in PyEval_EvalFrameEx ()
#19 0x00000001000c66f6 in PyEval_EvalCodeEx ()
#20 0x00000001000c46d3 in PyEval_EvalFrameEx ()
#21 0x00000001000c66f6 in PyEval_EvalCodeEx ()
#22 0x00000001000c46d3 in PyEval_EvalFrameEx ()
#23 0x00000001000c5d90 in PyEval_EvalFrameEx ()
#24 0x00000001000c66f6 in PyEval_EvalCodeEx ()
#25 0x000000010003d440 in function_call ()
#26 0x000000010000c122 in PyObject_Call ()
#27 0x00000001000c0ebf in PyEval_EvalFrameEx ()
#28 0x00000001000c5d90 in PyEval_EvalFrameEx ()
#29 0x00000001000c5d90 in PyEval_EvalFrameEx ()
#30 0x00000001000c66f6 in PyEval_EvalCodeEx ()
#31 0x000000010003d440 in function_call ()
#32 0x000000010000c122 in PyObject_Call ()
#33 0x000000010001d60d in instancemethod_call ()
#34 0x000000010000c122 in PyObject_Call ()
#35 0x00000001000be0b7 in PyEval_CallObjectWithKeywords ()
#36 0x00000001001048d3 in t_bootstrap ()
#37 0x00007fff83c02fd6 in _pthread_start ()
#38 0x00007fff83c02e89 in thread_start ()```
@praus
Copy link
Author

praus commented Feb 9, 2012

By the way, I also tried replacing the kernel in current version of poclbm with the kernel from cgminer. That actually compiled after I defined WORKSIZE param but (obviously?) failed on the number of arguments for the search function (21 vs. 24).

@praus
Copy link
Author

praus commented Feb 20, 2012

This issue has been resolved for me by upgrading to 10.7 (10.7.3 to be precise).

@praus praus closed this as completed Feb 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant