Re: Is it known problem, that zfs.ko could not be built with system compiler (clang 3.9.1) without optimization?

2017-02-22 Thread Andriy Gapon
On 22/02/2017 22:47, Lev Serebryakov wrote:
> Hello Freebsd-stable,
> 
>Now if you build zfs.ko with -O0 it panics on boot.

I have seen a problem that matches your description, but not necessarily the
same one:
https://lists.freebsd.org/pipermail/freebsd-hackers/2016-July/049768.html

>If you use default optimization level, a lot of fbt DTreace probes are
>   missing.

You can try several different (orthogonal, even) approaches:
- compile ZFS into the kernel
- use higher optimization level, but add -fno-optimize-sibling-calls to CLFAGS
- pkg install amd64-xtoolchain-gcc and then use CROSS_TOOLCHAIN=amd64-gcc
command line argument for buildkernel


-- 
Andriy Gapon
___
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: Is it known problem, that zfs.ko could not be built with system compiler (clang 3.9.1) without optimization?

2017-02-22 Thread Eugene Grosbein

23.02.2017 3:47, Lev Serebryakov пишет:

Hello Freebsd-stable,

Now if you build zfs.ko with -O0 it panics on boot.

If you use default optimization level, a lot of fbt DTreace probes are
   missing.


If you use it with i386 (32 bits), you must use loader.conf tunnable: 
kern.kstack_pages=4
or corresponding kernel options KSTACK_PAGES=4, do you?


___
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: Is it known problem, that zfs.ko could not be built with system compiler (clang 3.9.1) without optimization?

2017-02-22 Thread Slawa Olhovchenkov
On Wed, Feb 22, 2017 at 11:47:42PM +0300, Lev Serebryakov wrote:

> Hello Freebsd-stable,
> 
>Now if you build zfs.ko with -O0 it panics on boot.
> 
>If you use default optimization level, a lot of fbt DTreace probes are
>   missing.

Is this related to http://llvm.org/bugs/show_bug.cgi?id=18420 ?

___
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: Is it known problem, that zfs.ko could not be built with system compiler (clang 3.9.1) without optimization?

2017-02-22 Thread Alan Somers
The panic is definitely a bug.  You should create a bug on bugzilla
for that one, if it isn't there already.

It's to be expected that a lot of FBT probes won't be present in the
default build.  But there are two ways to ameliorate that:
1) Add a "__noinline" attribute to any function you want to trace
2) Add "#pragma clang optimize off" and "#pragma clang optimize on"
around the code you want to debug.  Note that even with optimization
disabled, clang may still choose to inline static functions.  But it
does make stack traces easier to debug.

-Alan

On Wed, Feb 22, 2017 at 1:47 PM, Lev Serebryakov  wrote:
> Hello Freebsd-stable,
>
>Now if you build zfs.ko with -O0 it panics on boot.
>
>If you use default optimization level, a lot of fbt DTreace probes are
>   missing.
>
> --
> Best regards,
>  Lev  mailto:l...@freebsd.org
>
> ___
> 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"
___
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: Is it known problem, that zfs.ko could not be built with system compiler (clang 3.9.1) without optimization?

2017-02-22 Thread Steven Hartland
I seem to remember this happening when I tried it too, likely it blows 
the stack, what's your panic?


When doing similar tracing before I've flagged the relevant methods with 
__noinline.


On 22/02/2017 20:47, Lev Serebryakov wrote:

Hello Freebsd-stable,

Now if you build zfs.ko with -O0 it panics on boot.

If you use default optimization level, a lot of fbt DTreace probes are
   missing.



___
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"


Is it known problem, that zfs.ko could not be built with system compiler (clang 3.9.1) without optimization?

2017-02-22 Thread Lev Serebryakov
Hello Freebsd-stable,

   Now if you build zfs.ko with -O0 it panics on boot.

   If you use default optimization level, a lot of fbt DTreace probes are
  missing.

-- 
Best regards,
 Lev  mailto:l...@freebsd.org

___
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: FreeBSD 11.0, bxe and lagg

2017-02-22 Thread Harry Schmalzbauer
 Bezüglich Ingeborg Hellemo's Nachricht vom 21.02.2017 11:23 (localtime):
> trond.endres...@fagskolen.gjovik.no said:
>> Why does lagg0 refer to bge2 and bge3 in the ifconfig output, and not  to
>> bxe2 and bxe3?
> My bad! No cut and paste from the console of the host without net. Wrote most 
> of it by hand but ended up using cut and paste from another host and forgot 
> to 
> edit.
>
> Correct lines:
>  laggproto lacp lagghash l2,l3,l4
>  laggport: bxe2 flags=0<>
>  laggport: bxe3 flags=0<>
>

There are known problems with laggproto lacp and if_bxe(4) due to
full-duplex detection I guess.
Workarround seems to be putting if_bxe(4) into promisc mode.

See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213606

Especially comment #8 and #13!

Mabye you can add your report to that bug, to raise it's priority.

Using if_lagg(4) with laggproto lacp and if_igb(4) doesn't show any
problems here on 11(-stable).
I also think there were LACPDU changes forcing the switch to be set to
active mode, but a very quick look didn't reveal a matching commit, so
maybe I'm wrong. Anyway, in your case it seems if_bxe(4) is the root
cause, not a configuration mismatch.

-harry

___
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"