D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19802 - Possible regression with dustmite
Summary: Possible regression with dustmite
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-11 11:59 UTC by Francesco Mecca
Modified: 2019-04-12 15:02 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Francesco Mecca 2019-04-11 11:59:25 UTC
I am getting a sigsegv running dustmite compiled with dmd ~master:
```
(gdb) r --force ../../druntime/src/ 'grep -nR HAVE_FORK' 
```
```
[...]
Loading ../../druntime/src/rt/util/typeinfo.d
Loading ../../druntime/src/test_runner.d
None =>
Program received signal SIGSEGV, Segmentation fault.
_D4core6atomic__T10atomicLoadVEQBdQBb11MemoryOrderi3TkZQBmFNaNbNiNfKOxkZk (val=<error reading variable>)                               
    at ../druntime/import/core/atomic.d:1130
1130                        lock; // lock always needed to make this op atomic                                                         
(gdb) bt
#0  _D4core6atomic__T10atomicLoadVEQBdQBb11MemoryOrderi3TkZQBmFNaNbNiNfKOxkZk (val=<error reading variable>)                           
    at ../druntime/import/core/atomic.d:1130
#1  0x00005555557f3014 in std.stdio.File.__postblit() (this=...) at std/stdio.d:468                                                    
#2  0x00005555557f1bec in _D3std7process10spawnShellFNeMAxaSQBg5stdio4FileQpQrMxHAyaAyaEQCiQCh6ConfigMQBuMQzZCQDeQDd3Pid (             
    shellPath=..., workDir=..., config=<incomplete type>, env=..., stderr=..., stdout=..., stdin=..., command=...)                     
    at std/process.d:1307
#3  0x000055555573e70c in _D8dustmite4testFSQq9ReductionZ6doTestMFZb (__capture=0x7fffdef44680) at ../../phobos/std/process.d:1288     
#4  0x000055555573e8f1 in _D8dustmite4testFSQq9ReductionZ12__dgliteral7MFNaNiNfZb (__capture=0x7fffdef44680) at dustmite.d:1535        
#5  0x000055555573e3db in _D8dustmite4testFSQq9ReductionZ9lookaheadMFLbZb (__capture=0x7fffdef44680,                                   
    fallback=1730765656476055832606875017561728) at dustmite.d:1512
#6  0x000055555573e8d8 in _D8dustmite4testFSQq9ReductionZ12__dgliteral8MFNaNiNfZb (__capture=0x7fffdef44680) at dustmite.d:1535        
#7  0x000055555573d892 in _D8dustmite4testFSQq9ReductionZ10diskCachedMFLbZb (__capture=0x7fffdef44680,                                 
    fallback=1730765656475391749820221473703552) at dustmite.d:1408
#8  0x000055555573e8b4 in _D8dustmite4testFSQq9ReductionZ12__dgliteral9MFNaNiNfZb (__capture=0x7fffdef44680) at dustmite.d:1535        
#9  0x000055555573d5bc in _D8dustmite4testFSQq9ReductionZ9ramCachedMFNfLbZb (__capture=0x7fffdef44680,                                 
    fallback=1730765656474727667033567929845376) at dustmite.d:1377
#10 0x000055555573d459 in _D8dustmite4testFSQq9ReductionZb (reduction=...) at dustmite.d:1535                                          
#11 0x00005555557386eb in D main (args=...) at dustmite.d:275
(gdb) l
1125                    asm pure nothrow @nogc @trusted
1126                    {
1127                        mov EDX, 0;
1128                        mov EAX, 0;
1129                        mov RCX, val;
1130                        lock; // lock always needed to make this op atomic
1131                        cmpxchg [RCX], EDX;
1132                    }
1133                }
1134                else
(gdb) 
```
Comment 1 Seb 2019-04-11 13:41:45 UTC
Can you provide a more details like the system used and when it starts to fail?
You should probably also report this on the DustMite repository as it might be necessary to adjust things from that side too.
Comment 2 Vladimir Panteleev 2019-04-12 01:23:36 UTC
I am unable to reproduce this problem.

`digger run master -- dmd -run runtests.d` successfully builds DustMite using DMD master and runs the DustMite test suite.
Comment 3 Francesco Mecca 2019-04-12 15:00:53 UTC
After updating the branch I don't have this problem anymore.
This issue can be closed
Comment 4 Vladimir Panteleev 2019-04-12 15:02:46 UTC
Thank you for the feedback.