View Issue Details

IDProjectCategoryView StatusLast Update
0005625SymmetricDSBugpublic2022-12-13 22:00
Reporterelong Assigned Toelong  
Prioritynormal 
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.io.data.DataProcessor.rethrow(DataProcessor.java:252)
                at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:155)
                at org.jumpmind.symmetric.service.impl.DataExtractorService.extractOutgoingBatch(DataExtractorService.java:1091)
                at org.jumpmind.symmetric.service.impl.DataExtractorService.extractBatch(DataExtractorService.java:967)
                at org.jumpmind.symmetric.service.impl.DataExtractorService.lambda$extract$1(DataExtractorService.java:723)
                at java.util.concurrent.FutureTask.run(Unknown Source)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
                at java.lang.Thread.run(Unknown 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 com.microsoft.sqlserver.jdbc.DDC.convertTemporalToObject(DDC.java:597)
                at com.microsoft.sqlserver.jdbc.TDSReader.readDateTime(IOBuffer.java:5226)
                at com.microsoft.sqlserver.jdbc.ServerDTVImpl.getValue(dtv.java:2629)
                at com.microsoft.sqlserver.jdbc.DTV.getValue(dtv.java:193)
                at com.microsoft.sqlserver.jdbc.Column.getValue(Column.java:132)
                at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2082)
                at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2067)
                at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getObject(SQLServerResultSet.java:2356)
                at org.apache.commons.dbcp2.DelegatingResultSet.getObject(DelegatingResultSet.java:733)
                at org.apache.commons.dbcp2.DelegatingResultSet.getObject(DelegatingResultSet.java:733)
                at org.jumpmind.db.sql.JdbcSqlTemplate.getResultSetValue(JdbcSqlTemplate.java:605)
                at org.jumpmind.db.sql.JdbcSqlReadCursor.getMapForRow(JdbcSqlReadCursor.java:157)
                at org.jumpmind.db.sql.JdbcSqlReadCursor.next(JdbcSqlReadCursor.java:138)
                at org.jumpmind.symmetric.service.impl.DataExtractorService$SelectFromSymDataSource.next(DataExtractorService.java:2544)
                at org.jumpmind.symmetric.service.impl.DataExtractorService$SelectFromSymDataSource.next(DataExtractorService.java:2561)
... repeats 600 times ...
                at org.jumpmind.symmetric.io.data.reader.ExtractDataReader.nextData(ExtractDataReader.java:134)
                at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:199)
                at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:178)
                at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:124)
                ... 7 more
Tagsdata sync

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: 3.14 cc6df130

2022-12-13 21:22:27

admin

Details Diff
0005625: Stack overflow while extracting batch containing a table
removed from replication
Affected Issues
0005625
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/extract/SelectFromSymDataSource.java 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