Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK

2018-04-30 Thread Andre Albsmeier
On Thu, 26-Apr-2018 at 11:55:19 +0200, Dimitry Andric wrote:
> On 25 Apr 2018, at 18:58, Andre Albsmeier  wrote:
> > 
> > I have set up a new system disk for an i386 11.2-PRERELEASE box. I did the
> > usual
> > 
> > gpart create -s gpt $disk
> > gpart add -t freebsd-boot -s 984 $disk
> > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 $disk
> > ...
> > 
> > thing, just to notice that the box wouldn't boot. It seems to hang where
> > stage 2 should be run -- when the '\' should start spinning the screen
> > turns white and the box hangs (tested on two machines, an Asus P5W and a
> > Supermicro A2SAV).
> > 
> > So I replaced gptboot on the new disk by the one from an older machine
> > and everything was fine. I wanted to find out what is actually causing
> > the issue and recompiled /usr/src/stand after updating the old sources
> > in several steps.
> > 
> > Eventually it turned out that it depends on the compiler. When compiling
> > the latest /usr/src/stand with clang 5.0.1 the resulting gptboot works.
> > When using 6.0.0 it doesn't. To be exact, it's gptboot.o which is causing
> > the problems. When using a gptboot.o from a clang 5 system it is OK, when
> > using a gptboot.o from a clang 6 system it fails.
> > 
> > To add more confusion: I usually have WITHOUT_LOADER_GELI in my make.conf.
> > When removing this, the resulting gptboot works even when compiled with
> > clang 6...
> > 
> > I can reproduce this in case s.o. wants me to do some tests...
> 
> I can't reproduce it on my end, unfortunately.  I downloaded the latest
> FreeBSD-11.2-PRERELEASE-i386-20180420-r332802 snapshot, installed it to
> a GPT partitioned disk, and it boots just fine.

Out of curiosity I removed -O1 from stand/i386/gptboot/Makefile so the
standard -O2 is used. Now the resulting gptboot is:

-rw-rw  1 andre  wheel  22023 30 Apr 11:51 
/usr/obj/src/src-11/stand/i386/gptboot/gptboot

and it works! So something is screwed up when compiling gptboot with -O1
(and WITHOUT_LOADER_GELI and with clang 6.0.0).
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK

2018-04-30 Thread Andre Albsmeier
On Thu, 26-Apr-2018 at 11:55:19 +0200, Dimitry Andric wrote:
> On 25 Apr 2018, at 18:58, Andre Albsmeier  wrote:
> > 
> > I have set up a new system disk for an i386 11.2-PRERELEASE box. I did the
> > usual
> > 
> > gpart create -s gpt $disk
> > gpart add -t freebsd-boot -s 984 $disk
> > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 $disk
> > ...
> > 
> > thing, just to notice that the box wouldn't boot. It seems to hang where
> > stage 2 should be run -- when the '\' should start spinning the screen
> > turns white and the box hangs (tested on two machines, an Asus P5W and a
> > Supermicro A2SAV).
> > 
> > So I replaced gptboot on the new disk by the one from an older machine
> > and everything was fine. I wanted to find out what is actually causing
> > the issue and recompiled /usr/src/stand after updating the old sources
> > in several steps.
> > 
> > Eventually it turned out that it depends on the compiler. When compiling
> > the latest /usr/src/stand with clang 5.0.1 the resulting gptboot works.
> > When using 6.0.0 it doesn't. To be exact, it's gptboot.o which is causing
> > the problems. When using a gptboot.o from a clang 5 system it is OK, when
> > using a gptboot.o from a clang 6 system it fails.
> > 
> > To add more confusion: I usually have WITHOUT_LOADER_GELI in my make.conf.
> > When removing this, the resulting gptboot works even when compiled with
> > clang 6...
> > 
> > I can reproduce this in case s.o. wants me to do some tests...
> 
> I can't reproduce it on my end, unfortunately.  I downloaded the latest
> FreeBSD-11.2-PRERELEASE-i386-20180420-r332802 snapshot, installed it to
> a GPT partitioned disk, and it boots just fine.

It is clearly reproducible here with r333082 and with /etc/make.conf having
only WITHOUT_LOADER_GELI. The resulting gptboot is:

-rw-rw  1 andre  wheel  20859 30 Apr 11:46 
/usr/obj/src/src-11/stand/i386/gptboot/gptboot

Here are the logs, maybe something is hidden here:

machine -> /src/src-11/sys/i386/include
x86 -> /src/src-11/sys/x86/include
gzip -cn /src/src-11/stand/i386/gptboot/gptboot.8 > gptboot.8.gz
cc -O2 -pipe   -I/src/src-11/stand/i386/btx/lib -nostdinc 
-I/usr/obj/src/src-11/stand/libsa -I/src/src-11/stand/libsa -D_STANDALONE 
-I/src/src-11/sys -Ddouble=jagged-little-pill -Dfloat=floaty-mcfloatface 
-DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx -msoft-float 
-march=i386 -I. -DBOOTPROG=\"gptboot\"  -O1  -DGPT  -DUFS1_AND_UFS2  
-DSIOPRT=0x3f8  -DSIOFMT=0x3  -DSIOSPD=9600  -I/src/src-11/stand/common  
-I/src/src-11/stand/i386/common  -I/src/src-11/stand/i386/boot2  -Wall 
-Waggregate-return -Wbad-function-cast -Wno-cast-align  -Wmissing-declarations 
-Wmissing-prototypes -Wnested-externs  -Wpointer-arith -Wshadow 
-Wstrict-prototypes -Wwrite-strings  -Winline -Wno-pointer-sign -g -std=gnu99 
-Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int 
-Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value 
-Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion 
-Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-sw
 itch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses  
-Qunused-arguments -no-integrated-as   -c 
/src/src-11/stand/i386/gptboot/gptldr.S -o gptldr.o
ld -static -N --gc-sections -e start -Ttext 0x7c00 -o gptldr.out gptldr.o
objcopy -S -O binary gptldr.out gptldr.bin
cc -O2 -pipe   -I/src/src-11/stand/i386/btx/lib -nostdinc 
-I/usr/obj/src/src-11/stand/libsa -I/src/src-11/stand/libsa -D_STANDALONE 
-I/src/src-11/sys -Ddouble=jagged-little-pill -Dfloat=floaty-mcfloatface 
-DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx -msoft-float 
-march=i386 -I. -DBOOTPROG=\"gptboot\"  -O1  -DGPT  -DUFS1_AND_UFS2  
-DSIOPRT=0x3f8  -DSIOFMT=0x3  -DSIOSPD=9600  -I/src/src-11/stand/common  
-I/src/src-11/stand/i386/common  -I/src/src-11/stand/i386/boot2  -Wall 
-Waggregate-return -Wbad-function-cast -Wno-cast-align  -Wmissing-declarations 
-Wmissing-prototypes -Wnested-externs  -Wpointer-arith -Wshadow 
-Wstrict-prototypes -Wwrite-strings  -Winline -Wno-pointer-sign -g -std=gnu99 
-Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int 
-Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value 
-Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion 
-Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-sw
 itch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses  
-Qunused-arguments  -c /src/src-11/stand/i386/gptboot/gptboot.c -o gptboot.o
cc -O2 -pipe   -I/src/src-11/stand/i386/btx/lib -nostdinc 
-I/usr/obj/src/src-11/stand/libsa -I/src/src-11/stand/libsa -D_STANDALONE 
-I/src/src-11/sys -Ddouble=jagged-little-pill -Dfloat=floaty-mcfloatface 
-DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx -msoft-float 
-march=i386 -I. -DBOOTPROG=\"gptboot\"  -O1  -DGPT  -DUFS1_AND_UFS2  
-DSIOPRT=0x3f8  -DSIOFMT=0x3  -DSIOSPD=9600  

Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK

2018-04-27 Thread Andre Albsmeier
On Thu, 26-Apr-2018 at 12:06:21 +0200, Dimitry Andric wrote:
> On 26 Apr 2018, at 06:17, Dewayne Geraghty 
>  wrote:
> > 
> > Andre, You're not alone.  I think there's a problem with clang6 on i386
> > FreeBSD 11.1X, refer:
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227552
> > https://forums.freebsd.org/threads/uptime-w-i386-breakage.65584/
> > and perhaps also on amd64, search for
> > https://bugs.freebsd.org/bugzilla/buglist.cgi?quicksearch=clang_id=226390.
> > 
> > Without time to investigate I've reverted userland
> > FreeBSD 11.2-PRERELEASE  r332843Mamd64 1101515 1101509
> > FreeBSD 11.2-PRERELEASE  r332843Mi386 1101515 1101509
> 
> As noted in another post, I cannot reproduce the problems with gptboot,
> but with FreeBSD-11.2-PRERELEASE-i386-20180420-r332802, I do indeed see
> w and uptime crashing in libxo:

Scary, seems to be OK here:

buildbox:~>cat /usr/src/.svn_revision 
333056
buildbox:~>uname -K -m
i386 1101515
buildbox:~>w
19:51  up  4:41, 1 user, load averages: 0,25 0,26 0,21
USER   TTY  FROM  LOGIN@  IDLE WHAT
andre  pts/0bali 19:42   - w
buildbox:~>uptime
19:51  up  4:41, 1 user, load averages: 0,25 0,26 0,21
buildbox:~>ll /lib/libxo.so.0 
-r--r--r--  1 root  wheel  97596 27 Apr 15:07 /lib/libxo.so.0
buildbox:~>

-Andre

> 
> (gdb) bt
> #0  ifree (tsd=0x2800) at arena.h:799
> #1  0x2814b506 in __free (ptr=0x280601ef) at tsd.h:716
> #2  0x2808bb07 in xo_do_emit_fields () at 
> /usr/src/contrib/libxo/libxo/libxo.c:6419
> #3  0x28089a1c in xo_do_emit (xop=, flags= optimized out>, fmt=0x804ad4d "{:time-of-day/%s} ") at 
> /usr/src/contrib/libxo/libxo/libxo.c:6470
> #4  0x28089b61 in xo_emit (fmt=0x804ad4d "{:time-of-day/%s} ") at 
> /usr/src/contrib/libxo/libxo/libxo.c:6541
> #5  0x08049f50 in main (argc=, argv= out>) at /usr/src/usr.bin/w/w.c:475
> #6  0x080494cd in _start1 ()
> #7  0x08049448 in _start ()
> #8  0x in ?? ()
> 
> Not sure if this has anything to do with clang though, it looks more
> like a double free to me, at first glance.  I'll do some debugging.
> 
> -Dimitry
> 



-- 
Unix is very userfriendly. It's just picky who its friends are.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK

2018-04-27 Thread Andre Albsmeier
On Thu, 26-Apr-2018 at 11:55:19 +0200, Dimitry Andric wrote:
> On 25 Apr 2018, at 18:58, Andre Albsmeier  wrote:
> > 
> > I have set up a new system disk for an i386 11.2-PRERELEASE box. I did the
> > usual
> > 
> > gpart create -s gpt $disk
> > gpart add -t freebsd-boot -s 984 $disk
> > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 $disk
> > ...
> > 
> > thing, just to notice that the box wouldn't boot. It seems to hang where
> > stage 2 should be run -- when the '\' should start spinning the screen
> > turns white and the box hangs (tested on two machines, an Asus P5W and a
> > Supermicro A2SAV).
> > 
> > So I replaced gptboot on the new disk by the one from an older machine
> > and everything was fine. I wanted to find out what is actually causing
> > the issue and recompiled /usr/src/stand after updating the old sources
> > in several steps.
> > 
> > Eventually it turned out that it depends on the compiler. When compiling
> > the latest /usr/src/stand with clang 5.0.1 the resulting gptboot works.
> > When using 6.0.0 it doesn't. To be exact, it's gptboot.o which is causing
> > the problems. When using a gptboot.o from a clang 5 system it is OK, when
> > using a gptboot.o from a clang 6 system it fails.
> > 
> > To add more confusion: I usually have WITHOUT_LOADER_GELI in my make.conf.
> > When removing this, the resulting gptboot works even when compiled with
> > clang 6...
> > 
> > I can reproduce this in case s.o. wants me to do some tests...
> 
> I can't reproduce it on my end, unfortunately.  I downloaded the latest
> FreeBSD-11.2-PRERELEASE-i386-20180420-r332802 snapshot, installed it to
> a GPT partitioned disk, and it boots just fine.
> 
> This snapshot corresponds to r332802, which has clang 6.0.0, with the
> EFLAGS change still reverted, so I assume its copy of gptboot is also
> compiled with that.
> 
> Which exact revision of the base system were you using?

I have done some updates in the meantime and can't tell which
revision it was (it was just a few days ago). Currently, the
buildbox is at 333056 and I have just compiled gptboot (with
WITHOUT_LOADER_GELI) and I am seeing its size is

-rw-rw  1 andre  wheel  20859 27 Apr 19:42 gptboot

This is the size where it didn't work but I can't test it at
the moment as the build machine and the test environment are
@work. I am pretty sure it will fail as there weren't any
changes to stand or clang in the last few days but let's wait
until Monday when I can verify it...

-Andre
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK

2018-04-26 Thread Lowell Gilbert
Dimitry Andric  writes:

> On 26 Apr 2018, at 12:06, Dimitry Andric  wrote:
>> 
>> On 26 Apr 2018, at 06:17, Dewayne Geraghty 
>>  wrote:
>>> 
>>> Andre, You're not alone.  I think there's a problem with clang6 on i386
>>> FreeBSD 11.1X, refer:
>>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227552
>>> https://forums.freebsd.org/threads/uptime-w-i386-breakage.65584/
>>> and perhaps also on amd64, search for
>>> https://bugs.freebsd.org/bugzilla/buglist.cgi?quicksearch=clang_id=226390.
>>> 
>>> Without time to investigate I've reverted userland
>>> FreeBSD 11.2-PRERELEASE  r332843Mamd64 1101515 1101509
>>> FreeBSD 11.2-PRERELEASE  r332843Mi386 1101515 1101509
>> 
>> As noted in another post, I cannot reproduce the problems with gptboot,
>> but with FreeBSD-11.2-PRERELEASE-i386-20180420-r332802, I do indeed see
>> w and uptime crashing in libxo:
>> 
>> (gdb) bt
>> #0  ifree (tsd=0x2800) at arena.h:799
>> #1  0x2814b506 in __free (ptr=0x280601ef) at tsd.h:716
>> #2  0x2808bb07 in xo_do_emit_fields () at 
>> /usr/src/contrib/libxo/libxo/libxo.c:6419
>> #3 0x28089a1c in xo_do_emit (xop=, flags=> optimized out>, fmt=0x804ad4d "{:time-of-day/%s} ") at
>> /usr/src/contrib/libxo/libxo/libxo.c:6470
>> #4  0x28089b61 in xo_emit (fmt=0x804ad4d "{:time-of-day/%s} ") at 
>> /usr/src/contrib/libxo/libxo/libxo.c:6541
>> #5  0x08049f50 in main (argc=, argv=> out>) at /usr/src/usr.bin/w/w.c:475
>> #6  0x080494cd in _start1 ()
>> #7  0x08049448 in _start ()
>> #8  0x in ?? ()
>> 
>> Not sure if this has anything to do with clang though, it looks more
>> like a double free to me, at first glance.  I'll do some debugging.
>
> Strangely, simply recompiling libxo fixes the problem, or at least works
> around it.  This is on the r332802 snapshot, so I guess the libxo.so.0
> file shipped may be broken, somehow.

Actually, that is a recurring bug
(https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227552)
and does seem to be some kind of initialization problem with clang.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK

2018-04-26 Thread Dimitry Andric
On 26 Apr 2018, at 12:06, Dimitry Andric  wrote:
> 
> On 26 Apr 2018, at 06:17, Dewayne Geraghty 
>  wrote:
>> 
>> Andre, You're not alone.  I think there's a problem with clang6 on i386
>> FreeBSD 11.1X, refer:
>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227552
>> https://forums.freebsd.org/threads/uptime-w-i386-breakage.65584/
>> and perhaps also on amd64, search for
>> https://bugs.freebsd.org/bugzilla/buglist.cgi?quicksearch=clang_id=226390.
>> 
>> Without time to investigate I've reverted userland
>> FreeBSD 11.2-PRERELEASE  r332843Mamd64 1101515 1101509
>> FreeBSD 11.2-PRERELEASE  r332843Mi386 1101515 1101509
> 
> As noted in another post, I cannot reproduce the problems with gptboot,
> but with FreeBSD-11.2-PRERELEASE-i386-20180420-r332802, I do indeed see
> w and uptime crashing in libxo:
> 
> (gdb) bt
> #0  ifree (tsd=0x2800) at arena.h:799
> #1  0x2814b506 in __free (ptr=0x280601ef) at tsd.h:716
> #2  0x2808bb07 in xo_do_emit_fields () at 
> /usr/src/contrib/libxo/libxo/libxo.c:6419
> #3  0x28089a1c in xo_do_emit (xop=, flags= optimized out>, fmt=0x804ad4d "{:time-of-day/%s} ") at 
> /usr/src/contrib/libxo/libxo/libxo.c:6470
> #4  0x28089b61 in xo_emit (fmt=0x804ad4d "{:time-of-day/%s} ") at 
> /usr/src/contrib/libxo/libxo/libxo.c:6541
> #5  0x08049f50 in main (argc=, argv= out>) at /usr/src/usr.bin/w/w.c:475
> #6  0x080494cd in _start1 ()
> #7  0x08049448 in _start ()
> #8  0x in ?? ()
> 
> Not sure if this has anything to do with clang though, it looks more
> like a double free to me, at first glance.  I'll do some debugging.

Strangely, simply recompiling libxo fixes the problem, or at least works
around it.  This is on the r332802 snapshot, so I guess the libxo.so.0
file shipped may be broken, somehow.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK

2018-04-26 Thread Dimitry Andric
On 26 Apr 2018, at 06:17, Dewayne Geraghty 
 wrote:
> 
> Andre, You're not alone.  I think there's a problem with clang6 on i386
> FreeBSD 11.1X, refer:
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227552
> https://forums.freebsd.org/threads/uptime-w-i386-breakage.65584/
> and perhaps also on amd64, search for
> https://bugs.freebsd.org/bugzilla/buglist.cgi?quicksearch=clang_id=226390.
> 
> Without time to investigate I've reverted userland
> FreeBSD 11.2-PRERELEASE  r332843Mamd64 1101515 1101509
> FreeBSD 11.2-PRERELEASE  r332843Mi386 1101515 1101509

As noted in another post, I cannot reproduce the problems with gptboot,
but with FreeBSD-11.2-PRERELEASE-i386-20180420-r332802, I do indeed see
w and uptime crashing in libxo:

(gdb) bt
#0  ifree (tsd=0x2800) at arena.h:799
#1  0x2814b506 in __free (ptr=0x280601ef) at tsd.h:716
#2  0x2808bb07 in xo_do_emit_fields () at 
/usr/src/contrib/libxo/libxo/libxo.c:6419
#3  0x28089a1c in xo_do_emit (xop=, flags=, fmt=0x804ad4d "{:time-of-day/%s} ") at 
/usr/src/contrib/libxo/libxo/libxo.c:6470
#4  0x28089b61 in xo_emit (fmt=0x804ad4d "{:time-of-day/%s} ") at 
/usr/src/contrib/libxo/libxo/libxo.c:6541
#5  0x08049f50 in main (argc=, argv=) 
at /usr/src/usr.bin/w/w.c:475
#6  0x080494cd in _start1 ()
#7  0x08049448 in _start ()
#8  0x in ?? ()

Not sure if this has anything to do with clang though, it looks more
like a double free to me, at first glance.  I'll do some debugging.

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK

2018-04-26 Thread Dimitry Andric
On 25 Apr 2018, at 18:58, Andre Albsmeier  wrote:
> 
> I have set up a new system disk for an i386 11.2-PRERELEASE box. I did the
> usual
> 
> gpart create -s gpt $disk
> gpart add -t freebsd-boot -s 984 $disk
> gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 $disk
> ...
> 
> thing, just to notice that the box wouldn't boot. It seems to hang where
> stage 2 should be run -- when the '\' should start spinning the screen
> turns white and the box hangs (tested on two machines, an Asus P5W and a
> Supermicro A2SAV).
> 
> So I replaced gptboot on the new disk by the one from an older machine
> and everything was fine. I wanted to find out what is actually causing
> the issue and recompiled /usr/src/stand after updating the old sources
> in several steps.
> 
> Eventually it turned out that it depends on the compiler. When compiling
> the latest /usr/src/stand with clang 5.0.1 the resulting gptboot works.
> When using 6.0.0 it doesn't. To be exact, it's gptboot.o which is causing
> the problems. When using a gptboot.o from a clang 5 system it is OK, when
> using a gptboot.o from a clang 6 system it fails.
> 
> To add more confusion: I usually have WITHOUT_LOADER_GELI in my make.conf.
> When removing this, the resulting gptboot works even when compiled with
> clang 6...
> 
> I can reproduce this in case s.o. wants me to do some tests...

I can't reproduce it on my end, unfortunately.  I downloaded the latest
FreeBSD-11.2-PRERELEASE-i386-20180420-r332802 snapshot, installed it to
a GPT partitioned disk, and it boots just fine.

This snapshot corresponds to r332802, which has clang 6.0.0, with the
EFLAGS change still reverted, so I assume its copy of gptboot is also
compiled with that.

Which exact revision of the base system were you using?

-Dimitry



signature.asc
Description: Message signed with OpenPGP


Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK

2018-04-25 Thread Dewayne Geraghty
Andre, You're not alone.  I think there's a problem with clang6 on i386
FreeBSD 11.1X, refer:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227552
https://forums.freebsd.org/threads/uptime-w-i386-breakage.65584/
and perhaps also on amd64, search for
https://bugs.freebsd.org/bugzilla/buglist.cgi?quicksearch=clang_id=226390.

Without time to investigate I've reverted userland
FreeBSD 11.2-PRERELEASE  r332843M    amd64 1101515 1101509
FreeBSD 11.2-PRERELEASE  r332843M    i386 1101515 1101509

Apologies for my earlier email, I'd missed setting content-type:
text/plain instead of text/html (the latter strips content to the
mailing list), too many management memo's! ;)

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK

2018-04-25 Thread Dewayne Geraghty

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK

2018-04-25 Thread Andre Albsmeier
I have set up a new system disk for an i386 11.2-PRERELEASE box. I did the
usual

gpart create -s gpt $disk
gpart add -t freebsd-boot -s 984 $disk
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 $disk
...

thing, just to notice that the box wouldn't boot. It seems to hang where
stage 2 should be run -- when the '\' should start spinning the screen
turns white and the box hangs (tested on two machines, an Asus P5W and a
Supermicro A2SAV).

So I replaced gptboot on the new disk by the one from an older machine
and everything was fine. I wanted to find out what is actually causing
the issue and recompiled /usr/src/stand after updating the old sources
in several steps.

Eventually it turned out that it depends on the compiler. When compiling
the latest /usr/src/stand with clang 5.0.1 the resulting gptboot works.
When using 6.0.0 it doesn't. To be exact, it's gptboot.o which is causing
the problems. When using a gptboot.o from a clang 5 system it is OK, when
using a gptboot.o from a clang 6 system it fails. 

To add more confusion: I usually have WITHOUT_LOADER_GELI in my make.conf.
When removing this, the resulting gptboot works even when compiled with
clang 6...

I can reproduce this in case s.o. wants me to do some tests...
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"