Problems updating file

Dear experts,

I have some trouble updating a root file, which I guess is related to file name/path length. If I try to open /afs/cern.ch/user/m/morgens/eos_atlas/atlas/user/m/morgens/datasets/MultiLepton/ntuples/v2/user.morgens.364112.e5271_s2726_r7772/user.morgens.11027645._000002.hist-output.root
in read mode everything is fine, while I cannot open it in update mode. Running gSystem->ExpandPathName I see that the path returned is limited to 128 characters. To me it seems that this causes then gSystem->AccessPathName to crash. Is there any hard limit within TSystem as I though linux’ file name length is limited by 255 characters.
Just to add: file permissions are set correctly and if I copy the file somewhere else everything works well.

Thanks,
Marcus

Hi Marcus,

Which version of ROOT is this? And where do you see this limitation of 128 characters? I cannot reproduce this…

Does EOS allow you to touch anything in this directory? Does this work, on the shell:
touch /afs/cern.ch/user/m/morgens/eos_atlas/atlas/user/m/morgens/datasets/MultiLepton/ntuples/v2/user.morgens.364112.e5271_s2726_r7772/user.morgens.11027645._000002.hist-output.root?

Axel.

Hi Alex,

it’s root 6.04.16 compiled against gcc 4.9. Touch works. I also just noticed that I posted the wrong file name. It’s actually /afs/cern.ch/user/m/morgens/eos_atlas/atlas/user/m/morgens/datasets/MultiLepton/ntuples/v2/user.morgens.364112.e5271_s2726_r7772_r7676_p2823.ML.v2.0_hist/user.morgens.11027645._000002.hist-output.root
while gSystem->ExpandPathName() reduces it to /afs/cern.ch/user/m/morgens/eos_atlas/atlas/user/m/morgens/datasets/MultiLepton/ntuples/v2/user.morgens.364112.e5271_s2726_r7772 which is 128 characters long. That’s why I thought it might be related somehow.

Thanks,
Marcus

Hi Marcus,

That’s an artifact of the value printing in ROOT 6.04; that was changed in later versions. In 6.04, strings get cut, signaled by a trailing .... If you call printf() you’ll see the full string:

printf("%s\n", gSystem->ExpandPathName("/afs/cern.ch/user/m/morgens/eos_atlas/atlas/user/m/morgens/datasets/MultiLepton/ntuples/v2/user.morgens.364112.e5271_s2726_r7772_r7676_p2823.ML.v2.0_hist/user.morgens.11027645._000002.hist-output.root"))
/afs/cern.ch/user/m/morgens/eos_atlas/atlas/user/m/morgens/datasets/MultiLepton/ntuples/v2/user.morgens.364112.e5271_s2726_r7772_r7676_p2823.ML.v2.0_hist/user.morgens.11027645._000002.hist-output.root
(int) 201

So that’s not it.

How do you determine that you cannot open it in Update mode?

Just for a test, can you copy it some place else and open it there in update mode? I.e. is the an issue with the file location or the file itself?

Axel.

Hi Alex,

good to know. I notice it because TFile::Open returns a null pointer and print this error message
can not be opened (Input/output error)
Opening it with read it is just fine. Also if I copy the file e.g. in my home, it works fine as well. Looking through TFile::Open the problem seems to come from AccessPathName which returns false.

Cheers,
Marcus

Hi Marcus,
Weird! Could you post the precise error message, and the output of ls -l /afs/cern.ch/user/m/morgens/eos_atlas/atlas/user/m/morgens/datasets/MultiLepton/ntuples/v2/user.morgens.364112.e5271_s2726_r7772_r7676_p2823.ML.v2.0_hist/user.morgens.11027645._000002.hist-output.root in the shell?
Axel.

Hi Alex,
indeed. Here the two outputs:

root [0] TFile::Open("/afs/cern.ch/user/m/morgens/eos_atlas/atlas/user/m/morgens/datasets/MultiLepton/ntuples/v2/user.morgens.364112.e5271_s2726_r7772_r7676_p2823.ML.v2.0_hist/user.morgens.11027645._00000SysError in <TFile::TFile>: file /afs/cern.ch/user/m/morgens/eos_atlas/atlas/user/m/morgens/datasets/MultiLepton/ntuples/v2/user.morgens.364112.e5271_s2726_r7772_r7676_p2823.ML.v2.0_hist/user.morgens.11027645._000002.hist-output.root can not be opened (Input/output error)
(class TFile *) 0x0

and

-rwxr-xr-x. 2 morgens zp 416225778 Apr  1 11:58 /afs/cern.ch/user/m/morgens/eos_atlas/atlas/user/m/morgens/datasets/MultiLepton/ntuples/v2/user.morgens.364112.e5271_s2726_r7772_r7676_p2823.ML.v2.0_hist/user.morgens.11027645._000002.hist-output.root

Cheers,
Marcus

This looks all good. @pcanal - do you have an idea?

Or maybe @ganis has an idea?

Hello,

I cannot reproduce the problem on lxplus, same ROOT version, EOS mounted in my HOME directory: I can create a file close it, and updated later on.
When I try to open the file in question I get an ‘Operation not permitted’ error which is expected:

$ root -b
 ------------------------------------------------------------
 | Welcome to ROOT 6.04/16                http://root.cern.ch |
 |                               (c) 1995-2014, The ROOT Team |
 | Built for linuxx8664gcc                                    |
 | From tag v6-04-16, 17 March 2016                           |
 | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
 ------------------------------------------------------------
 
 root [0] auto f = TFile::Open("/afs/cern.ch/user/g/gganis/eos/atlas/user/m/morgens/datasets/MultiLepton/ntuples/v2/user.morgens.364112.e5271_s2726_r7772_r7676_p2823.ML.v2.0_hist/user.morgens.11027645._000002.hist-output.root", "UPDATE")
 SysError in <TFile::TFile>: file /afs/cern.ch/user/g/gganis/eos/atlas/user/m/morgens/datasets/MultiLepton/ntuples/v2/user.morgens.364112.e5271_s2726_r7772_r7676_p2823.ML.v2.0_hist/user.morgens.11027645._000002.hist-output.root can not be opened (Operation not permitted)

I suspect a problem on the EOS side. The error (Input/output error) I think comes from Fuse.
Can you retry after setting

 export EOS_FUSE_DEBUG=1

to see if you get more hints?

Note also that AccessPathName returns false when things are ok. For this file AccessPathName returns false all the possible flags: kReadPermission, kWritePermission, kExecutePermission.

Hi,

thanks a lot for the reply. Indeed, it seems to be an issue with eos. Unfortunately, EOS_FUSE_DEBUG=1 doesn’t print any further information. I tried using auto mounted eos on lxplus and it didn’t work either. Using xrootd, ie. yields this error message:

error in TNetXNGFile::Open: [ERROR] Server responded with an error: [3005] Unable to access quota space /eos/atlas/user/m/morgens/datasets/Tau3Mu/ntuples/WmunuCR/v30/ntuple-data15_13TeV_periodJ_1.root; Machine is not on the network

Is this any helpful? Funny enough, sometimes (not changing) the machine it works, though, but there is no pattern I could figure out when it does work and when not.

Thanks,
Marcus

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.