Skip to content

Cannot perform atomic access on ARMv7 #803

@ashitikov

Description

@ashitikov

Hello! I'm using RxJava, the problem is on ARMv7 devices (iPod Touch for example) when I do smth like:

<Observable>.subscribeOn(Schedulers.newThread())
        .observeOn(Schedulers.computation())
        .subscribe(subscriber));

I get:

Exception in thread "RxComputationScheduler-1" java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
    at 0x002e5419 rx.internal.schedulers.ScheduledAction.run() + 556
    at 0x006c7153 java.util.concurrent.Executors$RunnableAdapter.callInternal() + 44
    at 0x006c7117 java.util.concurrent.Executors$RunnableAdapter.call() + 10
    at 0x006d6aa9 java.util.concurrent.FutureTask.run() + 244
    at 0x006ea1d7 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run() + 194
    at 0x006f38f5 java.util.concurrent.ThreadPoolExecutor.runTask() + 424
    at 0x006f3695 java.util.concurrent.ThreadPoolExecutor.runWorker() + 128
Caused by: java.lang.AssertionError: Cannot perform atomic access on unaligned address 0x153b2194
    at 0x004f9519 java.lang.AssertionError.<init>() + 34
    at 0x004f94f3 java.lang.AssertionError.<init>() + 12
    at 0x005e2ec3 sun.misc.Unsafe.getObject() + 0
    at 0x00131d01 rx.internal.util.unsafe.SpscArrayQueue.soConsumerIndex() + 346
    at 0x00131b79 rx.internal.util.unsafe.SpscArrayQueue.poll() + 232
    at 0x0012ee55 rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call() + 380
    at 0x0010b7f1 rx.internal.schedulers.EventLoopsScheduler$EventLoopWorker$.call() + 164
    at 0x002e52f1 rx.internal.schedulers.ScheduledAction.run() + 260
    at 0x006c7153 java.util.concurrent.Executors$RunnableAdapter.callInternal() + 44
    at 0x006c7117 java.util.concurrent.Executors$RunnableAdapter.call() + 10
    at 0x006d6aa9 java.util.concurrent.FutureTask.run() + 244
    at 0x006ea1d7 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run() + 194
    at 0x006f38f5 java.util.concurrent.ThreadPoolExecutor.runTask() + 424
    at 0x006f3695 java.util.concurrent.ThreadPoolExecutor.runWorker() + 128

The same java code runs perfectly on ARM64 devices (iPhone 5s+)

It does not matter what subscriber and observer I give (computation/io/mainthread/newthread) always crash EXCEPT Schedulers.immediate()

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions