chapel icon indicating copy to clipboard operation
chapel copied to clipboard

Segfaults when using AtomicObjects or Regex+IO with `CHPL_ATOMICS=locks`

Open jabraham17 opened this issue 6 months ago • 0 comments

Running a paratest on linux64 with CHPL_ATOMICS=locks revealed a bunch of failures.

failing tests
test/chplenv/autocomplete/autocomplete.chpl
test/io/tzakian/recordReader/test.chpl
test/library/packages/ConcurrentMap/memLeakTests/testAddSet.chpl
test/library/packages/ConcurrentMap/memLeakTests/testClear.chpl
test/library/packages/ConcurrentMap/memLeakTests/testEquality.chpl
test/library/packages/ConcurrentMap/memLeakTests/testGetRemove.chpl
test/library/packages/ConcurrentMap/testAddSet.chpl
test/library/packages/ConcurrentMap/testClear.chpl
test/library/packages/ConcurrentMap/testContains.chpl
test/library/packages/ConcurrentMap/testEquality.chpl
test/library/packages/ConcurrentMap/testExtend.chpl
test/library/packages/ConcurrentMap/testGetRemove.chpl
test/library/packages/EpochManager/atomicObjects/atomicObjectsTest.chpl
test/library/packages/LockFreeQueue/consistencyCheck.chpl
test/library/packages/LockFreeQueue/interleavedTest.chpl
test/library/packages/LockFreeQueue/memLeaks/consistencyCheck.chpl
test/library/packages/LockFreeStack/consistencyCheck.chpl
test/library/packages/LockFreeStack/interleavedTest.chpl
test/library/packages/LockFreeStack/memLeaks/consistencyCheck.chpl
test/library/standard/IO/readThrough/regex/readCommaOrNewline.chpl
test/library/standard/IO/readThrough/regex/readThroughMaxSizeBytes.chpl
test/library/standard/IO/readThrough/regex/readThroughUrls.chpl
test/library/standard/IO/readTo/regex/readToMaxSizeBytes.chpl
test/regex/bytes/nonUTFIO.chpl
test/regex/defaultInitializer.chpl
test/regex/empty-channel-matches.chpl
test/regex/ferguson/bug-16891.chpl
test/regex/ferguson/readfinf.chpl
test/regex/ferguson/readfre.chpl
test/regex/ferguson/rechan.chpl
test/studies/1brc/concurrentMapVer.chpl
test/unstableAnonScript/scriptTest.chpl
test/unstableAnonScript/specialCases/anyPragma.chpl
test/unstableAnonScript/specialCases/constArgs.chpl
test/unstableAnonScript/specialCases/leadingUnderscore.chpl
test/unstableAnonScript/specialCases/tertiary-import.chpl
test/unstableAnonScript/specialCases/tertiary-use.chpl
test/unstableAnonScript/specialCases/unstable-chpl_.chpl

These tests seem to have a common failure point of either using the AtomicObjects package module or using Chapel's Regex support on IO objects (e.g. fileReader.readThrough(regex)). This is not particularly concerning (since CHPL_ATOMICS=locks is only for maximum portability on platforms with atomics support), but is a big hole in Chapel's support when CHPL_ATOMICS=locks.

Currently in nightly testing we only test the following directories in this configuration.

  • test/release/examples/
  • test/runtime/configMatters/
  • test/types/atomic/

When resolving this issue, nightly testing with CHPL_ATOMICS=locks should be expanded to prevent this kind of regression again

To replicate this issue, use the following Chapel env (the default + CHPL_ATOMICS=locks) and compile and run any of the above tests.

chplenv

CHPL_TARGET_PLATFORM: linux64
CHPL_TARGET_COMPILER: llvm
CHPL_TARGET_ARCH: x86_64
CHPL_TARGET_CPU: native
CHPL_LOCALE_MODEL: flat
CHPL_COMM: none
CHPL_TASKS: qthreads
CHPL_LAUNCHER: none
CHPL_TIMERS: generic
CHPL_UNWIND: none
CHPL_MEM: jemalloc
CHPL_ATOMICS: locks *
CHPL_GMP: bundled
CHPL_HWLOC: bundled
CHPL_RE2: bundled
CHPL_LLVM: system
CHPL_AUX_FILESYS: none

jabraham17 avatar Aug 14 '24 20:08 jabraham17