https://issues.dlang.org/show_bug.cgi?id=14476

          Issue ID: 14476
           Summary: core.thread unit tests failing on FreeBSD 9+
           Product: D
           Version: unspecified
          Hardware: All
                OS: FreeBSD
            Status: NEW
          Severity: major
          Priority: P1
         Component: druntime
          Assignee: nob...@puremagic.com
          Reporter: issues.dl...@jmdavisprog.com

I am consistently seeing this when I try and run druntime's unit tests on
FreeBSD for either 2.067 or master (2.068 alpha):

0.000s PASS release64 object
0.000s PASS release64 core.atomic
0.008s PASS release64 core.bitop
0.000s PASS release64 core.checkedint
0.000s PASS release64 core.demangle
0.000s PASS release64 core.exception
0.000s PASS release64 core.math
0.000s PASS release64 core.memory
posix.mak:230: recipe for target 'obj/64/core/thread' failed
gmake: *** [obj/64/core/thread] Illegal instruction
gmake: *** Deleting file 'obj/64/core/thread'

The druntime unit tests for 2.066 run just fine, so whatever the problem is was
either introduced in 2.067, or a new test that triggers it was introduced.

I'm running the latest PC-BSD on x86_64 (so FreeBSD 10.1), and someone else in
the newsgroup sees the same thing on their 9.1 i386 machine:
http://forum.dlang.org/post/koxlbjptuyccdygvk...@forum.dlang.org

The autotester is not hitting this problem, so clearly, it doesn't exist on all
FreeBSD systems However, apparently, the autotester is currently running
FreeBSD 8.4, so that would imply that the problem only exists in FreeBSD 9+. I
narrowed it down to the last test in core.thread:

unittest
{
    auto thr = new Thread(function{}, 10).start();
    thr.join();
}

And if I remove the ", 10" from the constructor call, then it works - but then
the druntime unit test build fails later:

Testing link
Testing load
Testing linkD
Testing linkDR
Testing loadDR
Testing host
Testing finalize
Testing link_linkdep
Makefile:28: recipe for target 'obj/freebsd/64/link_linkdep.done' failed
gmake[1]: *** [obj/freebsd/64/link_linkdep.done] Segmentation fault
gmake[1]: Leaving directory
'/usr/home/jmdavis/Programming/github/druntime/test/shared'
posix.mak:242: recipe for target 'test/shared/.run' failed
gmake: *** [test/shared/.run] Error 2

I have no idea if it's a related problem or not, but if it isn't, then another
problem was introduced in 2.067 which only exists on FreeBSD 9+. But
regardless, something about setting the stack size for threads isn't working
properly on FreeBSD 9+.

--

Reply via email to