LoginSignup
0
0

gitするとstale fileエラーが出る

Last updated at Posted at 2023-04-06

症状

linuxのqueueシステムで長大計算をしているときに,

cat job_file.e13023
FILE :in `p': Stale file handle @ rb_io_flush_raw - <STDOUT> (Errno::ESTALE)

なるエラーを吐いて,ジョブが中断されます.

原因

gitでpull.rebaseでやっているときにおかしくなります.

対策

  1. 長大計算のdirectoryはgitしない!
  2. mergeだとOK? -> !

詳細

linux上でqueueに長大計算させている時に,jobが中断されることが発生しました.Errorが記録されるのが,

bob@asura0 ~/n/frenkel (main)> ls -lat */*.e* 
-rw-r--r-- 1 bob users 408  4月  4 16:40 v096_l050_r0_t700/fp3_4k_096.e13027
-rw-r--r-- 1 bob users 408  4月  4 16:40 v096_l000_r0_t700/fp3_4k_096.e13025
-rw-r--r-- 1 bob users 408  4月  4 16:40 v096_l000_r0_t500/fp3_4k_096.e13024
-rw-r--r-- 1 bob users 408  4月  4 16:40 v096_l000_r0_t900/fp3_4k_096.e13023
-rw-r--r-- 1 bob users 408  4月  4 16:39 v096_l050_r0_t900/fp3_4k_096.e13026
-rw-r--r-- 1 bob users 408  4月  4 16:39 v096_l050_r0_t500/fp3_4k_096.e13028
-rw-r--r-- 1 bob users   0  4月  4 16:39 i8k_v096_l100_r0_t900/fp3_8k_v096.e13029

と,一斉に止まりますが,jobによって中断時期が不確定でapplicationのバグと思えなかったのです.

で,gitの同期をかけているので怪しいと思って実験をしてみると,

> git pull origin main                           (base) 
> qstat -f
all.q@asura1                   BIP   0/64/64        64.03    linux-x64
  13032 0.60500 fp3_4k_096 bob          r     04/06/2023 14:52:50    64
> ls -lat */*.e*
-rw-r--r-- 1 bob users   0  4月  6 14:57 v096_l1000_r1_t500/fp3_4k_096.e13037
> ls -lat */*.e*
-rw-r--r-- 1 bob users 408  4月  6 16:12 v096_l1000_r1_t500/fp3_4k_096.e13037

となります.

> git config -l
pull.rebase=true

となっているのが原因かな.Fileを書き換えるので,i-nodeが変わるようです.

> git config --global pull.merge true
> git config --global pull.rebase false
> git config -l
pull.rebase=false
pull.merge=true

として計算をqsubしたのちにgit pullをかけたところ

> git pull origin main
> date
2023年  4月  6日 木曜日 16:40:30 JST
> ls -lat
-rw-r--r--  1 bob users  29500  4月  6 16:41 fp3_l100_r1_t900.o13038
-rw-r--r--  1 bob users      0  4月  6 16:36 fp3_l100_r1_t900.e13038

と無事計算が進みました.やれやれ.


  • source ~/current_research/higher_moment/new_moment_al/docs/Qiita_git_file_stale.org
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0