Re: kyua SIGBUS'ing with clang 3.7.0 (was FreeBSD_HEAD-tests - Build #1540 - Unstable)
Yes. At http://people.freebsd.org/~nwhitehorn/cmake -Nathan On 10/07/15 14:28, Dimitry Andric wrote: On 07 Oct 2015, at 16:44, Nathan Whitehorn wrote: On 10/07/15 00:52, NGie Cooper wrote: ... How do you reproduce this issue? Do you have any core dumps? sudo bash pkg install -y kyua kyua test /usr/tests/local/atf/atf-c++/build_test As far as core dumps? Yeah.. I can post one tomorrow (I’m testing out some things right now and I’d rather not interrupt it). Key piece is that if I use the package from pkg.FreeBSD.org it cores, but if I build it myself from ports, everything’s fine and dandy. My clang 3.6 installation of cmake also SIGBUS's at start after this upgrade. Recompiling it fixes the issue. Do you still have a copy of the earlier executable? Can you post it somewhere? -Dimitry ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: kyua SIGBUS'ing with clang 3.7.0 (was FreeBSD_HEAD-tests - Build #1540 - Unstable)
On Fri, Oct 9, 2015 at 11:37 AM, Dimitry Andric wrote: > > I have committed a (hopefully temporary) workaround in r289072. If you > don't want to do a full buildworld, first rebuild clang and install it, > then rebuild libc++ and install it. > After some back-and-forth about the cause, I am now reasonably convinced > that it is due to a bug in clang 3.7.0, as I noted in the commit message: > > Some further explanation: libc++'s iostream.cpp contains the definitions > of std::cout, std::cerr and so on. These global objects are effectively > declared with an alignment of 8 bytes. When an executable is linked > against libc++.so, it can sometimes get a copy of the global object, > which is then at the same alignment. > > However, with clang 3.7.0, the initialization of these global objects > will incorrectly use SSE instructions (e.g. movdqa), whenever the > optimization level is high enough, and SSE is enabled, such as on amd64. > When any of these objects is not aligned to 16 bytes, this will result > in a SIGBUS during iostream initialization. In contrast, clang 3.6.x > and earlier took the 8 byte alignment into consideration, and avoided > SSE for those particular operations. > > After bisecting of upstream changes, I found that the above revision > [llvm r240144] caused the change of this behavior, so I am reverting it > now as a workaround, while a discussion and test case is being prepared > for upstream. > > -Dimitry > > Thank you for analyzing and fixing the problem. You have excellent detective skills and worked hard to fix this! -- Craig ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: kyua SIGBUS'ing with clang 3.7.0 (was FreeBSD_HEAD-tests - Build #1540 - Unstable)
On 09 Oct 2015, at 04:29, Craig Rodrigues wrote: > > On Wed, Oct 7, 2015 at 2:28 PM, Dimitry Andric wrote: >> >> Do you still have a copy of the earlier executable? Can you post it >> somewhere? > I was able to reproduce the problem. ... > #0 0x00080085dcfd in std::__1::ios_base::Init::Init () > from /usr/lib/libc++.so.1 I have committed a (hopefully temporary) workaround in r289072. If you don't want to do a full buildworld, first rebuild clang and install it, then rebuild libc++ and install it. After some back-and-forth about the cause, I am now reasonably convinced that it is due to a bug in clang 3.7.0, as I noted in the commit message: Some further explanation: libc++'s iostream.cpp contains the definitions of std::cout, std::cerr and so on. These global objects are effectively declared with an alignment of 8 bytes. When an executable is linked against libc++.so, it can sometimes get a copy of the global object, which is then at the same alignment. However, with clang 3.7.0, the initialization of these global objects will incorrectly use SSE instructions (e.g. movdqa), whenever the optimization level is high enough, and SSE is enabled, such as on amd64. When any of these objects is not aligned to 16 bytes, this will result in a SIGBUS during iostream initialization. In contrast, clang 3.6.x and earlier took the 8 byte alignment into consideration, and avoided SSE for those particular operations. After bisecting of upstream changes, I found that the above revision [llvm r240144] caused the change of this behavior, so I am reverting it now as a workaround, while a discussion and test case is being prepared for upstream. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
Re: kyua SIGBUS'ing with clang 3.7.0 (was FreeBSD_HEAD-tests - Build #1540 - Unstable)
On Wed, Oct 7, 2015 at 2:28 PM, Dimitry Andric wrote: > > Do you still have a copy of the earlier executable? Can you post it > somewhere? > I was able to reproduce the problem. pkg install devel/kyua cd /usr/tests/local/kyua/bootstrap/ ./plain_helpers Bus error (core dumped) root@:/usr/tests/local/kyua/bootstrap # gdb plain_helpers plain_helpers.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)... Core was generated by `plain_helpers'. Program terminated with signal 10, Bus error. Reading symbols from /usr/lib/libc++.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libc++.so.1 Reading symbols from /lib/libcxxrt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libcxxrt.so.1 Loaded symbols for /lib/libgcc_s.so.1 Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x00080085dcfd in std::__1::ios_base::Init::Init () from /usr/lib/libc++.so.1 (gdb) where #0 0x00080085dcfd in std::__1::ios_base::Init::Init () from /usr/lib/libc++.so.1 #1 0x00080085e029 in std::__1::ios_base::Init::~Init () from /usr/lib/libc++.so.1 #2 0x0008008b7352 in std::__throw_bad_alloc () from /usr/lib/libc++.so.1 #3 0x00080085a5c6 in _init () from /usr/lib/libc++.so.1 #4 0x7fffe570 in ?? () #5 0x0008006059b8 in r_debug_state () from /libexec/ld-elf.so.1 #6 0x00080060506f in __tls_get_addr () from /libexec/ld-elf.so.1 #7 0x000800603439 in .text () from /libexec/ld-elf.so.1 #8 0x in ?? () (gdb) #0 0x00080085dcfd in std::__1::ios_base::Init::Init () from /usr/lib/libc++.so.1 #1 0x00080085e029 in std::__1::ios_base::Init::~Init () from /usr/lib/libc++.so.1 #2 0x0008008b7352 in std::__throw_bad_alloc () from /usr/lib/libc++.so.1 #3 0x00080085a5c6 in _init () from /usr/lib/libc++.so.1 #4 0x7fffe570 in ?? () #5 0x0008006059b8 in r_debug_state () from /libexec/ld-elf.so.1 #6 0x00080060506f in __tls_get_addr () from /libexec/ld-elf.so.1 #7 0x000800603439 in .text () from /libexec/ld-elf.so.1 #8 0x in ?? () (gdb) The core file is here: https://people.freebsd.org/~rodrigc/kyua-core/ -- Craig ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: kyua SIGBUS'ing with clang 3.7.0 (was FreeBSD_HEAD-tests - Build #1540 - Unstable)
On Wed, Oct 7, 2015 at 6:15 AM, Dimitry Andric wrote: > On 07 Oct 2015, at 09:52, NGie Cooper wrote: > ... >>> How do you reproduce this issue? Do you have any core dumps? >> >> sudo bash >> pkg install -y kyua >> kyua test /usr/tests/local/atf/atf-c++/build_test > > For me, this does not crash, but results in the following error: > > kyua: E: Program name '/usr/tests/local/atf/atf-c++/build_test' must be > relative to the test suite, not absolute. > > What am I doing wrong? It's not you, it's me >_>... Try: sudo bash pkg install -y kyua cd /usr/tests/local/atf/atf-c++ kyua build_test Thanks! ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: kyua SIGBUS'ing with clang 3.7.0 (was FreeBSD_HEAD-tests - Build #1540 - Unstable)
On 07 Oct 2015, at 16:44, Nathan Whitehorn wrote: > > On 10/07/15 00:52, NGie Cooper wrote: ... >>> How do you reproduce this issue? Do you have any core dumps? >> sudo bash >> pkg install -y kyua >> kyua test /usr/tests/local/atf/atf-c++/build_test >> >> As far as core dumps? Yeah.. I can post one tomorrow (I’m testing out some >> things right now and I’d rather not interrupt it). Key piece is that if I >> use the package from pkg.FreeBSD.org it cores, but if I build it myself from >> ports, everything’s fine and dandy. >> > > My clang 3.6 installation of cmake also SIGBUS's at start after this upgrade. > Recompiling it fixes the issue. Do you still have a copy of the earlier executable? Can you post it somewhere? -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
Re: kyua SIGBUS'ing with clang 3.7.0 (was FreeBSD_HEAD-tests - Build #1540 - Unstable)
On 10/07/15 00:52, NGie Cooper wrote: On Oct 6, 2015, at 23:58, Dimitry Andric wrote: On 07 Oct 2015, at 05:44, NGie Cooper wrote: On Oct 6, 2015, at 20:28, NGie Cooper wrote: On Oct 6, 2015, at 16:13, jenkins-ad...@freebsd.org wrote: FreeBSD_HEAD-tests - Build #1540 - Unstable: Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/ Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/changes Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/console Change summaries: No changes The failed test cases: Looks like the clang upgrade broke atf/kyua package somehow: $ pwd /usr/tests/local $ ./atf/atf-c++/build_test Bus error I’ll try building the package from ports. Yup, works when built from scratch in ports. My guess is that lib/libc++ needs a major version bump: 65208feb (dim 2012-06-02 11:00:48 + 13) SHLIB_MAJOR= 1 No, there is no intention to bump any lib versions. That is something from the 90's. :-) -_-.. How do you reproduce this issue? Do you have any core dumps? sudo bash pkg install -y kyua kyua test /usr/tests/local/atf/atf-c++/build_test As far as core dumps? Yeah.. I can post one tomorrow (I’m testing out some things right now and I’d rather not interrupt it). Key piece is that if I use the package from pkg.FreeBSD.org it cores, but if I build it myself from ports, everything’s fine and dandy. My clang 3.6 installation of cmake also SIGBUS's at start after this upgrade. Recompiling it fixes the issue. -Nathan ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: kyua SIGBUS'ing with clang 3.7.0 (was FreeBSD_HEAD-tests - Build #1540 - Unstable)
On 07 Oct 2015, at 09:52, NGie Cooper wrote: ... >> How do you reproduce this issue? Do you have any core dumps? > > sudo bash > pkg install -y kyua > kyua test /usr/tests/local/atf/atf-c++/build_test For me, this does not crash, but results in the following error: kyua: E: Program name '/usr/tests/local/atf/atf-c++/build_test' must be relative to the test suite, not absolute. What am I doing wrong? -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
Re: kyua SIGBUS'ing with clang 3.7.0 (was FreeBSD_HEAD-tests - Build #1540 - Unstable)
On Wed, Oct 07, 2015 at 12:52:34AM -0700, NGie Cooper wrote: > > > On Oct 6, 2015, at 23:58, Dimitry Andric wrote: > > > > On 07 Oct 2015, at 05:44, NGie Cooper wrote: > >> > >>> > >>> On Oct 6, 2015, at 20:28, NGie Cooper wrote: > >>> > On Oct 6, 2015, at 16:13, jenkins-ad...@freebsd.org wrote: > > FreeBSD_HEAD-tests - Build #1540 - Unstable: > > Build information: > https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/ > Full change log: > https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/changes > Full build log: > https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/console > > Change summaries: > > No changes > > > The failed test cases: > >>> > >>> Looks like the clang upgrade broke atf/kyua package somehow: > >>> > >>> $ pwd > >>> /usr/tests/local > >>> $ ./atf/atf-c++/build_test > >>> Bus error > >>> > >>> I’ll try building the package from ports. > >> > >> Yup, works when built from scratch in ports. My guess is that lib/libc++ > >> needs a major version bump: > >> > >> 65208feb (dim 2012-06-02 11:00:48 + 13) SHLIB_MAJOR= 1 > > > > No, there is no intention to bump any lib versions. That is something from > > the 90's. :-) > > -_-.. > > > How do you reproduce this issue? Do you have any core dumps? > > sudo bash > pkg install -y kyua > kyua test /usr/tests/local/atf/atf-c++/build_test > > As far as core dumps? Yeah.. I can post one tomorrow (I’m testing out some > things right now and I’d rather not interrupt it). Key piece is that if I use > the package from pkg.FreeBSD.org it cores, but if I build it myself from > ports, everything’s fine and dandy. > Which means there is an ABI incompatiblity somewhere which needs to be fixed! Best regards, Bapt signature.asc Description: PGP signature
Re: kyua SIGBUS'ing with clang 3.7.0 (was FreeBSD_HEAD-tests - Build #1540 - Unstable)
> On Oct 6, 2015, at 23:58, Dimitry Andric wrote: > > On 07 Oct 2015, at 05:44, NGie Cooper wrote: >> >>> >>> On Oct 6, 2015, at 20:28, NGie Cooper wrote: >>> On Oct 6, 2015, at 16:13, jenkins-ad...@freebsd.org wrote: FreeBSD_HEAD-tests - Build #1540 - Unstable: Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/ Full change log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/changes Full build log: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/console Change summaries: No changes The failed test cases: >>> >>> Looks like the clang upgrade broke atf/kyua package somehow: >>> >>> $ pwd >>> /usr/tests/local >>> $ ./atf/atf-c++/build_test >>> Bus error >>> >>> I’ll try building the package from ports. >> >> Yup, works when built from scratch in ports. My guess is that lib/libc++ >> needs a major version bump: >> >> 65208feb (dim 2012-06-02 11:00:48 + 13) SHLIB_MAJOR= 1 > > No, there is no intention to bump any lib versions. That is something from > the 90's. :-) -_-.. > How do you reproduce this issue? Do you have any core dumps? sudo bash pkg install -y kyua kyua test /usr/tests/local/atf/atf-c++/build_test As far as core dumps? Yeah.. I can post one tomorrow (I’m testing out some things right now and I’d rather not interrupt it). Key piece is that if I use the package from pkg.FreeBSD.org it cores, but if I build it myself from ports, everything’s fine and dandy. Thanks! ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: kyua SIGBUS'ing with clang 3.7.0 (was FreeBSD_HEAD-tests - Build #1540 - Unstable)
On 07 Oct 2015, at 05:44, NGie Cooper wrote: > >> >> On Oct 6, 2015, at 20:28, NGie Cooper wrote: >> >>> On Oct 6, 2015, at 16:13, jenkins-ad...@freebsd.org wrote: >>> >>> FreeBSD_HEAD-tests - Build #1540 - Unstable: >>> >>> Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/ >>> Full change log: >>> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/changes >>> Full build log: >>> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/console >>> >>> Change summaries: >>> >>> No changes >>> >>> >>> The failed test cases: >> >> Looks like the clang upgrade broke atf/kyua package somehow: >> >> $ pwd >> /usr/tests/local >> $ ./atf/atf-c++/build_test >> Bus error >> >> I’ll try building the package from ports. > > Yup, works when built from scratch in ports. My guess is that lib/libc++ > needs a major version bump: > > 65208feb (dim 2012-06-02 11:00:48 + 13) SHLIB_MAJOR= 1 No, there is no intention to bump any lib versions. That is something from the 90's. :-) How do you reproduce this issue? Do you have any core dumps? -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
Re: kyua SIGBUS'ing with clang 3.7.0 (was FreeBSD_HEAD-tests - Build #1540 - Unstable)
> On Oct 6, 2015, at 20:28, NGie Cooper wrote: > >> On Oct 6, 2015, at 16:13, jenkins-ad...@freebsd.org wrote: >> >> FreeBSD_HEAD-tests - Build #1540 - Unstable: >> >> Build information: https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/ >> Full change log: >> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/changes >> Full build log: >> https://jenkins.FreeBSD.org/job/FreeBSD_HEAD-tests/1540/console >> >> Change summaries: >> >> No changes >> >> >> The failed test cases: > > Looks like the clang upgrade broke atf/kyua package somehow: > > $ pwd > /usr/tests/local > $ ./atf/atf-c++/build_test > Bus error > > I’ll try building the package from ports. Yup, works when built from scratch in ports. My guess is that lib/libc++ needs a major version bump: 65208feb (dim 2012-06-02 11:00:48 + 13) SHLIB_MAJOR= 1 Thanks, -NGie ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"