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

Segfault when using repeated curl::send_mail() within Github Actions #964

Open
ummel opened this issue Jan 29, 2025 · 0 comments
Open

Segfault when using repeated curl::send_mail() within Github Actions #964

ummel opened this issue Jan 29, 2025 · 0 comments

Comments

@ummel
Copy link

ummel commented Jan 29, 2025

This is probably not the appropriate place to report this issue, but I'm not sure where else to ask.

I am running a simple R script in Github Actions that uses a for() loop at the end to send a series of emails via curl::send_mail().

The script executes without issue on my local machine. When called within a Github Actions workflow, it successfully sends the first email in the for() loop and then fails on the second call to curl::send_mail() and reports the following segfault error:

*** caught segfault ***
address (nil), cause 'unknown'

Traceback:
 1: curl_fetch_memory(smtp_server, handle = h)
 2: curl::send_mail(mail_from = unname(from), mail_rcpt = unname(c(to,     cc, bcc)), message = email_qp, smtp_server = paste0(credentials$host,     ":", credentials$port), use_ssl = credentials$use_ssl %||%     TRUE, verbose = verbose, username = credentials$user, password = credentials$password,     login_options = login_options, ...)
 3: smtp_send(email = m, ...)
 4: eval(ei, envir)
 5: eval(ei, envir)
 6: withVisible(eval(ei, envir))
 7: source("news_summarizer.R")
An irrecoverable exception occurred. R is aborting now ...
/home/runner/work/_temp/293d5b38-2844-48a5-80b9-9c7e930667f2.sh: line 1:  6438 Segmentation fault      (core dumped) Rscript -e 'source("news_summarizer.R")'
Error: Process completed with exit code 139.

I don't think there is anything wrong with my workflow .yaml file, which is pretty straightforward:

on:
  push:
    branches: main

jobs:
  summarize-news:
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository
        uses: actions/checkout@v4
      
      - name: Set up R
        uses: r-lib/actions/setup-r@v2  # See here: https://github.com/r-lib/actions
        
      - name: Install packages
        uses: r-lib/actions/setup-r-dependencies@v2
        with:
          packages: |
            any::googlesheets4
            any::dplyr
            any::rvest
            any::stringr
            any::ellmer
            any::jsonlite
            any::blastula

      - name: Run script
        run: Rscript -e 'source("news_summarizer.R")'

Does anyone have any ideas about what might cause this? It appears the issue is specific to the GitHub Actions environment. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant