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

Testsuite doesn't run on Alpine Linux / Musl #242

Open
Geod24 opened this issue May 20, 2020 · 1 comment
Open

Testsuite doesn't run on Alpine Linux / Musl #242

Geod24 opened this issue May 20, 2020 · 1 comment
Labels

Comments

@Geod24
Copy link
Member

Geod24 commented May 20, 2020

I am usually working on OSX those days, and when it comes to Linux, tend to use Alpine Linux because a container is quite easy to start. However, running dub test -- --single --trace (or even without the arguments) leads to the testsuite just hanging.

To force a rebuild of up-to-date targets, run again with --force.
Running ./dlang-bot --single --trace
[main(----) INF] Listening for requests on http://0.0.0.0:35499/
[main(----) INF] Listening for requests on http://0.0.0.0:45335/

That might be a problem with unit_threaded, or with how the testsuite is setup.

@Geod24 Geod24 added the bug label May 20, 2020
@Geod24
Copy link
Member Author

Geod24 commented May 26, 2020

I tried on Ubuntu as well (still in a docker container though), and it seems there's a deadlock. The process is stuck with two threads, and the following stack traces:

(gdb) thread 1
[Switching to thread 1 (Thread 0x7f60bbd40900 (LWP 6818))]
#0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
135	in ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
(gdb) bt
#0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007f60baf9f098 in __GI___pthread_mutex_lock (mutex=0x7f60bbc3ebb8) at ../nptl/pthread_mutex_lock.c:113
#2  0x000055b6883d015d in _D4core4sync5mutex5Mutex__T12lock_nothrowTOCQBqQBoQBmQBjZQBeMOFNbNiNeZv (
    this=0x7f60bbc3eba0) at /root/dlang/dmd-2.092.0/linux/bin64/../../src/druntime/import/core/sync/mutex.di:83
#3  0x000055b68839b95a in _D4vibe4core4sync__T7MonitorTSQBcQBaQy11ManualEvent7WaitersTOCQCdQCb5mutex5MutexZQCj4lockMOFZ9__lambda1MFNbNiNeZv (__capture=0x7ffdfe7768c0)
    at /root/.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d:1327
#4  0x000055b68839b91f in _D4vibe4core4sync__T7MonitorTSQBcQBaQy11ManualEvent7WaitersTOCQCdQCb5mutex5MutexZQCj4lockMOFNbNiNfZSQDuQDsQDq__TQDoTQDjTOQCiZQEb6Locked (this=..., __HID203=0x7ffdfe776908)
    at /root/.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d:1329
#5  0x000055b6883968aa in vibe.core.sync.ManualEvent.emit() shared (this=...)
    at /root/.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d:1034
#6  0x000055b68839cd1c in _D4vibe4core4sync__T17TaskConditionImplVbi0TCQBmQBk5mutex5MutexZQBs6notifyMFNbNeZv (
    this=...) at /root/.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d:1719
#7  0x000055b6883962c9 in vibe.core.sync.TaskCondition.notify() (this=0x7f60bbc4fd00)
    at /root/.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d:684
#8  0x000055b688455b9b in _D3std11concurrency10MessageBox3putMFKSQBlQBk7MessageZv ()
#9  0x000055b68820896e in _D3std11concurrency__T5_sendTS13unit_threaded6runner2io10ThreadWaitZQBuFEQCtQCs7MsgTypeSQDiQDh3TidQCrZv (_param_2=..., tid=..., type=<incomplete type>)
    at /root/dlang/dmd-2.092.0/linux/bin64/../../src/phobos/std/concurrency.d:661
#10 0x000055b68820890a in _D3std11concurrency__T5_sendTS13unit_threaded6runner2io10ThreadWaitZQBuFSQCtQCs3TidQCcZv (
    _param_1=..., tid=...) at /root/dlang/dmd-2.092.0/linux/bin64/../../src/phobos/std/concurrency.d:650
#11 0x000055b6882088cc in _D3std11concurrency__T4sendTS13unit_threaded6runner2io10ThreadWaitZQBtFSQCsQCr3TidQCcZv (
    _param_1=..., tid=...) at /root/dlang/dmd-2.092.0/linux/bin64/../../src/phobos/std/concurrency.d:627
#12 0x000055b688202e8e in _D13unit_threaded6runner2io12WriterThread6__ctorMFZCQByQBmQBiQBi (this=0x7f60bbc4dd60)
    at /root/.dub/packages/unit-threaded-0.10.8/unit-threaded/subpackages/runner/source/unit_threaded/runner/io.d:180
#13 0x000055b688202d78 in _D13unit_threaded6runner2io12WriterThread3getFNeZ12__dgliteral2MFNaNfZCQCrQCfQCbQCb (
    __capture=0x0)
    at /root/.dub/packages/unit-threaded-0.10.8/unit-threaded/subpackages/runner/source/unit_threaded/runner/io.d:149
#14 0x000055b688202f05 in _D3std11concurrency__T8initOnceS_D13unit_threaded6runner2io12WriterThread3getFNeZ8instanceCQCfQBtQBpQBpZQDeFNcLQvZ12__dgliteral2MFNaNiNfZQBv (__capture=0x7ffdfe776ca0)
    at /root/dlang/dmd-2.092.0/linux/bin64/../../src/phobos/std/concurrency.d:2600
#15 0x000055b688202f60 in _D3std11concurrency__T8initOnceS_D13unit_threaded6runner2io12WriterThread3getFNeZ8instanceCQCfQBtQBpQBpZQDeFNcLQvOC4core4sync5mutex5MutexZQBw (mutex=0x7f60bbc3e9c0, init=1738466470756384742076559849385120)
    at /root/dlang/dmd-2.092.0/linux/bin64/../../src/phobos/std/concurrency.d:2671
#16 0x000055b688202edf in _D3std11concurrency__T8initOnceS_D13unit_threaded6runner2io12WriterThread3getFNeZ8instanceCQCfQBtQBpQBpZQDeFNcLQvZQy (init=1738466470749006044306347156045824)
    at /root/dlang/dmd-2.092.0/linux/bin64/../../src/phobos/std/concurrency.d:2600
#17 0x000055b688202d4d in _D13unit_threaded6runner2io12WriterThread3getFNeZCQBwQBkQBgQBg ()
    at /root/.dub/packages/unit-threaded-0.10.8/unit-threaded/subpackages/runner/source/unit_threaded/runner/io.d:149
#18 0x000055b6881fc043 in _D13unit_threaded6runner9testsuite9TestSuite6__ctorMFNcxSQCdQBr7options7OptionsxASQDcQCq10reflection8TestDataZSQEfQDtQDpQDi (this=..., testData=..., options=...)
    at /root/.dub/packages/unit-threaded-0.10.8/unit-threaded/subpackages/runner/source/unit_threaded/runner/testsuite.d:40
#19 0x000055b6881faacd in _D13unit_threaded6runnerQh8runTestsFxSQBkQy7options7OptionsxASQCiQBw10reflection8TestDataZi
    (testData=..., options=...)
    at /root/.dub/packages/unit-threaded-0.10.8/unit-threaded/subpackages/runner/source/unit_threaded/runner/runner.d:99
#20 0x000055b6881faa3f in _D13unit_threaded6runnerQh8runTestsFAAyaxASQBpQBd10reflection8TestDataZi (testData=...,
    args=...)
    at /root/.dub/packages/unit-threaded-0.10.8/unit-threaded/subpackages/runner/source/unit_threaded/runner/runner.d:87
#21 0x000055b6881ec803 in _D13unit_threaded6runnerQh__T8runTestsVAyaa12_646c616e67626f742e617070VQBga17_646c616e67626f742e6275677a696c6c61VQCwa18_646c616e67626f742e6275696c646b697465VQEoa13_646c616e67626f742e63726f6eVQFwa15_646c616e67626f742e676974687562VQHia19_646c616e67626f742e6769746875625f617069VQJca19_646c616e67626f742e68636c6f75645f617069VQKwa14_646c616e67626f742e6973737565VQMga21_646c616e67626f742e7363616c657761795f617069VQOea15_646c616e67626f742e7472656c6c6fVQPqa16_646c616e67626f742e74776974746572VQRea14_646c616e67626f742e7574696c73VQSoa17_646c616e67626f742e7761726e696e6773VQ---Type <return> to continue, or q <return> to quit---
Uea8_6275677a696c6c61VQVba9_6275696c646b697465VQWaa8_636f6d6d656e7473VQWxa7_63726f6e6a6f62VQXsa6_6c6162656c73VQYla6_726576696577VQZea6_737461747573VQZxa6_7472656c6c6fVQBAqa7_74776974746572VQBBma5_7574696c73ZQBCoFAQBCkZi (args=...)
    at /root/.dub/packages/unit-threaded-0.10.8/unit-threaded/subpackages/runner/source/unit_threaded/runner/runner.d:70
#22 0x000055b6881ec758 in D main (args=...)
    at /root/.dub/packages/unit-threaded-0.10.8/unit-threaded/subpackages/runner/source/unit_threaded/runner/runner.d:40
(gdb) thread 2
[Switching to thread 2 (Thread 0x7f60b9de1700 (LWP 6822))]
#0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
135	in ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
(gdb) bt
#0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007f60baf9f098 in __GI___pthread_mutex_lock (mutex=0x7f60bbc3e9d8) at ../nptl/pthread_mutex_lock.c:113
#2  0x000055b6883c2ca1 in _D4core4sync5mutex5Mutex__T12lock_nothrowTCQBpQBnQBlQBiZQBdMFNbNiNeZv (this=0x7f60bbc3e9c0)
    at /root/dlang/dmd-2.092.0/linux/bin64/../../src/druntime/import/core/sync/mutex.di:83
#3  0x000055b6884373fd in core.sync.mutex.Mutex.lock() ()
#4  0x000055b688441cb4 in _d_monitorenter ()
#5  0x000055b688428949 in _D3std11concurrency__T8initOnceS_D4stdx9allocator17_processAllocatorOCQBkQBi16ISharedAllocatorZQCvFNcNfLOQBkOC4core4sync5mutex5MutexZOQCn (mutex=0x7f60bbc3e9c0, init=1738466512284949379407839236056784)
    at /root/dlang/dmd-2.092.0/linux/bin64/../../src/phobos/std/concurrency.d:2667
#6  0x000055b6884288e3 in _D3std11concurrency__T8initOnceS_D4stdx9allocator17_processAllocatorOCQBkQBi16ISharedAllocatorZQCvFNcLOQBiZOQBn (init=1738466512276390090017584592191488)
    at /root/dlang/dmd-2.092.0/linux/bin64/../../src/phobos/std/concurrency.d:2600
#7  0x000055b688428711 in _D4stdx9allocator16processAllocatorFNdZOCQBnQBl16ISharedAllocator ()
    at /root/.dub/packages/stdx-allocator-2.77.5/stdx-allocator/source/stdx/allocator/package.d:591
#8  0x000055b6883a2bb5 in _D4vibe4core4sync11ManualEvent__T19acquireThreadWaiterTDFNbNfMCQCjQChQCf__T17ThreadLocalWaiterVbi1ZQyZvZQCtMOFNfMQCgZ9__lambda4MFNbNeZv (__capture=0x7f60b9dde790)
    at /root/.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d:1194
#9  0x000055b6883a2a9d in _D4vibe4core4sync11ManualEvent__T19acquireThreadWaiterTDFNbNfMCQCjQChQCf__T17ThreadLocalWaiterVbi1ZQyZvZQCtMOFNbNfMQCiZv (this=..., del=...)
    at /root/.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d:1200
#10 0x000055b6883a1cf6 in _D4vibe4core4sync11ManualEvent__T12doWaitSharedVbi0ZQtMOFNbNfSQCd4time8DurationiZi (
    this=..., emit_count=0, timeout=...)
    at /root/.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d:1148
#11 0x000055b688396ec3 in vibe.core.sync.ManualEvent.waitUninterruptible(int) shared (this=..., emit_count=0)
    at /root/.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d:1124
#12 0x000055b68839cb8d in _D4vibe4core4sync__T17TaskConditionImplVbi0TCQBmQBk5mutex5MutexZQBs4waitMFNbNeZv (this=...)
    at /root/.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d:1688
#13 0x000055b688396281 in vibe.core.sync.TaskCondition.wait() (this=0x7f60bbc4fd00)
    at /root/.dub/packages/vibe-core-1.9.0/vibe-core/source/vibe/core/sync.d:682
#14 0x000055b68820579d in _D3std11concurrency10MessageBox__T3getTDFAyaSQBrQBq3TidZvTDFS13unit_threaded6runner2io10ThreadWaitZvTDFNaNbNiNfSQBzQBnQBj12ThreadFinishZvTDFSQDcQCqQCm5FlushQEiZvTDFNaNbNiNfCQGpQGo15OwnerTerminatedZvZQGjMFMQGkMQFvMQEiMQDbMQChZb (this=0x7f60bbc56160, _param_4=..., _param_3=..., _param_2=..., _param_1=..., _param_0=...)
    at /root/dlang/dmd-2.092.0/linux/bin64/../../src/phobos/std/concurrency.d:2233
#15 0x000055b68820564a in _D3std11concurrency__T7receiveTDFAyaSQBjQBi3TidZvTDFS13unit_threaded6runner2io10ThreadWaitZvTDFNaNbNiNfSQBzQBnQBj12ThreadFinishZvTDFSQDcQCqQCm5FlushQEiZvTDFNaNbNiNfCQGhQGg15OwnerTerminatedZvZQGnFQGiQFsQEeQCwQCbZv (_param_4=..., _param_3=..., _param_2=..., _param_1=..., _param_0=...)
    at /root/dlang/dmd-2.092.0/linux/bin64/../../src/phobos/std/concurrency.d:694
#16 0x000055b6882044cf in _D13unit_threaded6runner2io__T12threadWriterS_D3std5stdio__T10makeGlobalVEQBbQBa13StdFileHandlea22_636f72652e737464632e737464696f2e7374646f7574ZQDgFNbNcNdNiZSQEhQEg4FileS_DQEvQEu__TQErVQEia22_636f72652e737464632e737464696f2e737464657272ZQGvFNbNcNdNiZQDpZQIqFSQIe11concurrency3TidZv (tid=...)
    at /root/.dub/packages/unit-threaded-0.10.8/unit-threaded/subpackages/runner/source/unit_threaded/runner/io.d:291
#17 0x000055b688208890 in _D3std11concurrency__T6_spawnTPFSQBfQBe3TidZvTQoZQBbFbQyQyZ4execMFZv (
    __capture=0x7f60bbc42270) at /root/dlang/dmd-2.092.0/linux/bin64/../../src/phobos/std/concurrency.d:556
#18 0x000055b688438e76 in core.thread.osthread.Thread.run() ()
#19 0x000055b68849cd02 in thread_entryPoint ()
#20 0x00007f60baf9c6db in start_thread (arg=0x7f60b9de1700) at pthread_create.c:463
#21 0x00007f60ba30388f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

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

No branches or pull requests

1 participant