Closed ytchenak closed 1 month ago
Confirmed. I used to be able to serve 2 different applications that rely on the same libraries at the same time (so that I can debug them simultaneously) and now when trying to launch the 2nd one I get ...
NX disk I/O error
and verbose tells me nothing except that the exit code is 1.
UPDATE: I am also on 19.8.4 UPDATE2: So now I just realized that this is affecting me as I started working on a task that requires me to run an angular web app and a node app at the same time (client/server). This time I tried to run the 2nd with --verbose and got the following....
NX disk I/O error
Error: disk I/O error at /home/ken/dev/animalus/animalus/node_modules/nx/src/utils/db-connection.js:11:93 at getEntryOrSet (/home/ken/dev/animalus/animalus/node_modules/nx/src/utils/db-connection.js:19:17) at getDbConnection (/home/ken/dev/animalus/animalus/node_modules/nx/src/utils/db-connection.js:11:24) at getTaskDetails (/home/ken/dev/animalus/animalus/node_modules/nx/src/hasher/hash-task.js:19:84) at invokeTasksRunner (/home/ken/dev/animalus/animalus/node_modules/nx/src/tasks-runner/run-command.js:367:56) at runCommandForTasks (/home/ken/dev/animalus/animalus/node_modules/nx/src/tasks-runner/run-command.js:117:31) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /home/ken/dev/animalus/animalus/node_modules/nx/src/tasks-runner/run-command.js:105:29 at async handleErrors (/home/ken/dev/animalus/animalus/node_modules/nx/src/utils/handle-errors.js:9:24) at async runCommand (/home/ken/dev/animalus/animalus/node_modules/nx/src/tasks-runner/run-command.js:104:20)
... though I can't find a point in the db-connections.js git history for which these line numbers make sense. But maybe it's helpful to you.
I found the issue and created a pull request.
@ytchenak @crowmagnumb Can you try the latest 19.8.6 patch release? It includes a patch for the DB connection. https://github.com/nrwl/nx/pull/28507#issuecomment-2422917809
happens to me as well but on v20.0.3:
Error: disk I/O error
at /Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/utils/db-connection.js:11:93
at getEntryOrSet (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/utils/db-connection.js:19:17)
at getDbConnection (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/utils/db-connection.js:11:24)
at getTaskDetails (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/hasher/hash-task.js:19:84)
at invokeTasksRunner (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/tasks-runner/run-command.js:367:56)
at runCommandForTasks (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/tasks-runner/run-command.js:117:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/tasks-runner/run-command.js:105:29
at async handleErrors (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/utils/handle-errors.js:9:24)
at async runCommand (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/tasks-runner/run-command.js:104:20)
We are experiencing this issue as well. We updated to Nx 20.0.1
coming from 19.6.5
from that moment onwards the issue occurred. The errors are thrown when our agents are running the lint, test and build commands.
happens to me as well but on v20.0.3:
Error: disk I/O error at /Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/utils/db-connection.js:11:93 at getEntryOrSet (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/utils/db-connection.js:19:17) at getDbConnection (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/utils/db-connection.js:11:24) at getTaskDetails (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/hasher/hash-task.js:19:84) at invokeTasksRunner (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/tasks-runner/run-command.js:367:56) at runCommandForTasks (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/tasks-runner/run-command.js:117:31) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/tasks-runner/run-command.js:105:29 at async handleErrors (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/utils/handle-errors.js:9:24) at async runCommand (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/tasks-runner/run-command.js:104:20)
we are experiencing this as well when running tasks
I'm experiencing the same issue, but on version 20.0.3.
`Error: disk I/O error
at /Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/utils/db-connection.js:11:93
at getEntryOrSet (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/utils/db-connection.js:19:17)
at getDbConnection (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/utils/db-connection.js:11:24)
at getTaskDetails (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/hasher/hash-task.js:19:84)
at invokeTasksRunner (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/tasks-runner/run-command.js:367:56)
at runCommandForTasks (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/tasks-runner/run-command.js:117:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/tasks-runner/run-command.js:105:29
at async handleErrors (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/utils/handle-errors.js:9:24)
at async runCommand (/Users/fakegod/Documents/Proj/node_modules/.pnpm/nx@20.0.3_@swc-node+register@1.9.2_@swc+core@1.5.7_@swc+helpers@0.5.11__@swc+types@0.1.7_type_cxohwuiq2lf5alcyvrfldxcl4e/node_modules/nx/src/tasks-runner/run-command.js:104:20)`
Hey all, can you try using this version and see if the issue still persists?
nx@0.0.0-pr-28544-c9de3c0
Also, can you run the nx commands with this set NX_NATIVE_LOGGING=nx
. There will be a bunch of logs when running any nx commands, so try saving the output to a file.
My dependencies are ... "@nx/angular": "19.8.6", "@nx/cypress": "19.8.6", "@nx/esbuild": "19.8.6", "@nx/eslint": "19.8.6", "@nx/eslint-plugin": "19.8.6", "@nx/express": "19.8.6", "@nx/jest": "19.8.6", "@nx/js": "19.8.6", "@nx/node": "19.8.6", "@nx/workspace": "19.8.6", ... which would I have to upgrade to your version above? Just nx/workspace?
Also, can you run the nx commands with this set
NX_NATIVE_LOGGING=nx
. There will be a bunch of logs when running any nx commands, so try saving the output to a file.
Installed nx@0.0.0-pr-28544-c9de3c0
, attaching below the end of the output file, now it seems that I'm getting a different error TypeError: Cannot read properties of undefined (reading 'cacheError')
.
TRACE nx::native::cache::cache: GET 4568491116804863582
TRACE nx::native::db::connection: Error in query_row: QueryReturnedNoRows
TRACE nx::native::cache::cache: GET 4568491116804863582 47.084µs
TRACE nx::native::cache::cache: GET 1116164664999884731
TRACE nx::native::db::connection: Error in query_row: QueryReturnedNoRows
TRACE nx::native::cache::cache: GET 1116164664999884731 22µs
TRACE nx::native::cache::cache: GET 17502134106171772157
TRACE nx::native::db::connection: Error in query_row: QueryReturnedNoRows
TRACE nx::native::cache::cache: GET 17502134106171772157 18.833µs
[0m[7m[1m[32m NX [39m[22m[27m[0m [32mSuccessfully ran target [1mlint[22m for 63 projects[39m
[0m[7m[1m[31m NX [39m[22m[27m[0m [31mCannot read properties of undefined (reading 'cacheError')[39m
Pass --verbose to see the stacktrace.
ELIFECYCLE Command failed with exit code 1.
Also seeing this issue
UPDATE:
Installing nx@0.0.0-pr-28544-c9de3c0
seems to have done the trick! 🎉
My dependencies are ... "@nx/angular": "19.8.6", "@nx/cypress": "19.8.6", "@nx/esbuild": "19.8.6", "@nx/eslint": "19.8.6", "@nx/eslint-plugin": "19.8.6", "@nx/express": "19.8.6", "@nx/jest": "19.8.6", "@nx/js": "19.8.6", "@nx/node": "19.8.6", "@nx/workspace": "19.8.6", ... which would I have to upgrade to your version above? Just nx/workspace?
Keep all of the nx packages in sync.
Also, can you run the nx commands with this set
NX_NATIVE_LOGGING=nx
. There will be a bunch of logs when running any nx commands, so try saving the output to a file.Installed
nx@0.0.0-pr-28544-c9de3c0
, attaching below the end of the output file, now it seems that I'm getting a different errorTypeError: Cannot read properties of undefined (reading 'cacheError')
.TRACE nx::native::cache::cache: GET 4568491116804863582 TRACE nx::native::db::connection: Error in query_row: QueryReturnedNoRows TRACE nx::native::cache::cache: GET 4568491116804863582 47.084µs TRACE nx::native::cache::cache: GET 1116164664999884731 TRACE nx::native::db::connection: Error in query_row: QueryReturnedNoRows TRACE nx::native::cache::cache: GET 1116164664999884731 22µs TRACE nx::native::cache::cache: GET 17502134106171772157 TRACE nx::native::db::connection: Error in query_row: QueryReturnedNoRows TRACE nx::native::cache::cache: GET 17502134106171772157 18.833µs �[0m�[7m�[1m�[32m NX �[39m�[22m�[27m�[0m �[32mSuccessfully ran target �[1mlint�[22m for 63 projects�[39m �[0m�[7m�[1m�[31m NX �[39m�[22m�[27m�[0m �[31mCannot read properties of undefined (reading 'cacheError')�[39m Pass --verbose to see the stacktrace. ELIFECYCLE Command failed with exit code 1.
This looks like you might have the nx-cloud
package installed in your deps. You should be able to remove that dep, and things should be working. Nx Cloud will automatically download the latest bundle, so all fixes are in sync with the client and the app.
Aaah, If I install 19.8.6 of all the @nx/XXX (as noted above) it implicitly installs nx version 20.0.2 and I have the problem.
If I add another explicit line to install nx@19.8.6 then the problem goes away. So 19.8.6 does fix it for me after all. I guess I should keep this explicit nx version to match my @nx/XXX versions.
By the way, if I use the pr version above, I have a problem, albeit a different one (again while running a 2nd task only). But I'm not sure I'm worried about that? But maybe you are? :) Here is what that gives me.
TypeError: Cannot read properties of undefined (reading 'cacheError')
at td.retrieve (/home/ken/dev/animalus/animalus2/.nx/cache/cloud/2409.26.3.hotfix20/index.js:32:3253)
at DbCache.get (/home/ken/dev/animalus/animalus2/node_modules/nx/src/tasks-runner/cache.js:61:48)
at TaskOrchestrator.applyCachedResult (/home/ken/dev/animalus/animalus2/node_modules/nx/src/tasks-runner/task-orchestrator.js:131:47)
at /home/ken/dev/animalus/animalus2/node_modules/nx/src/tasks-runner/task-orchestrator.js:126:70
at Array.map (
Aaah, If I install 19.8.6 of all the @nx/XXX (as noted above) it implicitly installs nx version 20.0.2 and I have the problem.
If I add another explicit line to install nx@19.8.6 then the problem goes away. So 19.8.6 does fix it for me after all. I guess I should keep this explicit nx version to match my @nx/XXX versions.
By the way, if I use the pr version above, I have a problem, albeit a different one (again while running a 2nd task only). But I'm not sure I'm worried about that? But maybe you are? :) Here is what that gives me.
TypeError: Cannot read properties of undefined (reading 'cacheError') at td.retrieve (/home/ken/dev/animalus/animalus2/.nx/cache/cloud/2409.26.3.hotfix20/index.js:32:3253) at DbCache.get (/home/ken/dev/animalus/animalus2/node_modules/nx/src/tasks-runner/cache.js:61:48) at TaskOrchestrator.applyCachedResult (/home/ken/dev/animalus/animalus2/node_modules/nx/src/tasks-runner/task-orchestrator.js:131:47) at /home/ken/dev/animalus/animalus2/node_modules/nx/src/tasks-runner/task-orchestrator.js:126:70 at Array.map () at TaskOrchestrator.applyCachedResults (/home/ken/dev/animalus/animalus2/node_modules/nx/src/tasks-runner/task-orchestrator.js:126:54) at TaskOrchestrator.applyFromCacheOrRunTask (/home/ken/dev/animalus/animalus2/node_modules/nx/src/tasks-runner/task-orchestrator.js:219:51) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async TaskOrchestrator.executeNextBatchOfTasksUsingTaskSchedule (/home/ken/dev/animalus/animalus2/node_modules/nx/src/tasks-runner/task-orchestrator.js:85:13) at async Promise.all (index 0)
Also, I am nowhere explicitly installing nx-cloud. The only reference that I can find to that in my code is an "nxCloudAccessToken" in the nx.json
file.
I've had the same error. The fix was to delete the .nx
folder.
Current Behavior
Parallel tasks have started failing with the error: "NX disk I/O error"
Expected Behavior
Parallel tests have to be finished without error
GitHub Repo
No response
Steps to Reproduce
Nx Report
Node : 20.18.0 OS : win32-x64 Native Target : x86_64-windows pnpm : 9.12.1
nx (global) : 19.8.4 nx : 19.8.4 @nx/js : 19.8.4 @nx/jest : 19.8.4 @nx/linter : 19.8.4 @nx/eslint : 19.8.4 @nx/workspace : 19.8.4 @nx/angular : 19.8.4 @nx/eslint-plugin : 19.8.4 typescript : 5.5.4
Community plugins: @ngneat/spectator : 19.0.0 ng-mocks : 14.13.1 ngx-bootstrap : 18.0.2 nx-stylelint : 17.1.5
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
The issue persists also in version 19.8.4 after fix #28035 with the error "NX disk I/O error." I believe the error originates from SQLite, which is used in the .nx/workspace-data directory. It seems the SQLite files are not well-protected against concurrent write access, even though the directory contains a lockfile.hash file.
In my scenario, I am running two separate processes: one for build and one for lint, using the following commands:
pnpm nx run-many -t build pnpm nx run-many -t lint These processes are executed from different Jenkins agents.