google / closure-compiler-npm

Package for managing and documenting closure-compiler for use via npm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

google-closure-compiler-osx crashes on Ventura

gonfunko opened this issue · comments

npm run build:compiled in Blockly, which depends on Closure, is failing on a macOS Ventura machine with the following output:

[15:02:04] Using gulpfile ~/Developer/blockly/gulpfile.js
[15:02:04] Starting 'buildCompiled'...
[15:02:06] gulp-google-closure-compiler: Error writing to stdin of the compiler. write EPIPE
[15:02:06] 'buildCompiled' errored after 2.09 s
[15:02:06] Error in plugin 'gulp-google-closure-compiler'
Message:
    Compilation errors occurred
Details:
    domainEmitter: [object Object]
    domainThrown: false

This causes a crashlog (attached) for the google-closure-compiler-osx binary to be generated, and running ./compiler directly fails with fish: Job 1, './compiler' terminated by signal SIGSEGV (Address boundary error) and an accompanying crashlog.
compiler-2022-10-28-150211.txt

What version are you using? I've been using MacOS Ventura for about 3 months without issue.

Also - what architecture Mac are you experiencing this on? (are you on an M1)

I saw this behavior on both a 2019 Intel iMac and an M1 Mac Studio, but it worked on an M1 MacBook Pro that was still on Monterey.

Can confirm this. I'm on a 2018 i7 with Ventura.

$ node_modules/google-closure-compiler-osx/compiler

[1]    43748 segmentation fault  node_modules/google-closure-compiler-osx/compiler

I'm not able to recreate this issue. The downloaded binaries are executing just fine for me (using an M1). I am on Ventura 13.1 Beta, but it seems odd that would make a difference.

You might try looking at different versions and seeing if any of the older release versions work. It would be interesting to know what version this started occurring with.

You might also try the Mac OS version found at the bottom of this build: https://github.com/google/closure-compiler-npm/actions/runs/3427942157

Same with an older version 20220502.0.0. The version at the bottom of that page segfaults too.

I wonder why this is, could it be related to XCode or homebrew libs? I'm on XCode 14.1 (14B47b). The compiler is stat-linked, so it's quite surprising...

Same here, tried with version 20220601.0.0, 20221004.0.0 and 20221102.0.0.

Machine is a Mac mini with Intel Core i7 CPU.

I've been running on Ventura betas without issue since mid-July. However I do have other packages installed via homebrew so its possible this is indeed a library issue. I haven't seen any similar issues on the Graal github repo to help.

Based off your testing, it seems that the Graal version itself is not the issue.

You might try the MacOS build of the compiler found on this job: https://github.com/google/closure-compiler-npm/actions/runs/3470878098

I have no idea whether that will make a difference or not, but its about the only thing else I can think to try.

Same, segmentation fault...

I'm wondering if this is upx upx/upx#612

we could give it a shot!

./compiler --version
Closure Compiler (http://github.com/google/closure-compiler)
Version: v20221102

it works!

I can confirm it's working now as well, thanks for tracking this down!

Can we please get a new release with this?
Thank you.

Fixed by #274

I created a patch release for this.