Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

munmap_chunk(): invalid pointer - only on Linux #2096

Closed
1 task
marcelpinto opened this issue Jul 5, 2024 · 3 comments
Closed
1 task

munmap_chunk(): invalid pointer - only on Linux #2096

marcelpinto opened this issue Jul 5, 2024 · 3 comments
Labels
needs-reproduction This issue needs more information in order to be investigated

Comments

@marcelpinto
Copy link

What version of starlight are you using?

0.25.0

What version of astro are you using?

4.2.3

What package manager are you using?

npm

What operating system are you using?

Linux

What browser are you using?

Chrome

Describe the Bug

I integrated starlight into my existing Astro project. Locally in my Mac everything is fine, but when running the build in the GitHub Actions, I am getting the following error:

generating static routes 
12:13:40 ▶ src/pages/admin.astro
12:13:40   └─ /admin/index.html (+7ms)
12:13:40 ▶ src/pages/blog/tag/[...slug].astro
12:13:40 ▶ src/pages/blog/[...page].astro
munmap_chunk(): invalid pointer
Aborted (core dumped)
12:13:40   └─ /blog/index.html
Error: Process completed with exit code 134.

After some investigation, I think there is some collision or issue with astro-imagetools, probably related to Sharp.

I am using:

"astro-imagetools": "^0.9.0",
"@astrojs/check": "^0.4.1",
"@astrojs/mdx": "^2.0.6",
"@astrojs/rss": "^4.0.3",
"@astrojs/sitemap": "^3.0.5",
"@astrojs/starlight": "^0.25.0",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vue": "^4.0.8",
...
"starlight": "^0.3.9",

Full trace:

> astro build

12:13:29 [types] Added src/env.d.ts type declarations.
12:13:30 [WARN] [vite] [plugin:vite-plugin-astro-expressive-code] context method emitFile() is not supported in serve mode. This plugin is likely not vite-compatible.
12:13:30 [WARN] [vite] [plugin:vite-plugin-astro-expressive-code] context method emitFile() is not supported in serve mode. This plugin is likely not vite-compatible.
12:13:30 [types] Added src/env.d.ts type declarations.
12:13:30 [build] output: "static"
12:13:30 [build] directory: /home/runner/work/../dist/
12:13:30 [build] Collecting build info...
12:13:30 [build] ✓ Completed in 1.19s.
12:13:30 [build] Building static entrypoints...
12:13:30 [types] Added src/env.d.ts type declarations.
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
12:13:36 [astro-icon] Loaded icons from src/icons
12:13:37 [vite] ✓ built in 7.22s
12:13:37 [build] ✓ Completed in 7.27s.

 building client (vite) 
12:13:37 [types] Added src/env.d.ts type declarations.
12:13:37 [vite] transforming...
12:13:39 [vite] ✓ 114 modules transformed.
12:13:40 [vite] rendering chunks...
12:13:40 [vite] computing gzip size...
12:13:40 [vite] dist/_astro/ec.3zb7u.js                                                         2.31 kB
12:13:40 [vite] dist/_astro/_slug_.Dq5OgB2W.css                                                 0.08 kB │ gzip:  0.08 kB
12:13:40 [vite] dist/_astro/ec.d6kn2.css                                                       18.16 kB │ gzip:  3.84 kB
12:13:40 [vite] dist/_astro/_page_.C4lqax6Q.css                                                54.57 kB │ gzip:  8.53 kB
12:13:40 [vite] dist/_astro/page.C66G14YQ.js                                                    0.04 kB │ gzip:  0.06 kB
12:13:40 [vite] dist/_astro/_plugin-vue_export-helper.DlAUqK2U.js                               0.09 kB │ gzip:  0.10 kB
12:13:40 [vite] dist/_astro/index.B3PHcS_o.js                                                   0.14 kB │ gzip:  0.14 kB
12:13:40 [vite] dist/_astro/hoisted.DVY_gcWr.js                                                 0.28 kB │ gzip:  0.[23]
12:13:40 [vite] dist/_astro/BackgroundImage.astro_astro_type_script_index_0_lang.CWa2MAiD.js    0.66 kB │ gzip:  0.46 kB
12:13:40 [vite] dist/_astro/store.UmLrbCO1.js                                                   0.70 kB │ gzip:  0.39 kB
12:13:40 [vite] dist/_astro/VideoDialogBtn.B6XlVut8.js                                          0.71 kB │ gzip:  0.48 kB
12:13:40 [vite] dist/_astro/client.-uZnH2cL.js                                                  1.02 kB │ gzip:  0.64 kB
12:13:40 [vite] dist/_astro/VideoInline.CHYMVXG4.js                                             1.28 kB │ gzip:  0.76 kB
12:13:40 [vite] dist/_astro/ImageNav.B1wDUTQs.js                                                1.81 kB │ gzip:  0.93 kB
12:13:40 [vite] dist/_astro/index.C3gK8y6v.js                                                   2.20 kB │ gzip:  0.98 kB
12:13:40 [vite] dist/_astro/Dialog.BcoPpsMN.js                                                  2.40 kB │ gzip:  1.30 kB
12:13:40 [vite] dist/_astro/NavMobile.DzpYsHzy.js                                               2.59 kB │ gzip:  1.37 kB
12:13:40 [vite] dist/_astro/FaqItem.CH8jlM2B.js                                                 3.03 kB │ gzip:  1.46 kB
12:13:40 [vite] dist/_astro/bodyScrollLock.esm.CT-oBNdc.js                                      3.07 kB │ gzip:  1.18 kB
12:13:40 [vite] dist/_astro/NewsletterFooter.CIxT4Hhb.js                                        3.20 kB │ gzip:  1.65 kB
12:13:40 [vite] dist/_astro/Intersecting.CIPPJkqc.js                                            3.56 kB │ gzip:  1.76 kB
12:13:40 [vite] dist/_astro/Init.DzIf8qvP.js                                                    3.78 kB │ gzip:  1.73 kB
12:13:40 [vite] dist/_astro/Popup.DfeZwOc6.js                                                   3.90 kB │ gzip:  1.87 kB
12:13:40 [vite] dist/_astro/index.Bdgo45Kp.js                                                   4.29 kB │ gzip:  1.93 kB
12:13:40 [vite] dist/_astro/translate.XlwTLKrF.js                                               5.97 kB │ gzip:  2.79 kB
12:13:40 [vite] dist/_astro/Newsletter.D6CGW6wQ.js                                              6.02 kB │ gzip:  2.49 kB
12:13:40 [vite] dist/_astro/index.Cxu1sZTC.js                                                   6.12 kB │ gzip:  2.75 kB
12:13:40 [vite] dist/_astro/Contact.BpJXKKeB.js                                                 6.37 kB │ gzip:  2.60 kB
12:13:40 [vite] dist/_astro/hoisted.DFIxSMNw.js                                                 7.61 kB │ gzip:  2.97 kB
12:13:40 [vite] dist/_astro/Auth.FFrsZiiQ.js                                                    9.39 kB │ gzip:  3.76 kB
12:13:40 [vite] dist/_astro/PanZoom.CY4d6T-3.js                                                10.97 kB │ gzip:  4.[25]
12:13:40 [vite] dist/_astro/hoisted.NWqInuy_.js                                                12.09 kB │ gzip:  4.19 kB
12:13:40 [vite] dist/_astro/Loading.BKDucnn4.js                                                19.15 kB │ gzip:  6.41 kB
12:13:40 [vite] dist/_astro/popper.esm.CBy8_OT3.js                                             [26]
12:13:40 [vite] dist/_astro/ui-core.flL-VmBG.js                                                61.00 kB │ gzip: 20.34 kB
12:13:40 [vite] dist/_astro/index.ClRFj9-v.js                                                  94.82 kB │ gzip: 36.01 kB
12:13:40 [vite] dist/_astro/VideoDialog.C-f92b1C.js                                           114.38 kB │ gzip: 34.39 kB
12:13:40 [vite] ✓ built in 2.[27]

 generating static routes 
12:13:40 ▶ src/pages/admin.astro
12:13:40   └─ /admin/index.html (+7ms)
12:13:40 ▶ src/pages/blog/tag/[...slug].astro
12:13:40 ▶ src/pages/blog/[...page].astro
munmap_chunk(): invalid pointer
Aborted (core dumped)
12:13:40   └─ /blog/index.html
Error: Process completed with exit code 134.

Link to Minimal Reproducible Example

none

Participation

  • I am willing to submit a pull request for this issue.
@delucis
Copy link
Member

delucis commented Jul 5, 2024

Hi @marcelpinto! Would you be able to provide a reproduction? This looks pretty tricky to debug without one.

@delucis delucis added the needs-reproduction This issue needs more information in order to be investigated label Jul 5, 2024
@HiDeoo
Copy link
Member

HiDeoo commented Jul 5, 2024

A potential test to try could also be to update Astro as you seems to be using version 4.2.3:

  • Astro 4.5.15 includes this change disabling sharp libvips cache which seems to cause a similar error message.
  • Starlight 0.25.0 requires at least Astro 4.8.6.

@marcelpinto
Copy link
Author

Sorry for not including an example. I tried to reproduce it by adding starlight to the template I am using, and with their newest version the problem is not reproducible anymore. Among other changes, they increased the astro version, added this:

  "optionalDependencies": {
    "@img/sharp-linux-x64": "^0.33.4",
    "@rollup/rollup-linux-x64-gnu": "4.18.0"
  }

And replaced astro-imagetools with another solution.

I rebased my project with the latest version of the template and now it works. I guess we can close this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-reproduction This issue needs more information in order to be investigated
Projects
None yet
Development

No branches or pull requests

3 participants