Macaulay2 / Macaulay2/M2

printing is not thread-safe (and leads to failure to allocate a negative number of bytes)

Open
#1,458 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

threads
Dominant language
Macaulay2
Stars
435
Forks
297
Avg merge
4d 20h
Merged PRs (30d)
11

Description

```m2
+ M2 --no-readline --print-width 189 -q
Macaulay2, version 1.16
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases, MinimalPrimes, PrimaryDecomposition, ReesAlgebra, TangentCone, Truncations

i1 : f = () -> while true do print "hi there"

o1 = f

o1 : FunctionClosure

i2 : schedule f
hi there
thi there
sk, running>>o2 = <>

*** out of memory trying to allocate -15 bytes, exiting ***
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the shown Macaulay2 command and session, especially the scheduled function that repeatedly prints. Trace the printing and task interaction to identify the thread-safety failure; done means concurrent printing no longer exits with a negative-byte allocation error.

Written by the indexing model from the issue text.

Assessment

Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.