File tree Expand file tree Collapse file tree 5 files changed +45
-0
lines changed
fixtures/libuv_io_uring_fix Expand file tree Collapse file tree 5 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## [ Unreleased]
4
4
5
+ - Setting ` UV_USE_IO_URING=0 ` to disable ` io_uring ` use in ` libuv ` to prevent build timeouts. ([ #1347 ] ( https://github.com/heroku/heroku-buildpack-nodejs/pull/1347 ) )
5
6
6
7
## [ v270] - 2024-11-13
7
8
Original file line number Diff line number Diff line change @@ -64,6 +64,19 @@ export PATH="$BUILD_DIR/.heroku/node/bin:$BUILD_DIR/.heroku/yarn/bin":$PATH
64
64
export COREPACK_HOME=" $BUILD_DIR /.heroku/corepack"
65
65
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
66
66
67
+ # 2024-11-20:
68
+ # We started getting reports on build timeouts on the platform that were unexpected
69
+ # due to the specific versions on Node.js and npm which had been working fine up until
70
+ # this date. After some extensive digging, we believe we narrowed down the cause to
71
+ # a bug in io_uring that affects the Amazon Linux 2023 release. There is a pending fix
72
+ # which will be released around Dec. 9th but, until then, the workaround is set disable
73
+ # the use of io_uring in libuv.
74
+ #
75
+ # See https://github.com/npm/cli/issues/7814#issuecomment-2488626736
76
+ # → https://github.com/amazonlinux/amazon-linux-2023/issues/840#issuecomment-2485782075
77
+ # → https://lore.kernel.org/io-uring/[email protected] /T/#m57570b5f8f2fc00d5a17cfe18ffeeba9fc23a43d
78
+ export UV_USE_IO_URING=${UV_USE_IO_URING:- 0}
79
+
67
80
LOG_FILE=$( mktemp -t node-build-log.XXXXX)
68
81
echo " " > " $LOG_FILE "
69
82
Original file line number Diff line number Diff line change
1
+ A fake README, to keep npm from polluting stderr.
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " libuv-uring-fix" ,
3
+ "version" : " 0.0.1" ,
4
+ "description" : " node buildpack integration test app" ,
5
+ "repository" : {
6
+ "type" : " git" ,
7
+ "url" : " http://github.com/example/example.git"
8
+ },
9
+ "engines" : {
10
+ "node" : " 22.x"
11
+ },
12
+ "scripts" : {
13
+ "build" : " echo \" UV_USE_IO_URING is set to $UV_USE_IO_URING\" "
14
+ }
15
+ }
Original file line number Diff line number Diff line change @@ -2051,6 +2051,21 @@ testConflictingPackageManagerMetadata() {
2051
2051
assertCapturedError
2052
2052
}
2053
2053
2054
+ testDisableIoUringFix () {
2055
+ compile " libuv_io_uring_fix"
2056
+ assertCaptured " UV_USE_IO_URING is set to 0"
2057
+ assertCapturedSuccess
2058
+ }
2059
+
2060
+ testDisableIoUringFixUserOverride () {
2061
+ cache_dir=$( mktmpdir)
2062
+ env_dir=$( mktmpdir)
2063
+ echo " 1" > " $env_dir /UV_USE_IO_URING"
2064
+ compile " libuv_io_uring_fix" " $cache_dir " " $env_dir "
2065
+ assertCaptured " UV_USE_IO_URING is set to 1"
2066
+ assertCapturedSuccess
2067
+ }
2068
+
2054
2069
# Utils
2055
2070
2056
2071
pushd " $( dirname 0) " > /dev/null
You can’t perform that action at this time.
0 commit comments