On 18.07.2012 13:07, Jonathan Pryor wrote:
> I just had a horrifying thought... [0]
>
> Which ABI is  your app set to use? The default is armeabi, which doesn't 
> support multiple cores; armeabi-v7a is required to make use of multiple cores.
I had it compiled to the default (armeabi). Then after your suggestion,
I tried out armeabi-v7a and was still able to reproduce the deadlock.
>
> In order for the armeabi runtime to work sanely on SMP devices, we use the 
> setaffinity() system call to tie the process to a single core. If it fails, 
> we log an error in logcat:
>
>       __android_log_vprint (ANDROID_LOG_ERROR, "MonoDroid", "Error in the 
> syscall setaffinity: err=%d=0x%x", err, err);
>
> (Arguably we should abort if it fails...)
>
> For reference, I've had your app run on as a Debug/armeabi-v7a app on a Xoom 
> overnight without issue.
>
> Q: Is your app set to use armeabi or armeabi-v7a?
Tried both, deadlock happens with both.
>
> Q: If you look at the Android Debug Log output, do you see the "Error in 
> syscall setaffinity" message?
I do not see this error, no matter what arm version is used.

By the way, I just found a thread on stackoverflow from January this
year where someone has had a similar problem with pure Java (random
deadlocks with background worker) even after removing all of his own
synchronization:

http://stackoverflow.com/questions/8773274/any-special-android-deadlock-debugging-tricks

That makes me worry.
Would be nice, if you guys could do a test on a Galaxy Tab 10.1. Is that
possible? In return, I'll try an equivalent program and try to reproduce
the deadlock in pure java on my device to get a rough idea if M4A is the
culprit or not.
Best wishes,
-- Henon
>
> Thanks,
>  - Jon
>
> [0] The horrifying thought? That setaffinity() isn't implemented on your 
> device.
>
> On Jul 17, 2012, at 6:54 PM, Jonathan Pryor wrote:
>
>> On Jul 16, 2012, at 7:49 AM, Meinrad Recheis wrote:
>>> Another info: I just tested with an older Samsung Galaxy S that has only 
>>> one core and couldn't reproduce any deadlocks even with 10 background 
>>> threads whereas with the dual core Galaxy Tab 10.1 it is really easy to 
>>> reproduce.
>> Thank you for writing the test case. :-)
>>
>> Are you Debugging or Running the app? Debug or Release?
>>
>> I'm trying to run your app on my Motorola Xoom (dual-core), and it hasn't 
>> deadlocked yet. :-(
>>
>> - Jon
>>
> _______________________________________________
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to