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.
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?
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.
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:
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.
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.
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
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.
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.