Re: stable/11 -r307797 on BPi-M3 (cortex-a7): truss gets segmentation fault for handling unknown system call
On 2016-Oct-28, at 7:29 AM, John Baldwin wrote: > On Tuesday, October 25, 2016 11:40:38 AM Mark Millard wrote: >> [The following has been reported in: >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213778 .] >> >> In trying to build lang/gcc6 xgcc's cc1 got some SIGSYS examples. In trying >> to track things down I ran into truss getting a SIGSEGV when it tries to >> handle the situation. . . >> >> In truss's enter_syscall there is (from a live gdb on truss, after the >> segmentation fault): >> >> 380 t->cs.name = sysdecode_syscallname(t->proc->abi->abi, >> t->cs.number); >> 381 if (t->cs.name == NULL) >> (gdb) >> 382 fprintf(info->outfile, "-- UNKNOWN %s SYSCALL %d --\n", >> 383 t->proc->abi->type, t->cs.number); >> 384 >> 385 sc = get_syscall(t->cs.name, narg); >> 386 t->cs.nargs = sc->nargs; >> 387 assert(sc->nargs <= nitems(t->cs.s_args)); >> 388 >> 389 t->cs.sc = sc; >> >> (gdb) print *t >> $2 = {entries = {le_next = 0x0, le_prev = 0x20617070}, proc = 0x20617060, >> tid = 100150, in_syscall = 1, cs = {sc = 0x0, name = 0x0, number = >> 580828064, args = 0x2061b0c0, nargs = 0, >>s_args = 0x2061b0ec}, before = {tv_sec = 1477418265, tv_nsec = >> 492342263}, after = {tv_sec = 1477418265, tv_nsec = 492496630}} >> >> (gdb) print sc >> $3 = (struct syscall *) 0x0 >> >> So line 386 listed above gets a segmentation fault for sc->nargs when >> t->cs.name is a NULL pointer: sc ends up NULL. >> >> Looking at the two things that the fprintf on lines 382 and 383 would report: >> >> (gdb) print t->proc->abi->type >> $4 = 0x10166 "FreeBSD ELF32" >> >> (gdb) print t->cs.number >> $5 = 580828064 >> >> (gdb) print narg >> $6 = 0 >> >> (that last is for context for the get_syscall arguments). >> >> FYI: 580828064 = 0x229EBBA0 > > I have a patchset I have tested some in a git branch that I believe fixes > handling of > unknown system calls. Please try this: > > https://github.com/freebsd/freebsd/compare/master...bsdjhb:truss_unknown > > (Add .diff to get a diff you can apply with patch) > > -- > John Baldwin Sorry it took so long to try the build. . . I got a compile failure for use of bool in my stable/11 context for the BPI-M3 build that the truss problem was discovered with (quoting the build log below): > --- main.o --- > cc -target armv6-gnueabihf-freebsd11.0 > --sysroot=/usr/local/src/crochet/work/obj/arm.armv6/usr/src/tmp > -B/usr/local/src/crochet/work/obj/arm.armv6/usr/src/tmp/usr/bin -O -pipe > -I/usr/src/usr.bin/truss -I. -I/usr/src/usr.bin/truss/../../sys -g -MD > -MF.depend.main.o -MTma > in.o -std=gnu99 -Wsystem-headers -Wall -Wno-format-y2k -W > -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes > -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow > -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs > -Wredundant-decls -Wold-style-definition -Wno-pointer-sign > -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body > -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -c > /usr/src/usr.bin/truss/main.c -o main.o > In file included from /usr/src/usr.bin/truss/main.c:53: > /usr/src/usr.bin/truss/syscall.h:75:2: error: unknown type name 'bool' > bool unknown; /* Uknown system call */ > ^ > 1 error generated. > *** [main.o] Error code 1 > > make[4]: stopped in /usr/src/usr.bin/truss > 1 error In C99 bool is a macro from and _Bool is the C99 type itself. So apparently (or an equivalent) was not directly or indirectly included. (The macros true and false and __bool_true_false_are_defined are also from .) Which way do you want the C99 typing to be handled for this: native C99 with no required? Use ? Side note: I'll see about getting my normal stable/11 build environment going for the BPI-M3 instead of using the crochet from my first-time build for the target. === Mark Millard markmi at dsl-only.net ___ 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: stable/11 -r307797 on BPi-M3 (cortex-a7): truss gets segmentation fault for handling unknown system call
On Tuesday, October 25, 2016 11:40:38 AM Mark Millard wrote: > [The following has been reported in: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213778 .] > > In trying to build lang/gcc6 xgcc's cc1 got some SIGSYS examples. In trying > to track things down I ran into truss getting a SIGSEGV when it tries to > handle the situation. . . > > In truss's enter_syscall there is (from a live gdb on truss, after the > segmentation fault): > > 380 t->cs.name = sysdecode_syscallname(t->proc->abi->abi, > t->cs.number); > 381 if (t->cs.name == NULL) > (gdb) > 382 fprintf(info->outfile, "-- UNKNOWN %s SYSCALL %d --\n", > 383 t->proc->abi->type, t->cs.number); > 384 > 385 sc = get_syscall(t->cs.name, narg); > 386 t->cs.nargs = sc->nargs; > 387 assert(sc->nargs <= nitems(t->cs.s_args)); > 388 > 389 t->cs.sc = sc; > > (gdb) print *t > $2 = {entries = {le_next = 0x0, le_prev = 0x20617070}, proc = 0x20617060, tid > = 100150, in_syscall = 1, cs = {sc = 0x0, name = 0x0, number = 580828064, > args = 0x2061b0c0, nargs = 0, > s_args = 0x2061b0ec}, before = {tv_sec = 1477418265, tv_nsec = > 492342263}, after = {tv_sec = 1477418265, tv_nsec = 492496630}} > > (gdb) print sc > $3 = (struct syscall *) 0x0 > > So line 386 listed above gets a segmentation fault for sc->nargs when > t->cs.name is a NULL pointer: sc ends up NULL. > > Looking at the two things that the fprintf on lines 382 and 383 would report: > > (gdb) print t->proc->abi->type > $4 = 0x10166 "FreeBSD ELF32" > > (gdb) print t->cs.number > $5 = 580828064 > > (gdb) print narg > $6 = 0 > > (that last is for context for the get_syscall arguments). > > FYI: 580828064 = 0x229EBBA0 I have a patchset I have tested some in a git branch that I believe fixes handling of unknown system calls. Please try this: https://github.com/freebsd/freebsd/compare/master...bsdjhb:truss_unknown (Add .diff to get a diff you can apply with patch) -- John Baldwin ___ 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: PKG bootstrap FreeBSD 11.0 / VBox NAT problem
On Fri, 28 Oct 2016 14:15+0200, Tomasz CEDRO wrote: > Just for the curious. I am testing on VirtualBox (Version 5.1.8 > r111374 (Qt5.5.1), macOS 10.12.1 host). Cannot bootstrap PKG on a host > with NAT enabled.I have noticed this problem occurs only when NAT is > enabled in VBox. When I use Bridged interface there is no problem. I > have noticed that outgoing packet following RST response has invalid > checksum. That may be VBox NAT problem..? Maybe someone noticed > similar behavior.. > > https://www.virtualbox.org/ticket/16126 Upgrading VBox (the hypervisor software) to 5.1.8 last week made "make -C /usr/ports fetchindex" next to impossible on my FreeBSD guests. I was running 5.1.6 of emulators/virtualbox-ose-additions{,-nox11} at that time. Luckily, I was able to upgrade the latter to 5.1.8 and all network/NAT problems went away. -- +---++ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +---++ ___ 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: Dying jail
Eugene Grosbein wrote: Hi! Recently I've upgraded one of my server running 9.3-STABLE with jail containing 4.11-STABLE system. The host was source-upgraded upto 10.3-STABLE first and next to 11.0-STABLE and jail configuration migrated to /etc/jail.conf. The jail kept intact. "service jail start" started the jail successfully but "service jail restart" fails due to jail being stuck in "dying" state for long time: "jls" shows no running jails and "jls -d" shows the dying jail. Same issue here. During upgrade to 10 I wrote a proper jail.conf, and, as this is now a much more transparent handling, I also began to start+stop my jails individually w/o reboot. I found the same issue: often jails do not want to fully terminate, but stay in the "dying" state - sometimes for a minute or so, but sometimes very long (indefinite). It seems this is not related to remaining processes or open files (there are none) but to network connections/sockets which are still present. Probably these connections can be displayed with netstat, and probably netstat -x shows some decreasing counters associated with them - I have not yet found the opportunity to figure out what they exactly mean, but anyway it seems like there may be long times involved (hours? forever?), unless one finds the proper connection and terminates both ends. There seems to be no other way to deliberately "kill" such connections and thereby terminate the jail, so the proposal to let it have a new number might be the only feasible approach. (I dont like it, I got used to the numbers of my jails.) ___ 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: PKG bootstrap FreeBSD 11.0 / VBox NAT problem
On 10/28/16 14:15, Tomasz CEDRO wrote: Just for the curious. I am testing on VirtualBox (Version 5.1.8 r111374 (Qt5.5.1), macOS 10.12.1 host). Cannot bootstrap PKG on a host with NAT enabled.I have noticed this problem occurs only when NAT is enabled in VBox. When I use Bridged interface there is no problem. I have noticed that outgoing packet following RST response has invalid checksum. That may be VBox NAT problem..? Maybe someone noticed similar behavior.. https://www.virtualbox.org/ticket/16126 Same thing here: after upgrading VirtualBox on Windows 10 to 5.0.28, the 'pkg upgrade' on a FreeBSD 11.0-RELEASE-p2 guest fails with a 'Connection reset by peer' - either right away, or after downloading a (random) couple of packages - when using NAT provided by VirtualBox. This worked well with a previous release of VirtualBox. Looks like the problem is not specific to FreeBSD: https://www.virtualbox.org/ticket/16084 Mark ___ 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: PKG bootstrap FreeBSD 11.0 / VBox NAT problem
On 10/28/16 14:15, Tomasz CEDRO wrote: > Just for the curious. I am testing on VirtualBox (Version 5.1.8 > r111374 (Qt5.5.1), macOS 10.12.1 host). Cannot bootstrap PKG on a host > with NAT enabled.I have noticed this problem occurs only when NAT is > enabled in VBox. When I use Bridged interface there is no problem. I > have noticed that outgoing packet following RST response has invalid > checksum. That may be VBox NAT problem..? Maybe someone noticed > similar behavior.. > > https://www.virtualbox.org/ticket/16126 > It could be related or unrelated, but have you tested disabling checksum offloading on both the guest and the host NICs? BTW what NIC are you using in the guest machine? have you tried changing NIC type? (for example changing between the emulated one and the paravirtualized one) -- Guido Falsi___ 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"
Problem installing 11-stable on a Dell 5510, UEFI boot
Hello, I have a nice new Dell Precision 5510 laptop that I ordered preloaded with Ubuntu 14.10, and I'd *really* like to have FreeBSD on it instead. I've put the memstick image on a 2GB USB stick per the instructions on freebsd.org, but when I bring up the boot menu on the 5510 the USB drive isn't offered as a boot device. I've disabled Secure Boot & I made sure that the 5510 is allowed to boot from a USB device. I then decided to build my own image, following the instructions on the wiki: gpart create -s gpt da0 gpart add -t efi -s 800K da0 gpart add -t freebsd-ufs da0 dd if=/boot/boot1.efifat of=/dev/da0p1 newfs -U -L FreeBSD /dev/da0p2 Followed by: mount /dev/da0p2 /mnt make DESTDIR=/mnt installkernel installworld distribution echo "/dev/da0p2 / ufs rw 1 1" >> /mnt/etc/fstab umount /mnt It took a while to install and apparently worked fine, with no errors, but it still didn't show up in the boot menu. I had created an Ubuntu recovery image when I first fired up the 5510 and wrote it to a USB drive, and it shows up in the boot menu. Just for fun I downloaded a Linux Mint 18 XFCE installation ISO that I copied to the USB drive using the same method I used for the FreeBSD memstick image. It shows up on the boot menu & I verified that I can boot it. I'll run Mint with XFCE if I have to, but I'd really prefer FreeBSD. Can anyone offer suggestions as to what I should try next? Thanks! -- Richard KuhnsWintek Corporation 427 N 6th Street Lafayette, IN 47901-2211 Main: 765-742-8428 Direct: 765-269-8541 ___ 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: PKG bootstrap FreeBSD 11.0 / VBox NAT problem
Just for the curious. I am testing on VirtualBox (Version 5.1.8 r111374 (Qt5.5.1), macOS 10.12.1 host). Cannot bootstrap PKG on a host with NAT enabled.I have noticed this problem occurs only when NAT is enabled in VBox. When I use Bridged interface there is no problem. I have noticed that outgoing packet following RST response has invalid checksum. That may be VBox NAT problem..? Maybe someone noticed similar behavior.. https://www.virtualbox.org/ticket/16126 -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info ___ 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: panics collections on FreeBSD 11.0-RC1 RC2 PRERELEASE RELEASE STABLE
Next panic Oct 28 09:06:50 ns kernel: panic: sbsndptr: sockbuf 0xf8008f186878 and mbuf 0xf8008f29d200 clashing Oct 28 09:06:50 ns kernel: cpuid = 7 Oct 28 09:06:50 ns kernel: KDB: stack backtrace: Oct 28 09:06:50 ns kernel: #0 0x80b5f0e7 at kdb_backtrace+0x67 Oct 28 09:06:50 ns kernel: #1 0x80b129c2 at vpanic+0x182 Oct 28 09:06:50 ns kernel: #2 0x80b12833 at panic+0x43 Oct 28 09:06:50 ns kernel: #3 0x80bafc4a at sbsndptr+0xda Oct 28 09:06:50 ns kernel: #4 0x80d57b88 at tcp_output+0x1168 Oct 28 09:06:50 ns kernel: #5 0x80d540f6 at tcp_do_segment+0x30d6 Oct 28 09:06:50 ns kernel: #6 0x80d508b6 at tcp_input+0x14a6 Oct 28 09:06:50 ns kernel: #7 0x80cb54be at ip_input+0x18e Oct 28 09:06:50 ns kernel: #8 0x80c49add at netisr_dispatch_src+0xad Oct 28 09:06:50 ns kernel: #9 0x80c3815e at tunwrite+0x2ee Oct 28 09:06:50 ns kernel: #10 0x809b54e7 at devfs_write_f+0xe7 Oct 28 09:06:50 ns kernel: #11 0x80b7e227 at dofilewrite+0x87 Oct 28 09:06:50 ns kernel: #12 0x80b7ddf9 at sys_write+0xd9 Oct 28 09:06:50 ns kernel: #13 0x8105ac2e at amd64_syscall+0x51e Oct 28 09:06:50 ns kernel: #14 0x8103bbcb at Xfast_syscall+0xfb Oct 28 09:06:50 ns kernel: Uptime: 21h57m23s Oct 28 09:06:50 ns kernel: Dumping 7609 out of 32688 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91% uname -a FreeBSD ns 11.0-STABLE FreeBSD 11.0-STABLE #7 r307744: Fri Oct 21 21:07:37 EEST 2016 root@ns:/usr/obj/usr/src/sys/bzk11 amd64 All kernels Build with VIMAGE. ___ 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"