Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • V verify
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ran.lu
  • verify
  • Wiki
  • 【百信现场】代码开发里面git push 失败

Last edited by ran.lu Nov 24, 2022
Page history
This is an old version of this page. You can view the most recent version or browse the history.

【百信现场】代码开发里面git push 失败

现象

【【171】【AIARTS】【百信现场】代码开发里面git push 失败】https://www.tapd.cn/42483287/bugtrace/bugs/view?bug_id=1142483287001007608

百信现场,在代码开发中 git push 失败。

org-dev@dev-d09e033f-989f-45f2-858c-ab591110b265-vxsld:~/code$ git push
Counting objects: 98, done.
Delta compression using up to 192 threads.
Compressing objects: 100% (94/94), done.
remote: error: file write error: Bad file descriptor
remote: fatal: unable to write loose object file
error: remote unpack failed: unpack-objects abnormal exit
error: failed to push some refs to 'git@gitea-ssh.apulis:gitea/ouc68z1NTiC02V7Z0mTAbg.git'

百信现场是 2 节点的 arm 环境。

具体步骤

连上集群:

ssh -p 8886 root@220.194.147.64 100Trust!@

ssh root@192.3.21.217    

连上代码开发:

ssh -p 34221 org-dev@192.3.21.217  密码是 Nwo7jvCW

在 code 目录下, git add 一个大文件(比如十几 MB ),然后 git push ,就可看到问题现象。

尝试复现未果

@linwei 尝试复现

  • 在 gpu02 上,没有出现
  • 在 3.172 上,把 gitea 调度到 arm 节点,也没有出现问题

分析

1.

注意, git add + git push 小文件,是正常的。

2.

报错是 remote, 说明是服务端的错误。

一些改客户端参数的做法,可能就不太有用?

3. strace 日志

gitea ssh 进程的 strace :

1237051 15:51:01.193577 openat(AT_FDCWD, "/data/git/gitea-repositories/gitea/ouc68z1ntic02v7z0mtabg.git/./objects/incoming-oEoffE/b3/tmp_obj_XwYObm", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0444) = 3 <0.033109>
……  ( 省略许多日志,大多是 write 写数据)
1237051 15:51:03.343265 write(3, "\333\204\202\221Z;:\273\250Y\272\2|R\272P\214_\355\353\316\3060@\f\355kQp;or"..., 4096) = 4096 <0.000015>
1237051 15:51:03.343948 write(3, "\35\372n\3549\325,x\314`\r\35\3656\301\33\241\373\225C\5'9\304\257\200\335\321\275l\23,"..., 4096) = -1 EBADF (Bad file descriptor) <0.000015>
1237051 15:51:03.344096 write(2, "error: file write error: Bad fil"..., 45) = 45 <0.000024>

可以看到,这个 1237051 进程,打开一个文件,成功写入数据了一段时间,然后又报错 -1 EBADF (Bad file descriptor)

4.

发现, gitea 应该是调用 git-receive-pack 去收文件。

5.

dmesg 有较多日志:

NFS: nfs4_reclaim_open_state: Lock reclaim failed!

所以有怀疑过 nfs 是不是有问题。

所以在 gitea pod 里面用 dd 写文件,并没有问题。

6

使用 dd 准备文件时,不要写全 0 文件:全 0 文件,是可以 git add push 的。估计是有压缩?

要用随机文件,就可以复现问题:

dd if=/dev/urandom  of=test bs=1M count=70
Clone repository
  • 3.137 环境 websocket 连接失败,其它环境无此问题
  • 3.137 环境,即使使用 env 中的 grafana 密码,都无法登陆;测试环境则可以
  • 3.172 不定期出现“疯狂写盘”
  • [2022 11 17] 本地数据集要在 slurm|superpodk8s 上面使用
  • [TODO] 合入日志加速发动
  • [build] 加快 SDK 打包
  • [info] 平台日志
  • [优化] ai arts 调用 aim 时,设置超时时间
  • [问题] aim SDK, 连不上 rpc 时会报错?这不能达到无感知
  • [问题] aimstack 有时会很慢
  • [问题] desay 171 部署: 单个训练成功, 收到 2 次调用, 一次训练成功, 一次训练失败
  • [问题] 收集到的日志只有几个服务。问题: 这个是哪里配置的?
  • aim SDK 支持 tensorboard 日志
  • aim SDK 瘦身
  • gpu02环境 选择 推理模型目录 很慢
View All Pages