Illegal operation exception in lock-free Stack

12 views
Skip to first unread message

Pranay Prabhakar

unread,
Dec 11, 2010, 6:21:07 PM12/11/10
to coms49...@googlegroups.com, kks...@columbia.edu

I have implemented my version of the lock-free Stack. However, on
calling either push or pop operation I get the following error:

x10.lang.IllegalOperationException: illegal operation exception
x10.lang.IllegalOperationException: illegal operation exception
at x10::lang::Throwable::fillInStackTrace()
at x10::lang::Activity::ensureNotInAtomic()
at x10::lang::Runtime::ensureNotInAtomic()
at x10::lang::Latch::await()
at x10::lang::Runtime__RootFinish::waitForFinish(bool)
at
x10::lang::Runtime::start(x10aux::ref<x10::lang::VoidFun_0_0>,
x10aux::ref<x10::lang::VoidFun_0_0>)
at int x10aux::template_main<x10::lang::Runtime, Stack>(int, char**)
at __libc_start_main
at std::ios_base::Init::~Init()

The implementation is on the lines of lock-free Queue given in the
notes. Any ideas as to what I should be looking for to debug this?


Thanks,
Pranay


Yoav Zibin

unread,
Dec 11, 2010, 6:36:26 PM12/11/10
to coms49...@googlegroups.com, kks...@columbia.edu
yes, inside an atomic section some operations are not allowed:
wait, at , async
(because atomic sections should be as small as possible).

Pranay Prabhakar

unread,
Dec 11, 2010, 6:41:57 PM12/11/10
to coms49...@googlegroups.com, Yoav Zibin, kks...@columbia.edu

I have no atomic block which has wait, at or async.
Pranay
Reply all
Reply to author
Forward
0 new messages