Cannot seek to position -1951828086

Hello,
im trying to register a dataset with proof. The file in question is part of:
mc09_7TeV.106484.SU4_herwigpp_susy.merge.NTUP_SUSY.e542_s765_s767_r1302_r1306_p305/

If I do: TFileCollection * fc = new TFileCollection(); fc->Add("dcap://lcg-lrz-dcache.grid.lrz-muenchen.de/pnfs/lrz-muenchen.de/data/atlas/dq2/atlaslocalgroupdisk/mc09_7TeV/NTUP_SUSY/e542_s765_s767_r1302_r1306_p305/mc09_7TeV.106484.SU4_herwigpp_susy.merge.NTUP_SUSY.e542_s765_s767_r1302_r1306_p305_tid185641_00/NTUP_SUSY.185641._000002.root.1"); proof = TProof::Open(""); proof->RegisterDataSet("mc09_7TeV.106484.SU4_herwigpp_susy.merge.NTUP_SUSY.e542_s765_s767_r1302_r1306_p305_tid185641_00",fc,"OV"))

I get an error saying:

SysError in <TDCacheFile::Seek>: cannot seek to position -1951828086 in file dcap://lcg-lrz-dcache.grid.lrz-muenchen.de/pnfs/lrz-muenchen.de/data/atlas/dq2/atlaslocalgroupdisk/mc09_7TeV/NTUP_SUSY/e542_s765_s767_r1302_r1306_p305/mc09_7TeV.106484.SU4_herwigpp_susy.merge.NTUP_SUSY.e542_s765_s767_r1302_r1306_p305_tid185641_00/NTUP_SUSY.185641._000001.root.1, retpos=-1951828086 (No such file or directory)
Info in <TDataSetManager::ScanDataSet>: processing 1.'new' file: dcap://lcg-lrz-dcache.grid.lrz-muenchen.de/pnfs/lrz-muenchen.de/data/atlas/dq2/atlaslocalgroupdisk/mc09_7TeV/NTUP_SUSY/e542_s765_s767_r1302_r1306_p305/mc09_7TeV.106484.SU4_herwigpp_susy.merge.NTUP_SUSY.e542_s765_s767_r1302_r1306_p305_tid185641_00/NTUP_SUSY.185641._000002.root.1

If i try to download the file to local disk and then try it, I get:

Info in <TDataSetManager::ScanDataSet>: opening 1 files that appear to be newly staged
Info in <TDataSetManager::ScanDataSet>: processing 0.'new' file: file:NTUP_SUSY.185641._000001.root.1
SysError in <TFile::Seek>: cannot seek to position -1951828086 in file NTUP_SUSY.185641._000001.root.1, retpos=-1 (Invalid argument)

The file has the same checksum as in the LFC, so its not a transfer problem. What makes me wonder is the negative number for the seek position. Also I can access the root-file without problems and can also run my complete analysis on the rootfile… I just can’t register them as a proof Dataset.
Any Idea on what is going wrong there?

Cheers,
Thomas

Hi,

Seek offsets are related to the file content. So the first think coming to the mind is that there is some problem with the file itself. During verification the file is just opened, in raw (no Seek) and normal way (seeks during Init()).
Of course it is strange that the file can be analyzed in other modes.

Can you post the file somewhere (e.g. via http)?

Gerri Ganis

There are three files affected, but they at least 1.2G in size, so I cannot post them easy.

Is there anything I could do, to test whats wrong with the files? Cheers,
Thomas

Hi,

You can try simple operations like:

i) Open in raw mode

root [] TFile *f = TFile::Open("dcap://lcg.../..._000002.root.1?filetype=raw"

ii) Open in normal read mode and do ‘ls’, ‘Map’, read the objects inside

root [] TFile *f = TFile::Open("dcap://lcg.../..._000002.root.1
root [] f->ls()
...
root [] f->Map()
...
root [] f->Get("obj_name")

When you say:

what your analysis consists of? I mean, how do you open the file in such a case? Via a TChain?

Gerri Ganis

[quote=“ganis”]Hi,

You can try simple operations like:

i) Open in raw mode

root [] TFile *f = TFile::Open("dcap://lcg.../..._000002.root.1?filetype=raw"

[/quote]
Then I don’t get an error message, but I also don’t get anything with .ls or TBrowser…
With f->ls() I get: TDCacheFile** dcap://lcg-lrz-dcache.grid.lrz-muenchen.de/pnfs/lrz-muenchen.de/data/atlas/dq2/atlaslocalgroupdisk/mc09_7TeV/NTUP_SUSY/e542_s765_s767_r1302_r1306_p305/mc09_7TeV.106484.SU4_herwigpp_susy.merge.NTUP_SUSY.e542_s765_s767_r1302_r1306_p305_tid185641_00/NTUP_SUSY.185641._000001.root.1 StreamNTUP_SUSY TDCacheFile* dcap://lcg-lrz-dcache.grid.lrz-muenchen.de/pnfs/lrz-muenchen.de/data/atlas/dq2/atlaslocalgroupdisk/mc09_7TeV/NTUP_SUSY/e542_s765_s767_r1302_r1306_p305/mc09_7TeV.106484.SU4_herwigpp_susy.merge.NTUP_SUSY.e542_s765_s767_r1302_r1306_p305_tid185641_00/NTUP_SUSY.185641._000001.root.1 StreamNTUP_SUSY

In normal mode I get the TDCacheFile** plus the keys that are in the file

[quote]

root [] f->Map()
[/quote] In normal mode, I get a huge output with many TBaskets… In raw mode, I only get:

[quote]

When you say:

what your analysis consists of? I mean, how do you open the file in such a case? Via a TChain?

Gerri Ganis[/quote][/quote]
Yes, TChain. So, the main problem is, that proof cannot register the dataset, while I can access it via root and TChain.

Hi,

What does

root [] proof->SetParallel(0)
root [] proof->Exec("TFile *f = TFile::Open(\"dcap://lcg.../..._000002.root.1\")")

return?

Gerri Ganis

The return is:

code0
[/code]

Hi,

Then I do not know.
PROOF is just doing a TFile::Open from the master as this one.

Something that I did not ask: which version of ROOT are your running? Is this PROOF-Lite or standard PROOF?

Please, try to make the file visible somehow (via http or xrootd) so that I can try to reproduce the problem.

Gerri Ganis

xrootd is currently not supported at our storage element, can you access the file via dcache, or download it via dq2-get?
The container name is mc09_7TeV.106484.SU4_herwigpp_susy.merge.NTUP_SUSY.e542_s765_s767_r1302_r1306_p305/
and the dcache link is in the first post.

Hi,

Ok, I have managed to retrieve the file (thanks to W.Guan from ATLAS UW) and to reproduce the problem.
I will get back to you as soon as I have some news.

Gerri

Ok, thanks to W. Guan and you for looking into this.

Cheers,
Thomas

Hi,

Can you do the following and post the result?

root [] TFile *f = TFile::Open("dcap://lcg.../..._000002.root.1")
root [] f->Get("Lumi")

?

Thanks, Gerri

SysError in <TDCacheFile::Seek>: cannot seek to position -1928551604 in file dcap://lcg-lrz-dcache.grid.lrz-muenchen.de/pnfs/lrz-muenchen.de/data/atlas/dq2/atlaslocalgroupdisk/mc09_7TeV/NTUP_SUSY/e542_s765_s767_r1302_r1306_p305/mc09_7TeV.106484.SU4_herwigpp_susy.merge.NTUP_SUSY.e542_s765_s767_r1302_r1306_p305_tid185641_00/NTUP_SUSY.185641._000002.root.1, retpos=-1928551604 (No such file or directory) Error: Symbol #include is not defined in current scope (tmpfile):1: Error: Symbol exception is not defined in current scope (tmpfile):1: Syntax Error: #include <exception> (tmpfile):1: Error: Symbol G__exception is not defined in current scope (tmpfile):1: Error: type G__exception not defined FILE:(tmpfile) LINE:1 (class TObject*)0x0 *** Interpreter error recovered ***

Btw, I just noticed that this also happens to the downloaded version of the file, if I do not use Proof. So I assume that in normal analyses you don’t need what’s inside “Lumi”, (at least I do not need it), and therefore nobody noticed the problem yet. However, Proof checks the file for consistency, and therefore reveals the problem.

I will notify the owner of the file,

Cheers
Thomas

Hi,

Thanks.
You get basically the same error.
It looks like there is a problem with the “Lumi” sub-directory.
Is that supposed to have something inside or is it empty?
Can you try with another file with the same structure?

Note that the other information in the file is correctly read and the dataset should appear as verified in ShowDataSets(). So if you do not need the info under “Lumi” your analysis should also work under PROOF.

Gerri