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

Downsample use-after-close issue #5476

Closed
niloc132 opened this issue May 10, 2024 · 0 comments · Fixed by #5478
Closed

Downsample use-after-close issue #5476

niloc132 opened this issue May 10, 2024 · 0 comments · Fixed by #5478
Assignees
Labels
bug Something isn't working plotting triage

Comments

@niloc132
Copy link
Member

Reported from community slack:

aph-updateExecutor-3 | rumentedTableListenerBase | Uncaught exception for entry= downsample listener, added.size()=6, modified.size()=20533, removed.size()=0, shifted.size()=0, modifiedColumnSet={tdate_1min,tdate3_1min,tdate3_diff_1min,tdate2_1min,bar_volume_1min,total_volume_1min,bar_open_1min,bar_high_1min,bar_low_1min,bar_close_1min,opening_price_1min,Count_1min,yyyymmdd_1min,MonthOfYear_1min,DayOfYear_1min,WeekOfYear_1min,Open_Interest_1min,V_OI_1min,V_OI_Total_1min,prev_bar_open_1min,prev2_bar_open_1min,prev3_bar_open_1min,prev_bar_high_1min,prev2_bar_high_1min,prev3_bar_high_1min,prev_bar_low_1min,prev2_bar_low_1min,prev3_bar_low_1min,prev_bar_close_1min,prev2_bar_close_1min,prev3_bar_close_1min,prev_bar_volume_1min,prev2_bar_volume_1min,prev3_bar_volume_1min,prev_DayOfYear_1min,prev2_DayOfYear_1min,prev_WeekOfYear_1min,prev2_WeekOfYear_1min,prev_MonthOfYear_1min,prev2_MonthOfYear_1min,TypicalPrice_1min,prev_TypicalPrice_1min,prev2_TypicalPrice_1min,new_day_1min,new_week_1min,new_month_1min,di_plus_14_1min,di_minus_14_1min,adx_14_1min,stochRSI_fastk_14_1min,stochRSI_fastd_14_1min,prev_adx_14_1min,prev_di_plus_14_1min,prev_di_minus_14_1min,prev_stochRSI_fastk_14_1min,prev_stochRSI_fastd_14_1min,prev2_adx_14_1min,prev2_di_plus_14_1min,prev2_di_minus_14_1min,prev2_stochRSI_fastk_14_1min,prev2_stochRSI_fastd_14_1min,tdate_3min,tdate3_3min,tdate3_diff_3min,tdate2_3min,bar_volume_3min,total_volume_3min,bar_open_3min,bar_high_3min,bar_low_3min,bar_close_3min,opening_price_3min,Count_3min,yyyymmdd_3min,MonthOfYear_3min,DayOfYear_3min,WeekOfYear_3min,Open_Interest_3min,V_OI_3min,V_OI_Total_3min,prev_bar_open_3min,prev2_bar_open_3min,prev3_bar_open_3min,prev_bar_high_3min,prev2_bar_high_3min,prev3_bar_high_3min,prev_bar_low_3min,prev2_bar_low_3min,prev3_bar_low_3min,prev_bar_close_3min,prev2_bar_close_3min,prev3_bar_close_3min,prev_bar_volume_3min,prev2_bar_volume_3min,prev3_bar_volume_3min,prev_DayOfYear_3min,prev2_DayOfYear_3min,prev_WeekOfYear_3min,prev2_WeekOfYear_3min,prev_MonthOfYear_3min,...}:
java.lang.NullPointerException: Cannot invoke "io.deephaven.engine.rowset.impl.OrderedLongSet.ixGetRowSequenceIterator()" because "this.innerSet" is null
	at io.deephaven.engine.rowset.impl.WritableRowSetImpl.getRowSequenceIterator(WritableRowSetImpl.java:240)
	at io.deephaven.engine.rowset.RowSetShiftData.apply(RowSetShiftData.java:297)
	at io.deephaven.clientsupport.plotdownsampling.BucketState.shift(BucketState.java:113)
	at io.deephaven.clientsupport.plotdownsampling.RunChartDownsample$DownsamplerListener.handleShifts(RunChartDownsample.java:675)
	at io.deephaven.clientsupport.plotdownsampling.RunChartDownsample$DownsamplerListener.onUpdate(RunChartDownsample.java:332)
	at io.deephaven.engine.table.impl.InstrumentedTableUpdateListener$Notification.lambda$run$0(InstrumentedTableUpdateListener.java:37)
	at io.deephaven.engine.table.impl.InstrumentedTableListenerBase$NotificationBase.doRunInternal(InstrumentedTableListenerBase.java:334)
	at io.deephaven.engine.table.impl.InstrumentedTableListenerBase$NotificationBase.doRun(InstrumentedTableListenerBase.java:316)
	at io.deephaven.engine.table.impl.InstrumentedTableUpdateListener$Notification.run(InstrumentedTableUpdateListener.java:37)
	at io.deephaven.engine.updategraph.impl.BaseUpdateGraph.runNotification(BaseUpdateGraph.java:712)
	at io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph$ConcurrentNotificationProcessor.processSatisfiedNotifications(PeriodicUpdateGraph.java:836)
	at io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph$NotificationProcessorThreadFactory.lambda$newThread$0(PeriodicUpdateGraph.java:1109)
	at java.base/java.lang.Thread.run(Thread.java:1583)
aph-updateExecutor-3 | .AsyncClientErrorNotifier | Error in table update: java.lang.NullPointerException: Cannot invoke "io.deephaven.engine.rowset.impl.OrderedLongSet.ixGetRowSequenceIterator()" because "this.innerSet" is null
	at io.deephaven.engine.rowset.impl.WritableRowSetImpl.getRowSequenceIterator(WritableRowSetImpl.java:240)
	at io.deephaven.engine.rowset.RowSetShiftData.apply(RowSetShiftData.java:297)
	at io.deephaven.clientsupport.plotdownsampling.BucketState.shift(BucketState.java:113)
	at io.deephaven.clientsupport.plotdownsampling.RunChartDownsample$DownsamplerListener.handleShifts(RunChartDownsample.java:675)
	at io.deephaven.clientsupport.plotdownsampling.RunChartDownsample$DownsamplerListener.onUpdate(RunChartDownsample.java:332)
	at io.deephaven.engine.table.impl.InstrumentedTableUpdateListener$Notification.lambda$run$0(InstrumentedTableUpdateListener.java:37)
	at io.deephaven.engine.table.impl.InstrumentedTableListenerBase$NotificationBase.doRunInternal(InstrumentedTableListenerBase.java:334)
	at io.deephaven.engine.table.impl.InstrumentedTableListenerBase$NotificationBase.doRun(InstrumentedTableListenerBase.java:316)
	at io.deephaven.engine.table.impl.InstrumentedTableUpdateListener$Notification.run(InstrumentedTableUpdateListener.java:37)
	at io.deephaven.engine.updategraph.impl.BaseUpdateGraph.runNotification(BaseUpdateGraph.java:712)
	at io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph$ConcurrentNotificationProcessor.processSatisfiedNotifications(PeriodicUpdateGraph.java:836)
	at io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph$NotificationProcessorThreadFactory.lambda$newThread$0(PeriodicUpdateGraph.java:1109)
	at java.base/java.lang.Thread.run(Thread.java:1583)

It looks like the update graph is running and trying to apply a shift after the user released the downsampled table.

An older stack trace that looks like the same issue, achieved with the RunChartDownsample.validate flag being turned on:

ph-updateExecutor-29 | rumentedTableListenerBase | Uncaught exception for entry= downsample listener, added.size()=28, modified.size()=0, removed.size()=0, shifted.size()=0, modifiedColumnSet={}:
java.lang.NullPointerException: Cannot invoke "io.deephaven.engine.rowset.impl.OrderedLongSet.ixRangeIterator()" because "this.innerSet" is null
    at io.deephaven.engine.rowset.impl.WritableRowSetImpl.rangeIterator(WritableRowSetImpl.java:468)
    at io.deephaven.engine.rowset.impl.RowSetUtils.toString(RowSetUtils.java:24)
    at io.deephaven.engine.rowset.impl.WritableRowSetImpl.toString(WritableRowSetImpl.java:498)
    at java.base/java.lang.String.valueOf(String.java:4216)
    at java.base/java.io.PrintStream.println(PrintStream.java:1047)
    at io.deephaven.clientsupport.plotdownsampling.BucketState.validate(BucketState.java:313)
    at io.deephaven.clientsupport.plotdownsampling.RunChartDownsample$DownsamplerListener.lambda$onUpdate$1(RunChartDownsample.java:352)
    at java.base/java.lang.Iterable.forEach(Iterable.java:75)
    at io.deephaven.clientsupport.plotdownsampling.RunChartDownsample$DownsamplerListener.onUpdate(RunChartDownsample.java:352)
    at io.deephaven.engine.table.impl.InstrumentedTableUpdateListener$Notification.lambda$run$0(InstrumentedTableUpdateListener.java:37)
    at io.deephaven.engine.table.impl.InstrumentedTableListenerBase$NotificationBase.doRunInternal(InstrumentedTableListenerBase.java:334)
    at io.deephaven.engine.table.impl.InstrumentedTableListenerBase$NotificationBase.doRun(InstrumentedTableListenerBase.java:316)
    at io.deephaven.engine.table.impl.InstrumentedTableUpdateListener$Notification.run(InstrumentedTableUpdateListener.java:37)
    at io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph.runNotification(PeriodicUpdateGraph.java:1322)
    at io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph$ConcurrentNotificationProcessor.processSatisfiedNotifications(PeriodicUpdateGraph.java:1373)
    at io.deephaven.engine.updategraph.impl.PeriodicUpdateGraph$NotificationProcessorThreadFactory.lambda$newThread$0(PeriodicUpdateGraph.java:1911)
    at org.jpy.PyLib.callAndReturnObject(Native Method)
    at org.jpy.PyObject.call(PyObject.java:449)
    at io.deephaven.server.console.python.DebuggingInitializer.lambda$createInitializer$0(DebuggingInitializer.java:30)
    at java.base/java.lang.Thread.run(Thread.java:833)
@niloc132 niloc132 added bug Something isn't working triage plotting labels May 10, 2024
@niloc132 niloc132 self-assigned this May 10, 2024
niloc132 added a commit to niloc132/deephaven-core that referenced this issue May 10, 2024
Fixes a bug in downsampling where a table may cause an error if freed
while processing an update.

Fixes deephaven#5476
niloc132 added a commit that referenced this issue May 16, 2024
Fixes a bug in downsampling where a table may cause an error if freed
while processing an update.

Fixes #5476
stanbrub pushed a commit that referenced this issue May 17, 2024
Fixes a bug in downsampling where a table may cause an error if freed
while processing an update.

Fixes #5476
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plotting triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant