View Issue Details

IDProjectCategoryView StatusLast Update
0005625SymmetricDSBugpublic2022-12-13 22:00
Reporterelong Assigned Toelong  
Status closedResolutionfixed 
Product Version3.8.0 
Target Version3.14.4Fixed in Version3.14.4 
Summary0005625: Stack overflow while extracting batch containing a table removed from replication
DescriptionIf a table is removed from replication while there are outstanding batches for it, the extraction of batches containing that table can get a stack overflow. Data extractor service looks up the trigger router for each change it extracts. If it can't find a trigger router, it will skip the change and move on to the next. However, the logic is written to skip by calling the current method recursively. So, it can only skip as many rows as the stack size allows. See stack trace below with recursive calls that caused an overflow.

Work around the error by removing the table from sym_data:

delete from sym_data where table_name = 'table_removed_from_replication';
Steps To Reproduce1. Setup server and client
2. Setup table to replicate from server to client
3. Stop routing and push/pull jobs
4. Insert 1000 rows into table
5. Run routing job on server
6. Remove table from replication (disable trigger router)
7. Run push/pull jobs
Additional Informationjava.lang.RuntimeException: java.lang.StackOverflowError
                at org.jumpmind.symmetric.service.impl.DataExtractorService.extractOutgoingBatch(
                at org.jumpmind.symmetric.service.impl.DataExtractorService.extractBatch(
                at org.jumpmind.symmetric.service.impl.DataExtractorService.lambda$extract$1(
                at Source)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
                at java.util.concurrent.ThreadPoolExecutor$ Source)
                at Source)
Caused by: java.lang.StackOverflowError
                at sun.util.calendar.BaseCalendar.getCalendarDateFromFixedDate(Unknown Source)
                at java.util.GregorianCalendar.computeFields(Unknown Source)
                at java.util.GregorianCalendar.computeFields(Unknown Source)
                at java.util.Calendar.setTimeInMillis(Unknown Source)
                at java.util.GregorianCalendar.<init>(Unknown Source)
                at org.apache.commons.dbcp2.DelegatingResultSet.getObject(
                at org.apache.commons.dbcp2.DelegatingResultSet.getObject(
                at org.jumpmind.db.sql.JdbcSqlTemplate.getResultSetValue(
                at org.jumpmind.db.sql.JdbcSqlReadCursor.getMapForRow(
                at org.jumpmind.symmetric.service.impl.DataExtractorService$
                at org.jumpmind.symmetric.service.impl.DataExtractorService$
... repeats 600 times ...
                ... 7 more
Tagsdata sync


There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.14 cc6df130

2022-12-13 21:22:27


Details Diff
0005625: Stack overflow while extracting batch containing a table
removed from replication
Affected Issues
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/extract/ Diff File

Issue History

Date Modified Username Field Change
2022-12-12 20:56 elong New Issue
2022-12-12 20:56 elong Status new => assigned
2022-12-12 20:56 elong Assigned To => elong
2022-12-12 20:56 elong Tag Attached: data sync
2022-12-13 21:13 elong Description Updated View Revisions
2022-12-13 21:22 elong Status assigned => resolved
2022-12-13 21:22 elong Resolution open => fixed
2022-12-13 21:22 elong Fixed in Version => 3.14.4
2022-12-13 22:00 admin Changeset attached => SymmetricDS 3.14 cc6df130
2023-01-16 20:59 admin Status resolved => closed