kasemir / org.csstudio.display.builder

Update of org.csstudio.opibuilder.*
Eclipse Public License 1.0
2 stars 10 forks source link

Problem accessing raw data in DataBrowser 3 #499

Closed claudio-rosati closed 5 years ago

claudio-rosati commented 5 years ago

I open a DataBrowser view and add a PV. I set the the time span to 7 days and everything is fine.

screenshot 2019-02-22 at 16 00 20

Then is change the trace Request from Optimized to Raw data. After a couple of seconds the following is displayed in console:

2019-02-22 16:00:41.187 WARNING [Thread 103] org.csstudio.trends.databrowser3.ui.ControllerBase$BaseArchiveFetchJobListener (archiveFetchFailed) - No archived data for ISrc-010:PBI-BCM-001:AI4-IPCH-RBV
java.lang.IllegalArgumentException: nanos > 999999999 or < 0
    at java.sql.Timestamp.setNanos(Timestamp.java:389)
    at org.epics.archiverappliance.retrieval.client.EpicsMessage.<init>(EpicsMessage.java:34)
    at org.epics.archiverappliance.retrieval.client.InputStreamBackedGenMsg.readLineAndParseNextMessage(InputStreamBackedGenMsg.java:221)
    at org.epics.archiverappliance.retrieval.client.InputStreamBackedGenMsg.access$000(InputStreamBackedGenMsg.java:35)
    at org.epics.archiverappliance.retrieval.client.InputStreamBackedGenMsg$1.next(InputStreamBackedGenMsg.java:75)
    at org.epics.archiverappliance.retrieval.client.InputStreamBackedGenMsg$1.next(InputStreamBackedGenMsg.java:64)
    at org.csstudio.archive.reader.appliance.ApplianceValueIterator.next(ApplianceValueIterator.java:128)
    at org.csstudio.trends.databrowser3.archive.ArchiveFetchJob$WorkerThread.run(ArchiveFetchJob.java:155)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
screenshot 2019-02-22 at 16 00 58

The same data using the archiver appliance web interface is well depicted:

screenshot 2019-02-22 at 16 13 25

@kasemir Can you please help me indicating where to start looking for the problem?

kasemir commented 5 years ago

Well, the error seems to be in the archiverappliance library. It's somehow finding a time stamp with invalid nanoseconds:

java.lang.IllegalArgumentException: nanos > 999999999 or < 0
    at java.sql.Timestamp.setNanos(Timestamp.java:389)
    at org.epics.archiverappliance.retrieval.client.EpicsMessage.<init>(EpicsMessage.java:34)

In principle, that should not happen. In reality, Channel Access serves the timestamp as seconds and nanoseconds. The nanoseconds are a 32 bit unsigned integer set by the IOC, and depending on your timing source it can put anything in there, for example 1000000000 which is beyond 999999999.

Unclear if the AA actually stored such a bad time stamp, or if it erroneously sends that to you when you ask for the data, or if the archiverappliance library creates such a bad time stamp.

I don't know about the archive applicance, but maybe there's a way to dump the raw samples from the AA by some other way to see the nanoseconds as they are stored in the AA, so you can compare with the actual data.

claudio-rosati commented 5 years ago

Thank you, I'll forward your message to the guy managing the Archiver Appliance.