Rangeley C2758: missed IOMMU support for Xen Dom0

2017-05-25 Thread Alex Deiter
Hello,

Could you please help me understand what and were i did wrong?  

Running a FreeBSD 12.0-CURRENT-r318425 GENERIC-NODEBUG and trying to install 
Xen Dom0 (xen-4.7.0_2 from ports).

HW setup:
Supermicro A1SRM-2758F [Intel Rangeley Atom processor C2758]
Motherboard spec: 
http://supermicro.com/products/motherboard/Atom/X10/A1SRM-2758F.cfm
CPU spec: 
https://ark.intel.com/products/77988/Intel-Atom-Processor-C2758-4M-Cache-2_40-GHz

loader.conf:
hw.pci.mcfg=0
xen_kernel="/boot/xen"
xen_cmdline="dom0_mem=2048M dom0_max_vcpus=4 dom0pvh=1 com1=115200,8n1 
com2=115200,8n1 console=com2 guest_loglvl=all loglvl=all"

Xen Dom0 boot failed with error
Full boot log - https://cloud.deiter.ru/index.php/s/bg5lQSjPPSkiTAq

...
(XEN) I/O virtualisation disabled
...
(XEN) 
(XEN) Panic on CPU 0:
(XEN) Presently, iommu must be enabled for PVH hardware domain
(XEN)
(XEN) 
 

Boot without Xen kernel is OK
Full boot log - https://cloud.deiter.ru/index.php/s/lUXLPnPSTWqqQNO

...
CPU: Intel(R) Atom(TM) CPU  C2758  @ 2.40GHz (2400.06-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x406d8  Family=0x6  Model=0x4d  Stepping=8
  
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  
Features2=0x43d8e3bf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,TSCDLT,AESNI,RDRAND>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x101<LAHF,Prefetch>
  Structured Extended Features=0x2282<TSCADJ,SMEP,ERMS,NFPUSG>
  VT-x: Basic Features=0xda0400<SMM,INS/OUTS,TRUE>
Pin-Based Controls=0x7f<ExtINT,NMI,VNMI,PreTmr>
Primary Processor 
Controls=0xfff9fffe<INTWIN,TSCOff,HLT,INVLPG,MWAIT,RDPMC,RDTSC,CR3-LD,CR3-ST,CR8-LD,CR8-ST,TPR,NMIWIN,MOV-DR,IO,IOmap,MTF,MSRmap,MONITOR,PAUSE>
Secondary Processor 
Controls=0x28ef<APIC,EPT,DT,RDTSCP,VPID,WBINVD,UG,RDRAND,VMFUNC>
Exit Controls=0xda0400<PAT-LD,EFER-SV,PTMR-SV>
Entry Controls=0xda0400
EPT Features=0x6114141<XO,PW4,UC,WB,2M,INVEPT,single,all>
VPID Features=0xf01<INVVPID,individual,single,all,single-globals>
...
pci0:  at device 15.0 (no driver attached)
pci0:  at device 19.0 (no driver attached)
...

# pciconf -lv
none1@pci0:0:15:0:  class=0x080600 card=0x082015d9 chip=0x1f168086 rev=0x02 
hdr=0x00
vendor = 'Intel Corporation'
device     = 'Atom processor C2000 RCEC'
class  = base peripheral
subclass   = IOMMU


Thank you!

Alex Deiter
alex.dei...@gmail.com



___
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: Build fails in libpcap with WITHOUT_INET6

2017-03-28 Thread Alex Deiter
Hello,

Please apply patch from upstream:

https://github.com/the-tcpdump-group/libpcap/pull/541

Fix compilation if INET6 isn't defined.
Addresses GitHub issue #541, but differently from the pull request (it
defines gen_gateway() with a function prototype rather than using a
pre-prototype-style definition).

https://github.com/the-tcpdump-group/libpcap/commit/470df104c6f55f6d6f390df7448d8eb65c7642b9#diff-021c0dd9e9ed7100b9e31d8d95c930f2

Thank you!

Alex Deiter
alex.dei...@gmail.com



> On 28 Mar 2017, at 19:31, Randy Westlund <rwest...@gmail.com> wrote:
> 
> Building r315872 for the Tegra (arm/armv6) board with WITHOUT_INET6 set fails
> in libpcap:
> 
>> --- klm_prot_xdr.pico ---
>> cc -target armv6-gnueabihf-freebsd12.0 --sysroot=/usr/home/randy/tegra/freebs
>> d-obj/arm.armv6/usr/home/randy/tegra/freebsd/tmp -B/usr/home/randy/tegra/free
>> bsd-obj/arm.armv6/usr/home/randy/tegra/freebsd/tmp/usr/bin -fpic -DPIC -g -O
>> -pipe   -DYP -I/usr/home/randy/tegra/freebsd-obj/arm.armv6/usr/home/randy/teg
>> ra/freebsd/tmp/usr/include/rpcsvc -MD  -MF.depend.klm_prot_xdr.pico -MTklm_pr
>> ot_xdr.pico -std=gnu99 -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-
>> body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compar
>> e -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-
>> conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switc
>> h -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses  -Qunused-arg
>> uments  -c klm_prot_xdr.c -o klm_prot_xdr.pico
>> --- all_subdir_lib/libpcap ---
>> /usr/home/randy/tegra/freebsd/contrib/libpcap/gencode.c:695:9: error: no memb
>> er named 'ai' in 'struct _compiler_state'
>>cstate.ai = NULL;
>>~~ ^
>> --- all_subdir_lib/librpcsvc ---
>> --- mount_xdr.pico ---
>> cc -target armv6-gnueabihf-freebsd12.0 --sysroot=/usr/home/randy/tegra/freebs
>> d-obj/arm.armv6/usr/home/randy/tegra/freebsd/tmp -B/usr/home/randy/tegra/free
>> bsd-obj/arm.armv6/usr/home/randy/tegra/freebsd/tmp/usr/bin -fpic -DPIC -g -O
>> -pipe   -DYP -I/usr/home/randy/tegra/freebsd-obj/arm.armv6/usr/home/randy/teg
>> ra/freebsd/tmp/usr/include/rpcsvc -MD  -MF.depend.mount_xdr.pico -MTmount_xdr
>> .pico -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-conver
>> sion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno
>> -switch-enum -Wno-knr-promoted-parameter -Wno-parentheses  -Qunused-arguments
>>  -c mount_xdr.c -o mount_xdr.pico
>> --- all_subdir_lib/libpcap ---
>> /usr/home/randy/tegra/freebsd/contrib/libpcap/gencode.c:4916:13: error: use o
>> f undeclared identifier 'cstate'
>>bpf_error(cstate, "direction applied to 'gateway'");
>>  ^
>> /usr/home/randy/tegra/freebsd/contrib/libpcap/gencode.c:4923:11: error: use o
>> f undeclared identifier 'cstate'
>>switch (cstate->linktype) {
>>^
>> /usr/home/randy/tegra/freebsd/contrib/libpcap/gencode.c:4961:17: error: use o
>> f undeclared identifier 'cstate'
>>b1 = gen_host(cstate, **alist++, 0x, proto, Q_OR, Q_H
>> OST);
>>  ^
>> /usr/home/randy/tegra/freebsd/contrib/libpcap/gencode.c:4963:19: error: use o
>> f undeclared identifier 'cstate'
>>tmp = gen_host(cstate, **alist++, 0x, proto,
>> Q_OR,
>>   ^
>> /usr/home/randy/tegra/freebsd/contrib/libpcap/gencode.c:4972:12: error: use o
>> f undeclared identifier 'cstate'
>>bpf_error(cstate, "illegal modifier of 'gateway'");
>>  ^
>> 6 errors generated.
>> *** [gencode.o] Error code 1
>> 
>> make[5]: stopped in /usr/home/randy/tegra/freebsd/lib/libpcap
>> 1 error
>> 
>> make[5]: stopped in /usr/home/randy/tegra/freebsd/lib/libpcap
>> *** [all_subdir_lib/libpcap] Error code 2
> 
> 

___
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: Boot failure - svn up from this morning

2017-03-07 Thread Alex Deiter
Hello Dexuan,

This issue reproduced at least for 4 different HW platform:

Supermicro 6037R-TXRF
Supermicro A1SRM-2758F
Supermicro X9SCM-F
Gigabyte GA-C1037UN-EU

How can I help you resolve this issue ?

Thank you! 

The same result for r314862:

>> FreeBSD EFI boot block
  Loader path: /boot/loader.efi

  Initializing modules: ZFS UFS
  Probing 16 block devices..*.+.. done
   ZFS found the following pools: zroot
   UFS found no partitions
Consoles: EFI console  
Staging area's size is reduced: 16384 -> 64!
Command line arguments: loader.efi
Image base: 0x6dc65000
EFI version: 2.31
EFI Firmware: American Megatrends (rev 5.08)

FreeBSD/amd64 EFI loader, Revision 1.1
EFI boot environment
Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0x9210f8 
elf64_loadimage: read failed
can't load file '/boot/kernel/kernel': input/output error
can't load file '/boot/kernel/kernel': input/output error

Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel] in 2 seconds... 

Type '?' for a list of commands, 'help' for more detailed help.
OK  
OK  memmap
  Type Physical  Virtual   #Pages Attr
  BootServicesCode   0008 UC WC WT WB 
ConventionalMemory 8000  0027 UC WC WT WB 
  BootServicesData 0002f000  0011 UC WC WT WB 
  BootServicesCode 0004  0060 UC WC WT WB 
ConventionalMemory 0010  0100 UC WC WT WB 
  BootServicesData 0020  0040 UC WC WT WB 
ConventionalMemory 0024  0003fd80 UC WC WT WB 
LoaderData 3ffc  0040 UC WC WT WB 
ConventionalMemory 4000  00029c65 UC WC WT WB 
LoaderData 69c65000  4000 UC WC WT WB 
LoaderCode 6dc65000  0071 UC WC WT WB 
LoaderData 6dcd6000  2171 UC WC WT WB 
LoaderCode 6fe47000  001d UC WC WT WB 
MemoryMappedIO 6fe64000  0014 UC WC WT WB 
  BootServicesData 6fe78000  ec32 UC WC WT WB 
ConventionalMemory 7eaaa000  037b UC WC WT WB 
  BootServicesCode 7ee25000  0285 UC WC WT WB 
  Reserved 7f0aa000  0075 UC WC WT WB 
ConventionalMemory 7f11f000  00ae UC WC WT WB 
 ACPIMemoryNVS 7f1cd000  027b UC WC WT WB 
   RuntimeServicesData 7f448000  01a7 UC WC WT WB 
   RuntimeServicesCode 7f5ef000  005c UC WC WT WB 
  BootServicesData 7f64b000  01b5 UC WC WT WB 
ConventionalMemory 0001  0078 UC WC WT WB 
MemoryMappedIO e000  4000 UC 
MemoryMappedIO fed01000  0003 UC 
MemoryMappedIO fed08000  0001 UC 
MemoryMappedIO fed0c000  0004 UC 
MemoryMappedIO fed1c000  0001 UC 
MemoryMappedIO fef0  1100 UC 
OK 


Thank you!


Alex Deiter
alex.dei...@gmail.com



> On 7 Mar 2017, at 06:45, Dexuan Cui <de...@microsoft.com> wrote:
> 
>> From: Dexuan Cui
>> Sent: Tuesday, March 7, 2017 11:18
>> To: 'Alex Deiter' <alex.dei...@gmail.com>
>> Cc: Chris H <bsd-li...@bsdforge.com>; AN <a...@neu.net>; Ngie Cooper
>> (yaneurabeya) <yaneurab...@gmail.com>; Michael Tuexen
>> <tue...@freebsd.org>; Roberto Rodriguez Jr <rob.rodz@gmail.com>; Guido
>> Falsi <m...@madpilot.net>; Warner Losh <i...@bsdimp.com>; Ultima
>> <ultima1...@gmail.com>; Sepherosa Ziehau <se...@freebsd.org>
>> Subject: RE: Boot failure - svn up from this morning
>> 
>>> From: Alex Deiter [mailto:alex.dei...@gmail.com]
>>> Sent: Tuesday, March 7, 2017 11:04
>>> To: Dexuan Cui <de...@microsoft.com>
>> 
>> 
>> Hi Alex,
>> Thanks very much for the quick reply!
>> 
>> I found an off-by-one bug in my patch and here is the fix.
>> I'll commit it shortly.
> 
> Hi Alex,
> I committed Revision 314828 for this:
> https://svnweb.freebsd.org/base?view=revision=314828
> 
> I believe it should fix the issue for you now. :-)
> 
> Thanks,
> -- Dexuan

___
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: Boot failure - svn up from this morning

2017-03-04 Thread Alex Deiter
Hello,

Screenshot: boot with patched loader: http://picpaste.com/IMG_1768-PnmZAtBZ.JPG
Video: boot with patched loader: https://youtu.be/thzyRk0D36w

Thank you!

Alex Deiter
alex.dei...@gmail.com



> On 3 Mar 2017, at 16:37, Dexuan Cui <de...@microsoft.com> wrote:
> 
>> From: Michael Tuexen
>> Sent: Friday, March 3, 2017 21:30
>>> BTW, I understand it's really annoying to boot the host first...
>>> I'm really sorry for this.
>>> 
>>> I suppose you're able to build or find a good 'loader.efi' binary on 
>>> another host,
>>> and  then manage to replace the bad 'loader.efi' on the host broken by me. 
>>> :-)
>> This problem also occurred on a Dell R430...
>> 
>> Best regards
>> Michael
> 
> Can you please use the patch to dump the

> :
> https://lists.freebsd.org/pipermail/freebsd-current/2017-March/064979.html
> 
> Let's get this fixed ASAP.
> 
> Thanks,
> -- Dexuan

___
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: Boot failure - svn up from this morning

2017-03-03 Thread Alex Deiter
Hello Dexuan,

Thank you for the patch!
I’ll test it and let you know the result.

Thank you!

Alex Deiter
alex.dei...@gmail.com



> On 3 Mar 2017, at 14:49, Dexuan Cui <de...@microsoft.com> wrote:
> 
>> From: Alex Deiter
>> Sent: Friday, March 3, 2017 17:22
>> 
>> Hello,
>> The same issue with FreeBSD 12.0-CURRENT-r314563:
>> elf64_loadimage: could not read symbols - skipped!
>> 
>> I suspect regression after:
>> 
>> Revision 314547 - Directory Listing
>> Modified Thu Mar 2 07:25:50 2017 UTC (25 hours, 54 minutes ago) by dexuan
>> loader.efi: reduce the size of the staging area if necessary
> 
> Yes, I believe the issue is caused by the patch, which is supposed to PR 
> 211746:
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746
> 
> Sorry for causing the issue to you, but I suspect the patch reveals a bug in 
> your
> host's firmware: the memory map reported by the host's firmware may be
> incorrect.
> 
> Can you please try the patch to dump the memory map?
> https://github.com/dcui/freebsd/commit/6094aac8ac9bddb24e3ac45493ac020c94029ce8.patch
> 
> And the patch will allow your host to boot.
> Note: there is a 10-second pause every time 5 lines are printed. This is to 
> make
> sure we have enough time to take a screenshot or photo. :-)
> 
> About how to apply the patch and build/install it:
> 'wget' the above patch, and 'cd' into your FREEBSD_SOURCE_ROOT/sys/boot/ and 
> run
> "patch -p3 < the_patch_name". If you have run 'make buildworld", just run 
> 'make' in the
> sys/boot/ directory and copy the new loader.efi into the boot folder, e.g. in 
> my side, I
> use
> cp -iv  /usr/obj/root/bsd.git/sys/boot/efi/loader/loader.efi /boot/loader.efi
> 
> Thanks,
> -- Dexuan

___
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: Boot failure - svn up from this morning

2017-03-03 Thread Alex Deiter
Hello,

The same issue with FreeBSD 12.0-CURRENT-r314563:

elf64_loadimage: could not read symbols - skipped!

http://picpaste.com/IMG_1764-vfZl1l5o.JPG

I suspect regression after: 

Revision 314547 - Directory Listing 
Modified Thu Mar 2 07:25:50 2017 UTC (25 hours, 54 minutes ago) by dexuan
loader.efi: reduce the size of the staging area if necessary

The loader assumes physical memory in [2MB, 2MB + EFI_STAGING_SIZE)
is Conventional Memory, but actually it may not, e.g. in the case
of Hyper-V Generation-2 VM (i.e. UEFI VM) running on Windows
Server 2012 R2 host, there is a BootServiceData memory block at
the address 47.449MB and the memory is not writable.

Without the patch, the loader will crash in efi_copy_finish():
see PR 211746.

The patch verifies the end of the staging area, and reduces its
size if necessary. This way, the loader will not try to write into
the BootServiceData memory any longer.

Thank Marcel Moolenaar for helping me on this issue!

The patch also allocates the staging area in the first 1GB memory.
See the comment in the patch for this.

PR: 211746
Reviewed by:marcel, kib, sephe
Approved by:sephe (mentor)
MFC after:  2 weeks
Sponsored by:   Microsoft
Differential Revision:  
https://reviews.freebsd.org/D9686

Alex Deiter
alex.dei...@gmail.com



> On 3 Mar 2017, at 09:20, Chris H <bsd-li...@bsdforge.com> wrote:
> 
> On Thu, 2 Mar 2017 21:32:39 -0800 "Ngie Cooper (yaneurabeya)"
> <yaneurab...@gmail.com> wrote
> 
>>> On Mar 2, 2017, at 21:16, Chris H <bsd-li...@bsdforge.com> wrote:
>>> 
>>> On Thu, 2 Mar 2017 21:56:38 -0500 (EST) AN <a...@neu.net> wrote
>>> 
>>>> Hi:
>>>> 
>>>> I'm having a major problem after updating a 12-current machine today.
>>>> After buildworld/kernel/install cycle on reboot I'm getting the following
>>>> failure:
>>>> 
>>>> "/boot/kernel/kernel text=0xb7716f data=0x100548+0x398358
>>>> elf64_loadimage: read failed
>>>> can't load file '/boot/kernel/kernel': input/output error
>>>> can't load file '/boot/kernel/kernel': input/output error
>>>> 
>>>> OK boot kernel.old
>>>> elf64_loadimage: read failed
>>>> can't load file '/boot/kernel.old/kernel': input/output error
>>>> can't load file '/boot/kernel.old/kernel': input/output error"
>>>> 
>>>> I have never experienced this failure before, and don't know how to
>>>> proceed.  Any help recovering from this would be greatly appreciated.
>>>> Thanks in advance.
>>> 
>>> I don't suppose you could post the output of
>>> uname -a
>>> 
>>> and maybe a copy of dmesg(8) could you?
>> 
>> That would be good, but I don’t know if it’s possible (the OP is noting
>> that the boot is broken when executing loader(8)..). -Ngie
> 
> Indeed. But that doesn't stop the OP from booting from the
> install media. ;-) :-)
> 
> --Chris
> 
> 
> ___
> 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"

___
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: Buildworld fails if WITHOUT_INET6=YES defined

2017-03-02 Thread Alex Deiter
Hello,

Please apply patch from upstream:

https://github.com/the-tcpdump-group/libpcap/pull/541

Fix compilation if INET6 isn't defined.
Addresses GitHub issue #541, but differently from the pull request (it
defines gen_gateway() with a function prototype rather than using a
pre-prototype-style definition).

https://github.com/the-tcpdump-group/libpcap/commit/470df104c6f55f6d6f390df7448d8eb65c7642b9#diff-021c0dd9e9ed7100b9e31d8d95c930f2

Thank you!

Alex Deiter
alex.dei...@gmail.com



> On 18 Feb 2017, at 00:09, Bryan Drewery <bdrew...@freebsd.org> wrote:
> 
> On 2/17/2017 1:03 PM, Bryan Drewery wrote:
>> On 2/16/2017 10:07 AM, Ngie Cooper (yaneurabeya) wrote:
>>> 
>>>> On Feb 16, 2017, at 07:30, Oleg V. Nauman <o...@opentransfer.com> wrote:
>>>> 
>>>> cc -target i386-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/tmp -
>>>> B/usr/obj/usr/src/tmp/usr/bin  -O2 -pipe -march=core2  -DHAVE_CONFIG_H -
>>>> I/usr/src/lib/libpcap -I/usr/obj/usr/src/lib/libpcap -
>>>> D_U_="__attribute__((unused))" -DHAVE_SNPRINTF -DHAVE_VSNPRINTF -
>>>> DBUILDING_PCAP -DHAVE_NET_PFVAR_H -I/usr/src/contrib/libpcap -MD  -
>>>> MF.depend.fad-getad.o -MTfad-getad.o -std=gnu99 -fstack-protector-strong 
>>>> -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-switch 
>>>> -
>>>> Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses  -Qunused-
>>>> arguments  -c /usr/src/contrib/libpcap/fad-getad.c -o fad-getad.o
>>>> cc -target i386-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/tmp -
>>>> B/usr/obj/usr/src/tmp/usr/bin  -O2 -pipe -march=core2  -DHAVE_CONFIG_H -
>>>> I/usr/src/lib/libpcap -I/usr/obj/usr/src/lib/libpcap -
>>>> D_U_="__attribute__((unused))" -DHAVE_SNPRINTF -DHAVE_VSNPRINTF -
>>>> DBUILDING_PCAP -DHAVE_NET_PFVAR_H -I/usr/src/contrib/libpcap -MD  -
>>>> MF.depend.gencode.o -MTgencode.o -std=gnu99 -fstack-protector-strong -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-switch 
>>>> -
>>>> Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses  -Qunused-
>>>> arguments  -c /usr/src/contrib/libpcap/gencode.c -o gencode.o
>>>> /usr/src/contrib/libpcap/gencode.c:695:9: error: no member named 'ai' in
>>>> 'struct _compiler_state'
>>>>   cstate.ai = NULL;
>>>>   ~~ ^
>>>> /usr/src/contrib/libpcap/gencode.c:4916:13: error: use of undeclared
>>>> identifier 'cstate'
>>>>   bpf_error(cstate, "direction applied to 'gateway'");
>>>> ^
>>>> /usr/src/contrib/libpcap/gencode.c:4923:11: error: use of undeclared
>>>> identifier 'cstate'
>>>>   switch (cstate->linktype) {
>>>>   ^
>>>> /usr/src/contrib/libpcap/gencode.c:4961:17: error: use of undeclared
>>>> identifier 'cstate'
>>>>   b1 = gen_host(cstate, **alist++, 0x, proto, Q_OR,
>>>> Q_HOST);
>>>> ^
>>>> /usr/src/contrib/libpcap/gencode.c:4963:19: error: use of undeclared
>>>> identifier 'cstate'
>>>>   tmp = gen_host(cstate, **alist++, 0x, proto,
>>>> Q_OR,
>>>>  ^
>>>> /usr/src/contrib/libpcap/gencode.c:4972:12: error: use of undeclared
>>>> identifier 'cstate'
>>>>   bpf_error(cstate, "illegal modifier of 'gateway'");
>>>> ^
>>>> 6 errors generated.
>>>> *** Error code 1
>>>> 
>>>> Stop.
>>>> make[5]: stopped in /usr/src/lib/libpcap
>>>> *** Error code 1
>>> 
>>> CCing Xin, who did the libpcap upgrade.
>>> -Ngie
>>> 
>> 
>> I get an error even with INET6 building grammar.o:
>> 
>>> /root/git/freebsd/contrib/libpcap/grammar.y:348:15: error: use of 
>>> undeclared identifier 'cstate'; did you mean 'cstat'?
>>>finish_parse(cstate, yystack.l_mark[0].blk.b);   
>&g

Re: HEAD [r313048] WITHOUT_INET6: tcpdump build failure

2017-02-01 Thread Alex Deiter
Hello,

Please review attached patch.

Thank you!

Alex Deiter
alex.dei...@gmail.com

Index: usr.sbin/tcpdump/tcpdump/Makefile
===
--- usr.sbin/tcpdump/tcpdump/Makefile   (revision 313074)
+++ usr.sbin/tcpdump/tcpdump/Makefile   (working copy)
@@ -36,6 +36,7 @@
print-ascii.c \
print-atalk.c \
print-atm.c \
+   print-babel.c \
print-beep.c \
print-bfd.c \
print-bgp.c \
@@ -50,6 +51,7 @@
print-cnfp.c \
print-dccp.c \
print-decnet.c \
+   print-dhcp6.c \
print-domain.c \
print-dtp.c \
print-dvmrp.c \
@@ -62,6 +64,7 @@
print-fddi.c \
print-forces.c \
print-fr.c \
+   print-frag6.c \
print-ftp.c \
print-geneve.c \
print-geonet.c \
@@ -70,10 +73,12 @@
print-hsrp.c \
print-http.c \
print-icmp.c \
+   print-icmp6.c \
print-igmp.c \
print-igrp.c \
print-ip.c \
print-ip6.c \
+   print-ip6opts.c \
print-ipcomp.c \
print-ipfc.c \
print-ipnet.c \
@@ -96,6 +101,7 @@
print-m3ua.c \
print-medsa.c \
print-mobile.c \
+   print-mobility.c \
print-mpcp.c \
print-mpls.c \
print-mptcp.c \
@@ -109,6 +115,7 @@
print-openflow.c \
print-openflow-1.0.c \
print-ospf.c \
+   print-ospf6.c \
print-otv.c \
print-pgm.c \
print-pim.c \
@@ -121,9 +128,11 @@
print-raw.c \
print-resp.c \
print-rip.c \
+   print-ripng.c \
print-rpki-rtr.c \
print-rrcp.c \
print-rsvp.c \
+   print-rt6.c \
print-rtsp.c \
print-rx.c \
print-sctp.c \
@@ -171,15 +180,6 @@
 CFLAGS+= -D_U_="__attribute__((unused))"
 
 .if ${MK_INET6_SUPPORT} != "no"
-SRCS+= print-babel.c \
-   print-dhcp6.c \
-   print-frag6.c \
-   print-icmp6.c \
-   print-ip6opts.c \
-   print-mobility.c \
-   print-ospf6.c \
-   print-ripng.c \
-   print-rt6.c
 CFLAGS+=   -DINET6 -DHAVE_OS_IPV6_SUPPORT
 .endif
 .if ${MACHINE_CPUARCH} != "i386"
___
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"

HEAD [r313048] WITHOUT_INET6: tcpdump build failure

2017-02-01 Thread Alex Deiter
Hello,

Please take a look HEAD [r313048] - buildworld failed for IPv4-only system 
(WITHOUT_INET6):

cc -target x86_64-unknown-freebsd12.0 
--sysroot=/export/freebsd/obj/export/freebsd/src/tmp 
-B/export/freebsd/obj/export/freebsd/src/tmp/usr/bin  -O2 -pipe   
-I/export/freebsd/sr
c/usr.bin/ftp -I/export/freebsd/src/usr.bin/ftp/../../contrib/tnftp -DNDEBUG 
-MD  -MF.depend.util.o -MTutil.o -std=gnu99 -fstack-protector-strong 
-Wsystem-headers -Wall -Wno-for
mat-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body 
-Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare 
-Wno-unused-value -Wno-parentheses-equalit
y -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef 
-Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments  
-c /export/freebsd/src/usr.bi
n/ftp/../../contrib/tnftp/src/util.c -o util.o
--- all_subdir_usr.sbin ---
print-ip6.o: In function `ip6_print':
/export/freebsd/src/usr.sbin/tcpdump/tcpdump/../../../contrib/tcpdump/print-ip6.c:(.text+0x4c6):
 undefined reference to `hbhopt_print'
/export/freebsd/src/usr.sbin/tcpdump/tcpdump/../../../contrib/tcpdump/print-ip6.c:(.text+0x4d9):
 undefined reference to `rt6_print'
/export/freebsd/src/usr.sbin/tcpdump/tcpdump/../../../contrib/tcpdump/print-ip6.c:(.text+0x530):
 undefined reference to `dstopt_print'
/export/freebsd/src/usr.sbin/tcpdump/tcpdump/../../../contrib/tcpdump/print-ip6.c:(.text+0x574):
 undefined reference to `frag6_print'
/export/freebsd/src/usr.sbin/tcpdump/tcpdump/../../../contrib/tcpdump/print-ip6.c:(.text+0x60b):
 undefined reference to `mobility_print'
/export/freebsd/src/usr.sbin/tcpdump/tcpdump/../../../contrib/tcpdump/print-ip6.c:(.text+0x6ba):
 undefined reference to `icmp6_print'
/export/freebsd/src/usr.sbin/tcpdump/tcpdump/../../../contrib/tcpdump/print-ip6.c:(.text+0x6da):
 undefined reference to `ospf6_print'
print-udp.o: In function `udp_print':
/export/freebsd/src/usr.sbin/tcpdump/tcpdump/../../../contrib/tcpdump/print-udp.c:(.text+0x13e0):
 undefined reference to `ripng_print'
/export/freebsd/src/usr.sbin/tcpdump/tcpdump/../../../contrib/tcpdump/print-udp.c:(.text+0x13ff):
 undefined reference to `dhcp6_print'
/export/freebsd/src/usr.sbin/tcpdump/tcpdump/../../../contrib/tcpdump/print-udp.c:(.text+0x143d):
 undefined reference to `babel_print'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [tcpdump] Error code 1

make[5]: stopped in /export/freebsd/src/usr.sbin/tcpdump/tcpdump
1 error

Thank you!

Alex Deiter
alex.dei...@gmail.com



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


CURRENT [r312928] TCP_RFC7413 kernel panic

2017-01-28 Thread Alex Deiter
Hello,

The most recent CURRENT [r312928] with enabled kernel option TCP_RFC7413 panics 
spontaneously:

Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 02
fault virtual address   = 0x28
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x808a4555
stack pointer   = 0x28:0xfe083bf738b0
frame pointer   = 0x28:0xfe083bf738d0
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 12 (swi4: clock (0))
[ thread pid 12 tid 18 ]
Stopped at  tcp_fastopen_autokey_locked+0x35:   movq0x28(%rax),%rax

db> bt
Tracing pid 12 tid 18 td 0xf80007383500
tcp_fastopen_autokey_locked() at tcp_fastopen_autokey_locked+0x35/frame 
0xfe083bf738d0
tcp_fastopen_autokey_callout() at tcp_fastopen_autokey_callout+0x2d/frame 
0xfe083bf73900
softclock_call_cc() at softclock_call_cc+0x156/frame 0xfe083bf739b0
softclock() at softclock+0x94/frame 0xfe083bf739e0
intr_event_execute_handlers() at intr_event_execute_handlers+0x20f/frame 
0xfe083bf73a20
ithread_loop() at ithread_loop+0xc6/frame 0xfe083bf73a70
fork_exit() at fork_exit+0x85/frame 0xfe083bf73ab0
fork_trampoline() at fork_trampoline+0xe/frame 0xfe083bf73ab0
--- trap 0, rip = 0, rsp = 0, rbp = 0 ---
db> 

Thank you!

Alex Deiter
alex.dei...@gmail.com



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


CURRENT [r309933] broke syslogd on IPv4 only system

2017-01-28 Thread Alex Deiter
Hello,

Please take a look SVN r309933:

r309933 | hrs | 2016-12-12 22:33:40 +0300 (Mon, 12 Dec 2016) | 13 lines

- Refactor listening socket list.  All of the listening sockets are
  now maintained in a single linked-list in a transport-independent manner.
- Use queue.h for linked-list structure.
- Use linked-list for AllowedPeers.
- Use getaddrinfo(8) even for Unix Domain sockets.
- Use macros to type-casting from/to struct sockaddr{,_in,_in6}.
- Define fu_* macro for union f_un to shorten the member names.
- Remove an extra #include .
- Add "static" to non-exported symbols.
- !INET support is still incomplete but will be fixed later.

There is no functional change except for some minor debug messages.


After this change syslogd is not listen on local sockets:

# /usr/sbin/syslogd -d
Try (null)
new socket fd is 6
shutdown
sending on socket
Try /var/run/log
Try /var/run/logpriv
off & running
init
loading timezone data via tzset()
. . .

# sockstat | grep syslogd
root syslogd19151 6  udp4   *:514 *:*

# ls -l /var/run/ |grep log
-rw---  1 root   wheel5 Jan 28 14:30 syslog.pid

Root cause:

usr.sbin/syslogd/syslogd.c
. . .
309 #ifdef INET6
310 static int  family = PF_UNSPEC; /* protocol family (IPv4, IPv6 or 
both) */
311 #else
312 static int  family = PF_INET; /* protocol family (IPv4 only) */
313 #endif
. . .
   2856 static int
   2857 socksetup(struct peer *pe)
. . .
2911 if (family != AF_UNSPEC && res->ai_family != family)
   2912 continue;

in case of IPv4-only system (WITHOUT_INET6=YES in /etc/src.conf) we have family 
= PF_INET in 312 line and function socksetup will skip listen on local sockets.

Proposed patch:

Index: syslogd.c
===
--- syslogd.c   (revision 312909)
+++ syslogd.c   (working copy)
@@ -2908,7 +2908,7 @@
/* Only AF_LOCAL in secure mode. */
continue;
}
-   if (family != AF_UNSPEC && res->ai_family != family)
+   if (res->ai_family != AF_LOCAL && res->ai_family != family)
continue;

s = socket(res->ai_family, res->ai_socktype,

Successfully tested on IPv4-only CURRENT r312856M.

Thank you! 

Alex Deiter
alex.dei...@gmail.com



___
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: Revision 312827 fatal error: 'opt_printf.h' file not found

2017-01-26 Thread Alex Deiter
Hello,

Thank you!

Alex Deiter
alex.dei...@gmail.com



> On 27 Jan 2017, at 03:22, Jung-uk Kim <j...@freebsd.org> wrote:
> 
> On 01/26/2017 19:17, Alex Deiter wrote:
>> Hello,
>> 
>> patch:
>> 
>> Index: sys/cam/cam_xpt.h
>> ===
>> --- sys/cam/cam_xpt.h   (revision 312851)
>> +++ sys/cam/cam_xpt.h   (working copy)
>> @@ -33,7 +33,10 @@
>> #define _CAM_CAM_XPT_H 1
>> 
>> #include 
>> +
>> +#ifdef _KERNEL
>> #include "opt_printf.h"
>> +#endif  /* _KERNEL */
>> 
>> Please take a look at the rev 312827:
>> 
>> --- scsi_da.o ---
>> cc -target x86_64-unknown-freebsd12.0 
>> --sysroot=/export/freebsd/obj/export/freebsd/src/tmp 
>> -B/export/freebsd/obj/export/freebsd/src/tmp/usr/bin  -O2 -pipe 
>> -I/export/freebsd/src/lib/libcam -I/export/freebsd/src/sys   -DNDEBUG -MD  
>> -MF.depend.scsi_da.o -MTscsi_da.o -std=gnu99 -fstack-protector-strong 
>> -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -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-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments 
>>  -c /export/freebsd/src/sys/cam/scsi/scsi_da.c -o scsi_da.o
>> --- scsi_all.o ---
>> In file included from /export/freebsd/src/sys/cam/scsi/scsi_all.c:59:
>> /export/freebsd/src/sys/cam/cam_xpt.h:36:10: fatal error: 'opt_printf.h' 
>> file not found
>> #include "opt_printf.h"
> 
> I committed a fix already (r312852).
> 
> Jung-uk Kim

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


Revision 312827 fatal error: 'opt_printf.h' file not found

2017-01-26 Thread Alex Deiter
Hello,

patch:

Index: sys/cam/cam_xpt.h
===
--- sys/cam/cam_xpt.h   (revision 312851)
+++ sys/cam/cam_xpt.h   (working copy)
@@ -33,7 +33,10 @@
 #define _CAM_CAM_XPT_H 1

 #include 
+
+#ifdef _KERNEL
 #include "opt_printf.h"
+#endif  /* _KERNEL */

Please take a look at the rev 312827:

--- scsi_da.o ---
cc -target x86_64-unknown-freebsd12.0 
--sysroot=/export/freebsd/obj/export/freebsd/src/tmp 
-B/export/freebsd/obj/export/freebsd/src/tmp/usr/bin  -O2 -pipe 
-I/export/freebsd/src/lib/libcam -I/export/freebsd/src/sys   -DNDEBUG -MD  
-MF.depend.scsi_da.o -MTscsi_da.o -std=gnu99 -fstack-protector-strong 
-Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -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-switch 
-Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments  -c 
/export/freebsd/src/sys/cam/scsi/scsi_da.c -o scsi_da.o
--- scsi_all.o ---
In file included from /export/freebsd/src/sys/cam/scsi/scsi_all.c:59:
/export/freebsd/src/sys/cam/cam_xpt.h:36:10: fatal error: 'opt_printf.h' file 
not found
#include "opt_printf.h"
    ^

Thank you!

Alex Deiter
alex.dei...@gmail.com



___
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: CURRENT [r308668] autofs kernel panic

2017-01-23 Thread Alex Deiter
Hello Edward,

Thank you!

Alex Deiter
alex.dei...@gmail.com



> On 23 Jan 2017, at 14:51, Edward Tomasz Napierała <tr...@freebsd.org> wrote:
> 
> For the record, this was fixed in r311284.
> 
> On 1115T2021, Alex Deiter wrote:
>> Hello Edward,
>> 
>> Thank you for the quick reply!
>> I was able to reproduce this panic on default GENERIC kernel (my test
>> system and laptop):
>> 
>> # kgdb /boot/kernel/kernel /var/crash/vmcore.2
>> 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"...
>> 
>> Unread portion of the kernel message buffer:
>> kernel trap 12 with interrupts disabled
>> 
>> 
>> Fatal trap 12: page fault while in kernel mode
>> cpuid = 3; apic id = 06
>> fault virtual address = 0xe0
>> fault code = supervisor read data, page not present
>> instruction pointer = 0x20:0x809fe487
>> stack pointer= 0x28:0xfe085f5d4560
>> frame pointer= 0x28:0xfe085f5d45b0
>> code segment = base 0x0, limit 0xf, type 0x1b
>> = DPL 0, pres 1, long 1, def32 0, gran 1
>> processor eflags = resume, IOPL = 0
>> current process = 0 (pkg)
> 
> [..]
> 

___
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: CURRENT [r308668] autofs kernel panic

2016-11-15 Thread Alex Deiter
Hello Edward,

Thank you for the quick reply!
I was able to reproduce this panic on default GENERIC kernel (my test
system and laptop):

# kgdb /boot/kernel/kernel /var/crash/vmcore.2
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"...

Unread portion of the kernel message buffer:
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 06
fault virtual address = 0xe0
fault code = supervisor read data, page not present
instruction pointer = 0x20:0x809fe487
stack pointer= 0x28:0xfe085f5d4560
frame pointer= 0x28:0xfe085f5d45b0
code segment = base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = resume, IOPL = 0
current process = 0 (pkg)

kgdb: kvm_read: invalid address (0x)
Reading symbols from /boot/kernel/zfs.ko...Reading symbols from
/usr/lib/debug//boot/kernel/zfs.ko.debug...done.
done.
Loaded symbols for /boot/kernel/zfs.ko
Reading symbols from /boot/kernel/opensolaris.ko...Reading symbols
from /usr/lib/debug//boot/kernel/opensolaris.ko.debug...done.
done.
Loaded symbols for /boot/kernel/opensolaris.ko
Reading symbols from /boot/kernel/ums.ko...Reading symbols from
/usr/lib/debug//boot/kernel/ums.ko.debug...done.
done.
Loaded symbols for /boot/kernel/ums.ko
Reading symbols from /boot/kernel/autofs.ko...Reading symbols from
/usr/lib/debug//boot/kernel/autofs.ko.debug...done.
done.
Loaded symbols for /boot/kernel/autofs.ko
#0  0x in ?? ()
(kgdb)


(kgdb) bt
#0  0x in ?? ()
Cannot access memory at address 0x0
(kgdb)

Please take a look attached file. Let me know how I can assist further.

Thank you!

2016-11-15 19:31 GMT+03:00 Edward Tomasz Napierała <tr...@freebsd.org>:
> On 1115T1016, Alex Deiter wrote:
>> Hello,
>>
>> FreeBSD 12.0-CURRENT-r308668 amd64 crashed on "pkg install” command:
>>
>> # cat /usr/local/etc/pkg/repos/local.conf
>> local: {
>> url: "file:///net/nostromo/var/devel/pkg",
>> enabled: yes
>> }
>>
>> Path /net/nostromo/var/devel/pkg accessible via autofs/automountd:
>>
>> # ls /net/nostromo/var/devel/pkg
>> All Latest digests.txz meta.txz packagesite.txz
>>
>> # mount -t nfs
>> nostromo:/var/devel/pkg on /net/nostromo/var/devel/pkg (nfs, nosuid,
>> automounted)
>>
>> # kgdb /usr/lib/debug/boot/kernel/kernel.debug /var/crash/vmcore.0
>> ...
>> Unread portion of the kernel message buffer:
>> kernel trap 12 with interrupts disabled
>>
>>
>> Fatal trap 12: page fault while in kernel mode
>> cpuid = 0; apic id = 00
>> fault virtual address = 0x100df
>> fault code = supervisor read data, page not present
>> instruction pointer = 0x20:0x8063c88d
>> stack pointer = 0x28:0xfe085f966520
>> frame pointer = 0x28:0xfe085f966570
>> code segment = base 0x0, limit 0xf, type 0x1b
>> = DPL 0, pres 1, long 1, def32 0, gran 1
>> processor eflags = resume, IOPL = 0
>> current process = -134214453 (pkg)
>>
>> kgdb: kvm_read: invalid address (0x6c6576656c6572)
>> kgdb: kvm_read: invalid address (0xf8000ce021d8)
>> #0  0x in ?? ()
>> (kgdb) list *0x8063c88d
>> 0x8063c88d is in hardclock_cnt (/usr/src/sys/kern/kern_clock.c:568).
>
> [..]
>
> It looks a bit weird - the "kvm_read" errors, and also the one-function
> traceback that contains only one function, that seems unrelated to autofs.
> Are you sure you're using the right kernel?  Could you try the usual
>
> kgdb /boot/kernel/kernel /var/crash/vmcore.0
>
> instead?  Thanks!
>



-- 
Alex Deiter
serenity.deiter.local dumped core - see /var/crash/vmcore.2

Tue Nov 15 20:11:24 MSK 2016

FreeBSD serenity.deiter.local 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r308668M: 
Tue Nov 15 19:46:51 MSK 2016 
root@nostromo.deiter.local:/usr/obj/usr/src/sys/GENERIC  amd64

panic: 

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"...kgdb: kvm_read: invalid 
address (0x)


Unrea

CURRENT [r308668] autofs kernel panic

2016-11-15 Thread Alex Deiter
Hello,

FreeBSD 12.0-CURRENT-r308668 amd64 crashed on "pkg install” command:

# cat /usr/local/etc/pkg/repos/local.conf
local: {
url: "file:///net/nostromo/var/devel/pkg",
enabled: yes
}

Path /net/nostromo/var/devel/pkg accessible via autofs/automountd:

# ls /net/nostromo/var/devel/pkg
All Latest digests.txz meta.txz packagesite.txz

# mount -t nfs
nostromo:/var/devel/pkg on /net/nostromo/var/devel/pkg (nfs, nosuid,
automounted)

# kgdb /usr/lib/debug/boot/kernel/kernel.debug /var/crash/vmcore.0
...
Unread portion of the kernel message buffer:
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address = 0x100df
fault code = supervisor read data, page not present
instruction pointer = 0x20:0x8063c88d
stack pointer = 0x28:0xfe085f966520
frame pointer = 0x28:0xfe085f966570
code segment = base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = resume, IOPL = 0
current process = -134214453 (pkg)

kgdb: kvm_read: invalid address (0x6c6576656c6572)
kgdb: kvm_read: invalid address (0xf8000ce021d8)
#0  0x in ?? ()
(kgdb) list *0x8063c88d
0x8063c88d is in hardclock_cnt (/usr/src/sys/kern/kern_clock.c:568).
563 if (itimerdecr(>p_timer[ITIMER_VIRTUAL],
564 tick * cnt) == 0)
565 flags |= TDF_ALRMPEND | TDF_ASTPENDING;
566 PROC_ITIMUNLOCK(p);
567 }
568 if (timevalisset(>p_timer[ITIMER_PROF].it_value)) {
569 PROC_ITIMLOCK(p);
570 if (itimerdecr(>p_timer[ITIMER_PROF],
571 tick * cnt) == 0)
572 flags |= TDF_PROFPEND | TDF_ASTPENDING;
(kgdb)

This kernel panic can be easy reproduce. Please let me know how I can
assist further.

Please take a look core.txt.0 => http://pastebin.ca/3739082

Thank you!

Alex Deiter
alex.dei...@gmail.com



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

CURRENT [r308040] watchdogd regression

2016-11-09 Thread Alex Deiter
Hello,

Just found that rev r308040 had introduced regression bug for watchdogd:

if watchdogd start by default (without parameters), it use 100% CPU:

  PID USERNAME  THR PRI NICE   SIZERES STATE   C   TIMEWCPU COMMAND
14954 root1 -52   r0  7524K  3496K CPU22   0:44 100.36% 
watchdogd

# truss -afd -p 14954
...
14954: 1.640554819 ioctl(4,WDIOCPATPAT,0xea60) = 0 (0x0)
14954: 1.640608166 stat("/etc",{ mode=drwxr-xr-x 
,inode=21,size=109,blksize=7168 }) = 0 (0x0)
14954: 1.642456843 ioctl(4,WDIOCPATPAT,0xea60) = 0 (0x0)
14954: 1.642511284 stat("/etc",{ mode=drwxr-xr-x 
,inode=21,size=109,blksize=7168 }) = 0 (0x0)
14954: 1.643971019 ioctl(4,WDIOCPATPAT,0xea60) = 0 (0x0)
14954: 1.644008391 stat("/etc",{ mode=drwxr-xr-x 
,inode=21,size=109,blksize=7168 }) = 0 (0x0)
14954: 1.645305166 ioctl(4,WDIOCPATPAT,0xea60) = 0 (0x0)
14954: 1.645329823 stat("/etc",{ mode=drwxr-xr-x 
,inode=21,size=109,blksize=7168 }) = 0 (0x0)
14954: 1.646621223 ioctl(4,WDIOCPATPAT,0xea60) = 0 (0x0)
14954: 1.646645072 stat("/etc",{ mode=drwxr-xr-x 
,inode=21,size=109,blksize=7168 }) = 0 (0x0)
14954: 1.647935561 ioctl(4,WDIOCPATPAT,0xea60) = 0 (0x0)


Root cause - uninitialized variable timeout_sec

https://svnweb.freebsd.org/base/head/usr.sbin/watchdogd/watchdogd.c?revision=308040=markup#l82

static u_int timeout_sec;

and changes, introduced in r308040:

774  if (nap > timeout_sec / 2)
775  nap = timeout_sec / 2;

Workaround: specify the desired timeout period in seconds: 

watchdogd_enable="YES"
watchdogd_flags="-t 128”

Thank you!

--
Alex Deiter
alex.dei...@gmail.com



___
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: Revision 205728: broken bluetooth mouse support

2010-05-07 Thread Alex Deiter
Hi Kal,

Thanks a lot for your patch!
I`m apply  this patch and my bt mouse work fine again!

For Hans:

 Which daemon is driving the BT mouse?
bthidd

patch for bthidd(8) works fine only WITH your patches for:
lib/libusbhid/data.c
sys/dev/usb/usb_hid.c
sys/dev/usb/usbhid.h

Thanks a lot!

2010/5/7 Kai Wang kaiwan...@gmail.com:
 On Fri, May 07, 2010 at 01:58:13AM +0400, Alex Deiter wrote:
 Hi,

 Bluetooth mouse support is broken after Revision 205728:

 http://svn.freebsd.org/viewvc/base?view=revisionrevision=205728

 When I move the mouse  - cursor stays in same place but moves the
 current position of the console.

 Proposed patch as an attachment. Could you please revew this ?

 Hi Alex,

 If we adopt your patch, usbhidctl(1) and usbhidaction(1) will be
 broken again on device with multiple report IDs.

 Could you please try if the attached patch for the bthidd(8)
 daemon works as well?

 Thanks,
 Kai




-- 
--
Alex Deiter
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Revision 205728: broken bluetooth mouse support

2010-05-06 Thread Alex Deiter
Hi,

Bluetooth mouse support is broken after Revision 205728:

http://svn.freebsd.org/viewvc/base?view=revisionrevision=205728

When I move the mouse  - cursor stays in same place but moves the
current position of the console.

Proposed patch as an attachment. Could you please revew this ?

Thanks a lot!

--
Alex Deiter
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

panic: NULL softc for 0

2003-11-21 Thread Alex Deiter
On recent -CURRENT + http://www.freebsd.org/~jhb/patches/acpi_irq.patch

panic: NULL softc for 0
cpuid = 0;
Debugger(panic)
Stopped at  Debugger+0x55:  xchgl   %ebx,in_Debugger.0
db tr
Debugger(c08983fd,0,c086865c,e041ccbc,100) at Debugger+0x55
panic(c086865c,0,80246,0,e041cce8) at panic+0x156
acpi_cpu_idle(e041cd0c,c065910c,c0957300,2,c0895fc0) at acpi_cpu_idle+0x30
cpu_idle(c0957300,2,c0895fc0,53,14b) at cpu_idle+0x28
idle_proc(0,e041cd48,c0895e5e,311,0) at idle_proc+0x3c
fork_exit(c06590d0,0,e041cd48) at fork_exit+0xb4
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xe041cd7c, ebp = 0 ---

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: panic: NULL softc for 0

2003-11-21 Thread Alex Deiter
 Is this an SMP box?  If so, please do:

This Intel® Server Board SE7501BR2 with one CPU and enabled Hyper-Threading.

   x/xl cpu_softc
   x/xl cpu_softc+4
   x/xl cpu_softc+8

panic: NULL softc for 0
cpuid = 0;
Debugger(panic)
Stopped at  Debugger+0x55:  xchgl   %ebx,in_Debugger.0
db x/xl cpu_softc
cpu_softc:  0
db x/xl cpu_softc+4
cpu_softc+0x4:  c68e8a00
db x/xl cpu_softc+8
cpu_softc+0x8:  0
db

 And send me the output of
   acpidump -t -d  tiamat-MachineType.asl

ok.

Thanks!

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


recent current panic: ic: bio_offset 0 wrong, should be 16844800

2003-11-13 Thread Alex Deiter
Recent i386 CURRENT panic at boot diskless PC:

Mounting root from nfs:
NFS ROOT: 1.1.1.1:/i386/netboot
Interface fxp0 IP-Address 1.1.1.2 Broadcast 1.1.1.255
Loading configuration files.
Entropy harvesting: interrupts ethernet point_to_point.
Starting file system checks:
cp: utmp: Read-only file system
/etc/rc.d/cleanvar: cannot create /var/run/clean_var: Read-only file system
+++ mount_md of /var
+++ populate /var using /etc/mtree/BSD.var.dist
+++ create log files based on the contents of /etc/newsyslog.conf
+++ create lastlog
ic: bio_offset 0 wrong, should be 16844800
Debugger(panic)
Stopped at  Debugger+0x54:  xchgl   %ebx,in_Debugger.0
db tr
Debugger(c083a924,c08fc1c0,c084129f,d628b774,100) at Debugger+0x54
panic(c084129f,0,0,1010800,0) at panic+0xd5
dev_strategy(c79f59e0,0,8100,d628b7b0,c0614d68) at dev_strategy+0xb8
spec_freeblks(d628b808,d628b834,c0751488,d628b808,0) at spec_freeblks+0xb2
spec_vnoperate(d628b808,0,1008,0,2b3) at spec_vnoperate+0x18
ffs_blkfree(c2c46000,c2d9d618,2021,0,800) at ffs_blkfree+0x1e8
handle_workitem_freeblocks(c2d7a400,0,0,d628b918,0) at
handle_workitem_freeblock
s+0x328
softdep_setup_freeblocks(c2dd4230,0,0,800,c79f59e0) at
softdep_setup_freeblocks+
0x8a3
ffs_truncate(c2dfee38,0,0,0,c1672d00) at ffs_truncate+0x6ff
handle_workitem_remove(c2ca7ee0,0,c2dd4230,1,d628bb8c) at
handle_workitem_remove
+0x1ab
softdep_setup_remove(c79f4388,c2dd4ec4,c2dd4230,1,d628bbb4) at
softdep_setup_rem
ove+0xcc
ufs_dirremove(c2de0e38,c2dd4230,800c,1,d628bbc0) at ufs_dirremove+0x16d
ufs_rmdir(d628bc20,d628bccc,c06b4424,d628bc20,d628bc1c) at ufs_rmdir+0xef
ufs_vnoperate(d628bc20,d628bc1c,2,c2ca6400,c08d2400) at ufs_vnoperate+0x18
kern_rmdir(c2c8ba00,bfbfef56,0,d628bd40,c07d0bb0) at kern_rmdir+0x1b4
rmdir(c2c8ba00,d628bd10,c0855704,3ee,1) at rmdir+0x22
syscall(2f,2f,2f,0,0) at syscall+0x2c0
Xint0x80_syscall() at Xint0x80_syscall+0x1d
--- syscall (137, FreeBSD ELF32, rmdir), eip = 0x280bd1af, esp = 0xbfbfee7c,
ebp
 = 0xbfbfee98 ---
db

Thanks!

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


panic: trap: fast data access mmu miss

2003-10-23 Thread Alex Deiter
I've got a panic on sparc64 5.1-CURRENT #0: Wed Oct 15:

panic: trap: fast data access mmu miss
cpuid = 0;
Debugger(panic)
Stopped at  Debugger+0x1c:  ta  %xcc, 1
db tr
panic() at panic+0x174
trap() at trap+0x394
-- fast data access mmu miss tar=0 %o7=0xc018b820 --
quotactl() at quotactl+0x98
syscall() at syscall+0x308
-- syscall (148, FreeBSD ELF64, quotactl) %o7=0x1e3044 --
userland() at 0x41187e88
user trace: trap %o7=0x1e3044
pc 0x41187e88, sp 0x7fddf11
pc 0x15149c, sp 0x7fde011
pc 0x151818, sp 0x7fde561
pc 0x1c771c, sp 0x7fde621
pc 0x1a64a4, sp 0x7fde6f1
pc 0x1b3904, sp 0x7fde971
pc 0x1d987c, sp 0x7fdeab1
pc 0x1d99c0, sp 0x7fdebb1
pc 0x1da06c, sp 0x7fdec91
pc 0x1db99c, sp 0x7fded61
pc 0x451ea8, sp 0x7fdee51
pc 0x133560, sp 0x7fdf0e1
pc 0x405d3f94, sp 0x7fdf1a1
done

Thanks!


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: panic: trap: fast data access mmu miss

2003-10-23 Thread Alex Deiter
 -- fast data access mmu miss tar=0 %o7=0xc018b820 --
 quotactl() at quotactl+0x98
 syscall() at syscall+0x308
It looks like you have quotas enabled.

No.

Can you please provide more
details of your setup and how to reproduce this problem?

my setup in details:

1. FreeBSD 4.7 i386 act as nfs server (hostname SERVER):

/etc/rc.conf:
portmap_enable=YES
nfs_server_enable=YES
nfs_client_enable=YES
nfs_reserved_port_only=YES
mountd_flags=-r

/etc/exports:
/home   -alldirs -maproot=0:0   CLIENT

# mount|grep home
/dev/vinum/home on /home (ufs, NFS exported, local, soft-updates)

On this machine also run samba-2.2.8a (build with quota support) with share
[homes].

2. FreeBSD 51. sparc64 CURRENT act as nfs client (hostname CLIENT):

portmap_enable=YES
nfs_client_enable=YES
nfs_server_enable=YES
nfs_reserved_port_only=YES
mountd_flags=-r
amd_enable=YES
amd_flags=-a /.amd -l syslog:local2 /net /etc/amd.net

/etc/amd.net:
/defaults   opts:=rw,grpid,resvport,vers=3,proto=tcp,nosuid,\
nodev,intr,quota,dumbtimer

SERVER   host==${key};type:=link;fs:=/home \
 host!=${key};type:=nfs;rhost:=${key};rfs:=/home

On this machine also run samba-3.0 (build with quota support) with share
[homes].

3. Windows server (samba domain member).

Steps:

1. User tiamat login on Windows server.
2. open Microsoft windows network, find SERVER and map \\SERVER\tiamat as
disk H:
3. open Microsoft windows network, find CLIENT and map \\CLIENT\tiamat as
disk G:

CLIENT (sparc64) automount (via amd) SERVER:/home:

#mount
SERVER:/home on /.amd/SERVER/home (nfs, nodev, nosuid)

# pw usershow tiamat
tiamat:*:1000:1000::0:0:Alex Deiter:/net/SERVER/tiamat:/usr/local/bin/bash

4. open My computer and double-click on disk G:
samba try to check disk quotas and sparc64 CLIENT panic:

panic: trap: fast data access mmu miss
cpuid = 0;
Debugger(panic)
Stopped at  Debugger+0x1c:  ta  %xcc, 1
db tr
panic() at panic+0x174
trap() at trap+0x394
-- fast data access mmu miss tar=0 %o7=0xc018b820 --
quotactl() at quotactl+0x98
syscall() at syscall+0x308
-- syscall (148, FreeBSD ELF64, quotactl) %o7=0x1e3044 --
userland() at 0x41187e88
user trace: trap %o7=0x1e3044
pc 0x41187e88, sp 0x7fde221
pc 0x15149c, sp 0x7fde321
pc 0x151818, sp 0x7fde871
pc 0x1c771c, sp 0x7fde931
pc 0x1a6938, sp 0x7fdea01
pc 0x1b3904, sp 0x7fdec81
pc 0x1d987c, sp 0x7fdedc1
pc 0x1d99c0, sp 0x7fdeec1
pc 0x1da06c, sp 0x7fdefa1
pc 0x1db99c, sp 0x7fdf071
pc 0x451ea8, sp 0x7fdf161
pc 0x133560, sp 0x7fdf3f1
pc 0x405d3f94, sp 0x7fdf4b1
done
db reboot

Thanks!

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: bug in NSS ?

2003-10-20 Thread Alex Deiter
 I have a problem with nss_ldap on FreeBSD.
 After tranfer users from /etc/passwd to ldap directories my users cannot
 send a mail via /usr/bin/mail | /usr/sbin/sendmail  program:

What are the contents of the /usr/local/lib/sasl*/Sendmail.conf file?
Is pwcheck_method set to saslauthd, or sasldb?
If it is set to saslauthd, what flags do you use for it (-a pam or -a
ldap)?

my /usr/local/lib/sasl2/Sendmail.conf:
pwcheck_method: auxprop
auxprop_plugin: sasldb

Thanks!

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


dump/restore locale supports

2003-08-06 Thread Alex Deiter
dump and restore support locale?
i want to restore files with russian filenames and see instead names of
files:

# locale
LANG=ru_RU.KOI8-R
LC_CTYPE=ru_RU.KOI8-R
LC_COLLATE=ru_RU.KOI8-R
LC_TIME=ru_RU.KOI8-R
LC_NUMERIC=ru_RU.KOI8-R
LC_MONETARY=ru_RU.KOI8-R
LC_MESSAGES=ru_RU.KOI8-R
LC_ALL=ru_RU.KOI8-R
# mkdir /home/_
# touch /home/_.txt
# ls -ld /home/_*
drwxr-xr-x  2 root  wheel  512  6  11:33 /home/_
-rw-r--r--  1 root  wheel0  6  11:52 /home/_.txt
# dump -0af home.dmp /home
.
DUMP: DUMP IS DONE
# restore -i -f home.dmp
restore  ls
.:
???_/
???_.txt
restore 

What to do ?

Thanks!




___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to [EMAIL PROTECTED]


vinum growfs

2003-01-20 Thread Alex Deiter
I get an error on 5.0-RELEASE when trying to grow vinum volume:

# growfs /dev/vinum/test
growfs: DIOCGDINFO failed

On http://www.freebsd.org/releases/5.0R/errata.html i see:

growfs(8) no longer works on  vinum(4) volumes (and presumably, on 
geom(4) entities) since these subsystems no longer fake disklabels, but 
 growfs(8) insists on examining a label.

Say me please, sometime growfs will learn to work with vinum volumes ?

Thanks!

--
Alex Deiter,
Mobile TeleSystems, Komi Republic


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message