Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Cannot run a build, failed to initialize buck (sqlite-jdbc) #2720

Closed
Solace-Studios opened this issue Aug 6, 2022 · 2 comments
Closed

Cannot run a build, failed to initialize buck (sqlite-jdbc) #2720

Solace-Studios opened this issue Aug 6, 2022 · 2 comments

Comments

@Solace-Studios
Copy link

Solace-Studios commented Aug 6, 2022

My machine

  Model Name:	Mac Studio
  Model Identifier:	Mac13,1
  Chip:	Apple M1 Max
  Total Number of Cores:	10 (8 performance and 2 efficiency)
  Memory:	32 GB

Java version

java version "1.8.0_341"
Java(TM) SE Runtime Environment (build 1.8.0_341-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.341-b10, mixed mode)

Can someone explain more what this human readable exception is throwing? My hard drive has plenty of space.
https://github.com/facebook/buck/blob/main/src/com/facebook/buck/util/sqlite/SQLiteUtils.java

  public static synchronized void initialize() {
    boolean success;
    try {
      success = SQLiteJDBCLoader.initialize();
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
    if (!success) {
      throw new HumanReadableException(
          "Failed to initialize Buck (sqlite-jdbc). A common reason is that the disk is full. "
              + "Please try to clean up your disk and try again.");
    }
  }

My terminal output

make project
rm -rf **/*.xcworkspace
rm -rf **/*.xcodeproj
rm -rf buck-out
tools/buck.pex project //App:workspace
Parsing buck files: finished in 1.9 sec
Generating project... 3.8 sec
Building... 0.0 sec
/Users/michaelmanahan/Local Repos/example-buck-ribs-needle/buck-out/tmp/buckd_tmp.7c4tus82/sqlite-unknown-6b2b55d9-c1ba-4b7f-86e5-9ff3a5d1065d-libsqlitejdbc.jnilib (No such file or directory)
/Users/michaelmanahan/Local Repos/example-buck-ribs-needle/buck-out/tmp/buckd_tmp.7c4tus82/sqlite-unknown-80916002-b8cc-4178-9779-82215ac63f3c-libsqlitejdbc.jnilib (No such file or directory)
Parsing buck files: finished in 1.9 sec
Generating project: finished in 3.9 sec (100%)
Building: finished in 0.0 sec (100%) 0/3 jobs, 0 updated
  Total time: 3.9 sec
Buck encountered an internal error
java.lang.RuntimeException: Cannot run a build
	at com.facebook.buck.features.apple.project.XCodeProjectSubCommand.lambda$run$0(XCodeProjectSubCommand.java:153)
	at com.facebook.buck.features.apple.project.XCodeProjectCommandHelper.runXcodeProjectGenerator(XCodeProjectCommandHelper.java:422)
	at com.facebook.buck.features.apple.project.XCodeProjectCommandHelper.parseTargetsAndRunXCodeGenerator(XCodeProjectCommandHelper.java:300)
	at com.facebook.buck.features.apple.project.XCodeProjectSubCommand.run(XCodeProjectSubCommand.java:157)
	at com.facebook.buck.cli.ProjectCommand.runWithoutHelp(ProjectCommand.java:147)
	at com.facebook.buck.cli.AbstractCommand.run(AbstractCommand.java:281)
	at com.facebook.buck.cli.AbstractContainerCommand.run(AbstractContainerCommand.java:90)
	at com.facebook.buck.cli.MainRunner.runMainWithExitCode(MainRunner.java:1448)
	at com.facebook.buck.cli.MainRunner.runMainThenExit(MainRunner.java:476)
	at com.facebook.buck.cli.MainWithNailgun.nailMain(MainWithNailgun.java:77)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.facebook.nailgun.NGSession.runImpl(NGSession.java:313)
	at com.facebook.nailgun.NGSession.run(NGSession.java:199)

Caused by: java.util.concurrent.ExecutionException: com.facebook.buck.core.exceptions.HumanReadableException: Failed to initialize Buck (sqlite-jdbc). A common reason is that the disk is full. Please try to clean up your disk and try again.

	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:528)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:507)
	at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:85)
	at com.facebook.buck.command.Build.waitForBuildToFinish(Build.java:290)
	at com.facebook.buck.command.Build.waitForBuildToFinishAndPrintFailuresToEventBus(Build.java:394)
	at com.facebook.buck.command.Build.executeAndPrintFailuresToEventBus(Build.java:136)
	at com.facebook.buck.command.BuildExecutor.buildTargets(BuildExecutor.java:111)
	at com.facebook.buck.cli.BuildCommand.executeLocalBuild(BuildCommand.java:944)
	at com.facebook.buck.cli.BuildCommand.executeBuildAndProcessResult(BuildCommand.java:514)
	at com.facebook.buck.cli.BuildCommand.run(BuildCommand.java:383)
	at com.facebook.buck.cli.BuildCommand.runWithoutHelpInternal(BuildCommand.java:325)
	at com.facebook.buck.cli.BuildCommand.runWithoutHelp(BuildCommand.java:307)
	at com.facebook.buck.cli.AbstractCommand.run(AbstractCommand.java:281)
	at com.facebook.buck.features.apple.project.XCodeProjectSubCommand.runBuild(XCodeProjectSubCommand.java:208)
	at com.facebook.buck.features.apple.project.XCodeProjectSubCommand.lambda$run$0(XCodeProjectSubCommand.java:151)
	... 15 more

Caused by: com.facebook.buck.core.exceptions.HumanReadableException: Failed to initialize Buck (sqlite-jdbc). A common reason is that the disk is full. Please try to clean up your disk and try again.

        at com.facebook.buck.util.sqlite.SQLiteUtils.initialize(SQLiteUtils.java:40)
	at com.facebook.buck.core.build.engine.buildinfo.SQLiteBuildInfoStore.<init>(SQLiteBuildInfoStore.java:42)
	at com.facebook.buck.core.build.engine.cache.manager.BuildInfoStoreManager.lambda$get$0(BuildInfoStoreManager.java:43)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
	at com.facebook.buck.core.build.engine.cache.manager.BuildInfoStoreManager.get(BuildInfoStoreManager.java:39)
	at com.facebook.buck.core.build.engine.impl.CachingBuildEngine.processBuildRule(CachingBuildEngine.java:470)
	at com.facebook.buck.core.build.engine.impl.CachingBuildEngine.lambda$getBuildRuleResultWithRuntimeDeps$6(CachingBuildEngine.java:358)
	at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:206)
	at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:195)
	at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:115)
	at com.google.common.util.concurrent.MoreExecutors$5$1.run(MoreExecutors.java:999)
	at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submit$2(WeightedListeningExecutorService.java:100)
	at com.facebook.buck.util.concurrent.WeightedListeningExecutorService.lambda$submitWithSemaphore$0(WeightedListeningExecutorService.java:74)
	at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:206)
	at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:195)
	at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:115)
	at com.google.common.util.concurrent.MoreExecutors$5$1.run(MoreExecutors.java:999)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)

make: *** [project] Error 1
@Solace-Studios
Copy link
Author

Solace-Studios commented Aug 6, 2022

@wmeehan @bertmaher I see you wrote the exception here, ce7979b

Could you explain This part of the commit message?

Since most of the time this error is caused by not having space for the .so,
what is this .so file? How should I resolve this?

@Solace-Studios
Copy link
Author

Resolved by clearing buckd, buckout, and Carthage cache directories

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant