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

Possible lock on main thread #245

Closed
ghost opened this issue Nov 13, 2015 · 6 comments
Closed

Possible lock on main thread #245

ghost opened this issue Nov 13, 2015 · 6 comments

Comments

@ghost
Copy link

ghost commented Nov 13, 2015

Could you check it.

Right after update on 2.7.5 from cocoapods I get this lock on main thread
This is never happened before.

"YapDatabaseConnection.h"

  • (void)markSqlLevelSharedReadLockAcquired
    {

process stop at 2808 dispatch_sync(database->snapshotQueue, ^{ @autoreleasepool { << blocked on main thread

<_NSCallStackArray 0x7f9ede8118e0>(
0 ??? 0x000000011c308b25 0x0 + 4767910693,
1 NextSeat2 0x000000010adc2570 main + 0,
2 libdispatch.dylib 0x00000001102bc96c _dispatch_barrier_sync_f_slow + 830,
3 NextSeat2 0x000000010b17ff96 -[YapDatabaseConnection markSqlLevelSharedReadLockAcquired] + 582,
4 NextSeat2 0x000000010b17abbe yapNotifyDidRead + 78,
5 NextSeat2 0x000000010b29b842 yap_file_read + 130,
6 libsqlite3.dylib 0x000000010bdf21bd readDbPage + 93,
7 libsqlite3.dylib 0x000000010bdcaa7d sqlite3PagerAcquire + 605,
8 libsqlite3.dylib 0x000000010bdc9d56 sqlite3BtreeBeginTrans + 806,
9 libsqlite3.dylib 0x000000010bdfd5e3 sqlite3VdbeExec + 4611,
10 libsqlite3.dylib 0x000000010bdcdb72 sqlite3_step + 546,
11 NextSeat2 0x000000010b17f8ef -[YapDatabaseConnection readSnapshotFromDatabase] + 335,
12 NextSeat2 0x000000010b17a1fd __44-[YapDatabaseConnection preReadTransaction:]_block_invoke + 1149,
13 libdispatch.dylib 0x00000001102d849b _dispatch_client_callout + 8,
14 libdispatch.dylib 0x00000001102bcfb5 _dispatch_barrier_sync_f_invoke + 393,
15 NextSeat2 0x000000010b179be1 -[YapDatabaseConnection preReadTransaction:] + 193,
16 NextSeat2 0x000000010b1808e7 __54-[YapDatabaseConnection beginLongLivedReadTransaction]_block_invoke + 263,
17 libdispatch.dylib 0x00000001102d849b _dispatch_client_callout + 8,
18 libdispatch.dylib 0x00000001102bcfb5 _dispatch_barrier_sync_f_invoke + 393,
19 NextSeat2 0x000000010b180747 -[YapDatabaseConnection beginLongLivedReadTransaction] + 311,
20 NextSeat2 0x000000010ae700cf -[NSACollectionSource processDatabaseChangesNotification:] + 95,
21 CoreFoundation 0x000000010f92c77c CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 12,
22 CoreFoundation 0x000000010f92c4bb _CFXRegistrationPost + 427,
23 CoreFoundation 0x000000010f92c222 ___CFXNotificationPost_block_invoke + 50,
24 CoreFoundation 0x000000010f971a52 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1986,
25 CoreFoundation 0x000000010f827859 _CFXNotificationPost + 633,
26 NextSeat2 0x000000010b17e490 __50-[YapDatabaseConnection postReadWriteTransaction:]_block_invoke367 + 80,
27 libdispatch.dylib 0x00000001102b7e5d _dispatch_call_block_and_release + 12,
28 libdispatch.dylib 0x00000001102d849b _dispatch_client_callout + 8,
29 libdispatch.dylib 0x00000001102c02af _dispatch_main_queue_callback_4CF + 1738,
30 CoreFoundation 0x000000010f8c02e9 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9,
31 CoreFoundation 0x000000010f8818a9 __CFRunLoopRun + 2073,
32 CoreFoundation 0x000000010f880e08 CFRunLoopRunSpecific + 488,
33 GraphicsServices 0x00000001126efad2 GSEventRunModal + 161,
34 UIKit 0x000000010d45430d UIApplicationMain + 171,
35 NextSeat2 0x000000010adc25df main + 111,
36 libdyld.dylib 0x000000011030c92d start + 1
)

this is enqeued stack from xcode

http://s24.postimg.org/nq44973x1/Screen_Shot_2015_11_13_at_6_42_34_PM.png

@robbiehanson
Copy link
Contributor

Thank you for reporting this. That's a serious bug! Working on a fix now.

@codyrobb
Copy link

We also ran into the same issue yesterday. We can report more information if needed. Glad to see a fix is in motion.

@robbiehanson
Copy link
Contributor

Could you pull commit 3d67b0e and verify the problem is fixed ?

If so, I'm going to push 2.7.6 out the door immediately.

@braking
Copy link

braking commented Nov 13, 2015

This appears to have fixed it for us (@codyrobb). Thanks for the quick turnaround.

@ghost
Copy link
Author

ghost commented Nov 13, 2015

Could not reproduce after commit 3d67b0e was pulled. I will have more info after team commit tests of the app on the weekends.

@robbiehanson
Copy link
Contributor

Thanks again for the heads-up guys. Version 2.7.6 has been pushed.

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

3 participants