Error storing records during sync: nested transactions are not supported

NEW
Unassigned

Status

()

Firefox for Android
Android Sync
P2
normal
2 years ago
8 months ago

People

(Reporter: Grisha, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
This was triggered during the very first sync after logging in - I edited Device Name while sync was in progress, and sync didn't seem to ever finish at that point.

09-09 15:20:22.170 13238-15472/org.mozilla.fennec_grisha I/GeckoLogger: fennec_grisha :: GlobalSession :: Running next stage syncFormHistory (org.mozilla.gecko.sync.stage.FormHistoryServerSyncStage@4d2c7e)...
09-09 15:20:23.018 13238-13244/org.mozilla.fennec_grisha W/art: Suspending all threads took: 14.616ms
09-09 15:20:24.524 13238-13244/org.mozilla.fennec_grisha W/art: Suspending all threads took: 20.103ms
09-09 15:20:25.220 13238-15564/org.mozilla.fennec_grisha E/FormHistoryProvider: Error in database BULKINSERT
                                                                                org.mozilla.gecko.sqlite.SQLiteBridgeException: Nested transactions are not supported
                                                                                    at org.mozilla.gecko.sqlite.SQLiteBridge.beginTransaction(SQLiteBridge.java:290)
                                                                                    at org.mozilla.gecko.db.SQLiteBridgeContentProvider.bulkInsert(SQLiteBridgeContentProvider.java:363)
                                                                                    at android.content.ContentProvider$Transport.bulkInsert(ContentProvider.java:278)
                                                                                    at android.content.ContentProviderClient.bulkInsert(ContentProviderClient.java:244)
                                                                                    at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession.flushInsertQueue(FormHistoryRepositorySession.java:472)
                                                                                    at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession.insertNewRegularRecord(FormHistoryRepositorySession.java:510)
                                                                                    at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession$8.run(FormHistoryRepositorySession.java:637)
                                                                                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                    at java.lang.Thread.run(Thread.java:818)
09-09 15:20:25.232 13238-15564/org.mozilla.fennec_grisha W/GeckoLogger: fennec_grisha :: SynchronizerSession :: First RecordsChannel onFlowStoreFailed. Logging local store error.
                                                                        org.mozilla.gecko.sqlite.SQLiteBridgeException: Nested transactions are not supported
                                                                            at org.mozilla.gecko.sqlite.SQLiteBridge.beginTransaction(SQLiteBridge.java:290)
                                                                            at org.mozilla.gecko.db.SQLiteBridgeContentProvider.bulkInsert(SQLiteBridgeContentProvider.java:363)
                                                                            at android.content.ContentProvider$Transport.bulkInsert(ContentProvider.java:278)
                                                                            at android.content.ContentProviderClient.bulkInsert(ContentProviderClient.java:244)
                                                                            at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession.flushInsertQueue(FormHistoryRepositorySession.java:472)
                                                                            at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession.insertNewRegularRecord(FormHistoryRepositorySession.java:510)
                                                                            at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession$8.run(FormHistoryRepositorySession.java:637)
                                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                            at java.lang.Thread.run(Thread.java:818)
09-09 15:20:28.480 13238-15549/org.mozilla.fennec_grisha E/FormHistoryProvider: Error in database BULKINSERT
                                                                                org.mozilla.gecko.sqlite.SQLiteBridgeException: setTransactionSuccessful called outside a transaction
                                                                                    at org.mozilla.gecko.sqlite.SQLiteBridge.setTransactionSuccessful(SQLiteBridge.java:325)
                                                                                    at org.mozilla.gecko.db.SQLiteBridgeContentProvider.bulkInsert(SQLiteBridgeContentProvider.java:371)
                                                                                    at android.content.ContentProvider$Transport.bulkInsert(ContentProvider.java:278)
                                                                                    at android.content.ContentProviderClient.bulkInsert(ContentProviderClient.java:244)
                                                                                    at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession.flushInsertQueue(FormHistoryRepositorySession.java:472)
                                                                                    at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession.insertNewRegularRecord(FormHistoryRepositorySession.java:510)
                                                                                    at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession$8.run(FormHistoryRepositorySession.java:637)
                                                                                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                    at java.lang.Thread.run(Thread.java:818)
09-09 15:20:28.480 13238-15549/org.mozilla.fennec_grisha W/GeckoLogger: fennec_grisha :: SynchronizerSession :: First RecordsChannel onFlowStoreFailed. Logging local store error.
                                                                        org.mozilla.gecko.sqlite.SQLiteBridgeException: setTransactionSuccessful called outside a transaction
                                                                            at org.mozilla.gecko.sqlite.SQLiteBridge.setTransactionSuccessful(SQLiteBridge.java:325)
                                                                            at org.mozilla.gecko.db.SQLiteBridgeContentProvider.bulkInsert(SQLiteBridgeContentProvider.java:371)
                                                                            at android.content.ContentProvider$Transport.bulkInsert(ContentProvider.java:278)
                                                                            at android.content.ContentProviderClient.bulkInsert(ContentProviderClient.java:244)
                                                                            at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession.flushInsertQueue(FormHistoryRepositorySession.java:472)
                                                                            at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession.insertNewRegularRecord(FormHistoryRepositorySession.java:510)
                                                                            at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession$8.run(FormHistoryRepositorySession.java:637)
                                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                            at java.lang.Thread.run(Thread.java:818)
09-09 15:20:29.115 13238-15564/org.mozilla.fennec_grisha E/FormHistoryProvider: Error in database BULKINSERT
                                                                                org.mozilla.gecko.sqlite.SQLiteBridgeException: Nested transactions are not supported
                                                                                    at org.mozilla.gecko.sqlite.SQLiteBridge.beginTransaction(SQLiteBridge.java:290)
                                                                                    at org.mozilla.gecko.db.SQLiteBridgeContentProvider.bulkInsert(SQLiteBridgeContentProvider.java:363)
                                                                                    at android.content.ContentProvider$Transport.bulkInsert(ContentProvider.java:278)
                                                                                    at android.content.ContentProviderClient.bulkInsert(ContentProviderClient.java:244)
                                                                                    at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession.flushInsertQueue(FormHistoryRepositorySession.java:472)
                                                                                    at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession$7.run(FormHistoryRepositorySession.java:487)
                                                                                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                    at java.lang.Thread.run(Thread.java:818)
09-09 15:20:29.117 13238-15564/org.mozilla.fennec_grisha W/GeckoLogger: fennec_grisha :: SynchronizerSession :: First RecordsChannel onFlowStoreFailed. Logging local store error.
                                                                        org.mozilla.gecko.sqlite.SQLiteBridgeException: Nested transactions are not supported
                                                                            at org.mozilla.gecko.sqlite.SQLiteBridge.beginTransaction(SQLiteBridge.java:290)
                                                                            at org.mozilla.gecko.db.SQLiteBridgeContentProvider.bulkInsert(SQLiteBridgeContentProvider.java:363)
                                                                            at android.content.ContentProvider$Transport.bulkInsert(ContentProvider.java:278)
                                                                            at android.content.ContentProviderClient.bulkInsert(ContentProviderClient.java:244)
                                                                            at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession.flushInsertQueue(FormHistoryRepositorySession.java:472)
                                                                            at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession$7.run(FormHistoryRepositorySession.java:487)
                                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                            at java.lang.Thread.run(Thread.java:818)
09-09 15:20:29.871 13238-15549/org.mozilla.fennec_grisha E/FormHistoryProvider: Error in database BULKINSERT
                                                                                org.mozilla.gecko.sqlite.SQLiteBridgeException: setTransactionSuccessful called outside a transaction
                                                                                    at org.mozilla.gecko.sqlite.SQLiteBridge.setTransactionSuccessful(SQLiteBridge.java:325)
                                                                                    at org.mozilla.gecko.db.SQLiteBridgeContentProvider.bulkInsert(SQLiteBridgeContentProvider.java:371)
                                                                                    at android.content.ContentProvider$Transport.bulkInsert(ContentProvider.java:278)
                                                                                    at android.content.ContentProviderClient.bulkInsert(ContentProviderClient.java:244)
                                                                                    at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession.flushInsertQueue(FormHistoryRepositorySession.java:472)
                                                                                    at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession$7.run(FormHistoryRepositorySession.java:487)
                                                                                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                                    at java.lang.Thread.run(Thread.java:818)
09-09 15:20:29.872 13238-15549/org.mozilla.fennec_grisha W/GeckoLogger: fennec_grisha :: SynchronizerSession :: First RecordsChannel onFlowStoreFailed. Logging local store error.
                                                                        org.mozilla.gecko.sqlite.SQLiteBridgeException: setTransactionSuccessful called outside a transaction
                                                                            at org.mozilla.gecko.sqlite.SQLiteBridge.setTransactionSuccessful(SQLiteBridge.java:325)
                                                                            at org.mozilla.gecko.db.SQLiteBridgeContentProvider.bulkInsert(SQLiteBridgeContentProvider.java:371)
                                                                            at android.content.ContentProvider$Transport.bulkInsert(ContentProvider.java:278)
                                                                            at android.content.ContentProviderClient.bulkInsert(ContentProviderClient.java:244)
                                                                            at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession.flushInsertQueue(FormHistoryRepositorySession.java:472)
                                                                            at org.mozilla.gecko.sync.repositories.android.FormHistoryRepositorySession$7.run(FormHistoryRepositorySession.java:487)
                                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
                                                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
                                                                            at java.lang.Thread.run(Thread.java:818)
(Reporter)

Updated

a year ago
Priority: -- → P2
(Reporter)

Comment 1

a year ago
This needs more investigation. I haven't seen this crop up, but things like

org.mozilla.gecko.sqlite.SQLiteBridgeException: setTransactionSuccessful called outside a transaction

certainly indicate that something is getting pretty screwed up.

I'm somewhat inclined to move formhistory data accessor away from using bulkInsert and towards a custom call() which will perform the work in a single transaction (similarly to how history gets mass-inserted from sync now).

Updated

8 months ago
Product: Android Background Services → Firefox for Android
You need to log in before you can comment on or make changes to this bug.