File tree Expand file tree Collapse file tree 5 files changed +46
-0
lines changed
fixtures/libuv_io_uring_fix Expand file tree Collapse file tree 5 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## main
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 ) )
6
+
5
7
## v232 (2023-12-07)
6
8
7
9
- Added Node.js version 21.4.0.
Original file line number Diff line number Diff line change @@ -61,6 +61,19 @@ source "$BP_DIR/lib/yarn-2.sh"
61
61
62
62
export PATH=" $BUILD_DIR /.heroku/node/bin:$BUILD_DIR /.heroku/yarn/bin" :$PATH
63
63
64
+ # 2024-11-20:
65
+ # We started getting reports on build timeouts on the platform that were unexpected
66
+ # due to the specific versions on Node.js and npm which had been working fine up until
67
+ # this date. After some extensive digging, we believe we narrowed down the cause to
68
+ # a bug in io_uring that affects the Amazon Linux 2023 release. There is a pending fix
69
+ # which will be released around Dec. 9th but, until then, the workaround is set disable
70
+ # the use of io_uring in libuv.
71
+ #
72
+ # See https://github.com/npm/cli/issues/7814#issuecomment-2488626736
73
+ # → https://github.com/amazonlinux/amazon-linux-2023/issues/840#issuecomment-2485782075
74
+ # → https://lore.kernel.org/io-uring/[email protected] /T/#m57570b5f8f2fc00d5a17cfe18ffeeba9fc23a43d
75
+ export UV_USE_IO_URING=${UV_USE_IO_URING:- 0}
76
+
64
77
LOG_FILE=$( mktemp -t node-build-log.XXXXX)
65
78
echo " " > " $LOG_FILE "
66
79
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 @@ -1535,6 +1535,21 @@ testUseNpm10() {
1535
1535
assertCapturedSuccess
1536
1536
}
1537
1537
1538
+ testDisableIoUringFix () {
1539
+ compile " libuv_io_uring_fix"
1540
+ assertCaptured " UV_USE_IO_URING is set to 0"
1541
+ assertCapturedSuccess
1542
+ }
1543
+
1544
+ testDisableIoUringFixUserOverride () {
1545
+ cache_dir=$( mktmpdir)
1546
+ env_dir=$( mktmpdir)
1547
+ echo " 1" > " $env_dir /UV_USE_IO_URING"
1548
+ compile " libuv_io_uring_fix" " $cache_dir " " $env_dir "
1549
+ assertCaptured " UV_USE_IO_URING is set to 1"
1550
+ assertCapturedSuccess
1551
+ }
1552
+
1538
1553
# Utils
1539
1554
1540
1555
pushd " $( dirname 0) " > /dev/null
You can’t perform that action at this time.
0 commit comments