quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.75k stars 306 forks source link

Randomly occuring segfault on empty revealjs document #10426

Closed kdheepak closed 2 weeks ago

kdheepak commented 1 month ago

Bug description

I'm getting a randomly occurring segfault on an empty revealjs document:

---
title: "Presentation - Name"
author: "John Doe"
format: revealjs
---

Here's the output I got from the most recent time it happened:

$ quarto preview presentation\ -\ name.qmd
/Users/USERS/Applications/quarto/bin/quarto: line 192: 38119 Segmentation fault: 11  "${QUARTO_DENO}" ${QUARTO_ACTION} ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_MAP_ARG}" "${QUARTO_TARGET}" "$@"

Here's the quarto version number:

$ quarto --version
1.6.3

Steps to reproduce

  1. quarto create project default
  2. Change filename to use revealjs

Expected behavior

No response

Actual behavior

No response

Your environment

No response

Quarto check output

$ quarto check
Quarto 1.6.3
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.6.3
      Path: /Users/USERNAME/Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2024.07.03
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/USERNAME/Library/TinyTeX/bin/universal-darwin
      Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.12.4 (Conda)
      Path: /Users/USERNAME/miniforge3/bin/python
      Jupyter: 5.7.2
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
cderv commented 1 month ago

I never encountered this one. Which OS are you ?

It feels this will be hard to reproduce and I would think this is environment dependant. I suspect we need more informations to hope finding what could cause it.

@cscheid @gordonwoodhull does it ring a bell for you such error ?

Thanks

mcanouil commented 1 month ago

From the paths, I would say it's macOS.

FWIW, I never had a segfault fault in Quarto under any OS.

kdheepak commented 1 month ago

It is macos. I was hoping the line number could help here. This seems to happen more if I ctrl + c a quarto preview and run it again immediately.

kdheepak commented 1 month ago

This is a brand new macOS machine, so I’m not sure if there’s anything particularly special about this environment

cderv commented 1 month ago

I was hoping the line number could help here

This line is the call to deno command that call the quarto.ts main file. So possibly something related to Deno itself.

mcanouil commented 1 month ago

@kdheepak Could you provide more details on your environment? macOS version, how you installed Quarto, etc.

Since you said "brand new macOS machine", I assume you are running on an Apple Silicon CPU thus ARM64.

gordonwoodhull commented 1 month ago

I see deno segfaults on macos (M3 MacBook Pro) but very rarely (less than 1% of the time, and never twice in a row).

I'm usually rendering and not previewing.

It would be nice to have a consistent repro for this!

I tried this example about 20 times in a row and didn't see it.

cderv commented 1 month ago

@mcanouil we need repro, but this could be hard to have one. I think this is among issue that should stay open to compile further report, even if no repro is provided yet. Just mentioning in case we have a way to tell the bot not to close this one as stale.

mcanouil commented 1 month ago

Yes, we are on the same page, but worth making it explicit to avoid closing it in 2/3 weeks. 😉

github-actions[bot] commented 2 weeks ago

Thank you for using Quarto and reporting an issue!

Unfortunately, this issue is now considered stale because it has been opened since 14 days without providing a "working" reproducible example to help us investigate. If you are still facing the issue, please review the "Bug Reports" guide on how to provide a fully reproducible example as a self-contained Quarto document or a link to a Git repository. Without a reproducible example, it is unlikely that the issue will be addressed.

You can share a Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four ````).

````qmd
---
title: "Reproducible Quarto Document"
format: html
---

This is a reproducible Quarto document using `format: html`.
It is written in Markdown and contains embedded R code.
When you run the code, it will produce a plot.

```{r}
plot(cars)

The end.

gordonwoodhull commented 2 weeks ago

I haven't seen a segfault since this conversation last month. I was seeing it rarely but regularly before then.

I don't think we have changed Deno version in that time, but I am inclined to think that it was instability on their side which has passed (?)

I'll reopen if I see this again.