【问题标题】:SBT forces file system locking, even on distributed file systemsSBT 强制文件系统锁定,即使在分布式文件系统上
【发布时间】:2015-06-18 01:04:48
【问题描述】:

我打算在我们大学的高性能计算集群(它使用 Lustre 文件系统)上运行一个使用 SBT 的扩展测试套件。

由于我拥有非常基本的用户权限,我只能尝试手动安装并通过解压缩 tarball 进行安装。

即使使用-Dsbt.boot.lock=false,我也会得到以下堆栈跟踪:

java.io.IOException: Function not implemented
    at sun.nio.ch.FileDispatcherImpl.lock0(Native Method)
    at sun.nio.ch.FileDispatcherImpl.lock(FileDispatcherImpl.java:89)
    at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1024)
    at java.nio.channels.FileChannel.tryLock(FileChannel.java:1154)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:86)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
    at xsbt.boot.Using$.withResource(Using.scala:10)
    at xsbt.boot.Using$.apply(Using.scala:9)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at xsbt.boot.Launch.locked(Launch.scala:238)
    at xsbt.boot.Launch.app(Launch.scala:147)
    at xsbt.boot.Launch.app(Launch.scala:145)
    at xsbt.boot.Launch$.run(Launch.scala:102)
    at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
    at xsbt.boot.Launch$.launch(Launch.scala:117)
    at xsbt.boot.Launch$.apply(Launch.scala:18)
    at xsbt.boot.Boot$.runImpl(Boot.scala:41)
    at xsbt.boot.Boot$.main(Boot.scala:17)
    at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.io.IOException: Function not implemented

问题在于 Lustre 和 NFS 等并行分布式文件系统没有实现lock0,但 SBT 似乎依赖它。

无法在高性能集群上运行我的测试套件是一个巨大的劣势,因为在我的 Intel i5、7200 rpm HDD 笔记本电脑(这是我唯一的选择)上运行测试套件至少需要 6 小时。除了分布式文件系统,我无权访问任何文件系统,因此不能将引导目录放在其他位置。

我原本打算将此作为问题提交到 GitHub,但社区准则表明,在 StackOverflow 上发布问题是解决此类特定问题的更好选择。

我最终在笔记本电脑上通宵运行测试,但对此我不是很满意。除非这个问题得到解决,否则我将无法继续使用 SBT 来研究基于参与者的测试。

【问题讨论】:

  • > 我本来打算将此作为问题提交到 GitHub 上,但社区指南表明,在 StackOverflow 上发布问题是解决此类问题的更好选择。随时为功能请求和错误报告打开 Github 问题。现在有一个案例 - github.com/sbt/sbt/issues/2222

标签: sbt nfs lustre


【解决方案1】:

您需要使用-o flock 挂载客户端才能启用分布式锁定。

【讨论】:

    猜你喜欢
    • 2016-07-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-28
    • 1970-01-01
    • 2018-08-25
    • 2012-06-23
    • 2013-01-20
    相关资源
    最近更新 更多