Re: Panic @r319733: "mtx_lock() of spin mutex (null) @ /usr/src/sys/kern/sys_socket.c:305"

2017-06-09 Thread Ngie Cooper
On Fri, Jun 9, 2017 at 3:55 PM, David Wolfskill  wrote:

...

> Gleb committed r319754; I finally(!) had a chance to revert the
> reversion of r319722, then apply r319754 and rebuild; the follow-up
> smoke test was successful.

...

> [Apparently hald invokes stat(2) on a listening socket, which was ...
> unexpected.]

This might have been caught by lib/libc/sys/stat_test:stat_socket . If
only the compat stuff was working on ci.freebsd.org as well, or the
test(s) had been run...
-Ngie
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Panic @r319733: "mtx_lock() of spin mutex (null) @ /usr/src/sys/kern/sys_socket.c:305"

2017-06-09 Thread David Wolfskill
On Fri, Jun 09, 2017 at 08:23:55AM -0700, David Wolfskill wrote:
> ...
> > The main suspect is r319722.
> > Try reverting it or downgrading before it (the later might be simple due
> > to the patch size).
> > 
> 
> It was easy enough for me to use "svn diff -c r319722" &
> "svn patch --reverse-diff" to effectively revert r319722.
> 
> I re-ran the build after that, and a subsequent reboot allowed me to
> "sudo service hald onestart" (which whined a bit about dbus not being
> enabled but started it anyway), after which I was able to start xdm --
> so that seems to have been successful.
> 
> Perhaps I'll chat with Gleb a bit later today. :-)  (Our cubes are
> adjacent.)
> ...

Gleb committed r319754; I finally(!) had a chance to revert the
reversion of r319722, then apply r319754 and rebuild; the follow-up
smoke test was successful.

> Thanks, Konstantin! :-)
> ...

And Gleb! :-)

[Apparently hald invokes stat(2) on a listening socket, which was ...
unexpected.]

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Looking forward to telling Mr. Trump: "You're fired!"

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


Re: Panic @r319733: "mtx_lock() of spin mutex (null) @ /usr/src/sys/kern/sys_socket.c:305"

2017-06-09 Thread David Wolfskill
On Fri, Jun 09, 2017 at 04:55:17PM +0300, Konstantin Belousov wrote:
> On Fri, Jun 09, 2017 at 05:57:15AM -0700, David Wolfskill wrote:
> > Build machine updated from r319689 to r319733 OK; smoke test was
> > uneventful.
> > 
> > Laptop updated similarly, but smoke test was a little more "interesting".
> > 
> > Turns out that laptop gets to multi-user mode OK... if I disable
> > starting xdm, devd, and hald.  But then, issuing "service hald onestart"
> > generates the panic in question -- at r319733.  At r319689, xdm &
> > friends worked fine.
> > 
> > I have placed copies of the /var/crash/*.6 files in
> >  -- along with
> > gzipped copies, as well.  (It's residential DSL in the US, so there's
> > not a huge amount of bandwidth.)
> > 
> > I get the impression that something (ini hald) was trying to use
> > the freebsd11 version of stat(), and Something Bad happened:
> > 
> > panic: mtx_lock() of spin mutex (null) @ /usr/src/sys/kern/sys_socket.c:305
> > cpuid = 7
> > time = 1497011454
> > KDB: stack backtrace:
> > db_trace_self_wrapper() at 0x803a461b = 
> > db_trace_self_wrapper+0x2b/frame 0xfe0c268ff600
> > vpanic() at 0x80a1f94c = vpanic+0x19c/frame 0xfe0c268ff680
> > kassert_panic() at 0x80a1f7a6 = kassert_panic+0x126/frame 
> > 0xfe0c268ff6f0
> > __mtx_lock_flags() at 0x809fedfe = __mtx_lock_flags+0x14e/frame 
> > 0xfe0c268ff740
> > soo_stat() at 0x80a8f8f0 = soo_stat+0x60/frame 0xfe0c268ff770
>
> The main suspect is r319722.
> Try reverting it or downgrading before it (the later might be simple due
> to the patch size).
> 

It was easy enough for me to use "svn diff -c r319722" &
"svn patch --reverse-diff" to effectively revert r319722.

I re-ran the build after that, and a subsequent reboot allowed me to
"sudo service hald onestart" (which whined a bit about dbus not being
enabled but started it anyway), after which I was able to start xdm --
so that seems to have been successful.

Perhaps I'll chat with Gleb a bit later today. :-)  (Our cubes are
adjacent.)

Thanks, Konstantin! :-)

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Looking forward to telling Mr. Trump: "You're fired!"

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


Re: Panic @r319733: "mtx_lock() of spin mutex (null) @ /usr/src/sys/kern/sys_socket.c:305"

2017-06-09 Thread Konstantin Belousov
On Fri, Jun 09, 2017 at 05:57:15AM -0700, David Wolfskill wrote:
> Build machine updated from r319689 to r319733 OK; smoke test was
> uneventful.
> 
> Laptop updated similarly, but smoke test was a little more "interesting".
> 
> Turns out that laptop gets to multi-user mode OK... if I disable
> starting xdm, devd, and hald.  But then, issuing "service hald onestart"
> generates the panic in question -- at r319733.  At r319689, xdm &
> friends worked fine.
> 
> I have placed copies of the /var/crash/*.6 files in
>  -- along with
> gzipped copies, as well.  (It's residential DSL in the US, so there's
> not a huge amount of bandwidth.)
> 
> I get the impression that something (ini hald) was trying to use
> the freebsd11 version of stat(), and Something Bad happened:
> 
> panic: mtx_lock() of spin mutex (null) @ /usr/src/sys/kern/sys_socket.c:305
> cpuid = 7
> time = 1497011454
> KDB: stack backtrace:
> db_trace_self_wrapper() at 0x803a461b = 
> db_trace_self_wrapper+0x2b/frame 0xfe0c268ff600
> vpanic() at 0x80a1f94c = vpanic+0x19c/frame 0xfe0c268ff680
> kassert_panic() at 0x80a1f7a6 = kassert_panic+0x126/frame 
> 0xfe0c268ff6f0
> __mtx_lock_flags() at 0x809fedfe = __mtx_lock_flags+0x14e/frame 
> 0xfe0c268ff740
> soo_stat() at 0x80a8f8f0 = soo_stat+0x60/frame 0xfe0c268ff770
The main suspect is r319722.
Try reverting it or downgrading before it (the later might be simple due
to the patch size).

> kern_fstat() at 0x809cb378 = kern_fstat+0xa8/frame 0xfe0c268ff7c0
> freebsd11_fstat() at 0x809cb28d = freebsd11_fstat+0x1d/frame 
> 0xfe0c268ff930
> amd64_syscall() at 0x80e31fb4 = amd64_syscall+0x5a4/frame 
> 0xfe0c268ffab0
> Xfast_syscall() at 0x80e12eab = Xfast_syscall+0xfb/frame 
> 0xfe0c268ffab0
> --- syscall (189, FreeBSD ELF64, freebsd11_fstat), rip = 0x801b4973a, rsp = 
> 0x7fffe988, rbp = 0x7fffea20 ---
> KDB: enter: panic
> 
> 
> Note: the hald in question was built under FreeBSD stable/11 (as
> are all my ports); I noted the existence of, and installed,
> ports/misc/compat11s before (re-)creating the crash.  (And yes, the
> ports that have kernel modules get the kernel modules rebuilt on
> head every time I rebuild the kernel on head.)
> 
> With the caveat that I actually use the laptop in my day-to-day
> activities, I'm happy to try various combinations of patching,
> testing, and reporting results.
> 
> Peace,
> david
> -- 
> David H. Wolfskillda...@catwhisker.org
> Looking forward to telling Mr. Trump: "You're fired!"
> 
> See http://www.catwhisker.org/~david/publickey.gpg for my public key.


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


Panic @r319733: "mtx_lock() of spin mutex (null) @ /usr/src/sys/kern/sys_socket.c:305"

2017-06-09 Thread David Wolfskill
Build machine updated from r319689 to r319733 OK; smoke test was
uneventful.

Laptop updated similarly, but smoke test was a little more "interesting".

Turns out that laptop gets to multi-user mode OK... if I disable
starting xdm, devd, and hald.  But then, issuing "service hald onestart"
generates the panic in question -- at r319733.  At r319689, xdm &
friends worked fine.

I have placed copies of the /var/crash/*.6 files in
 -- along with
gzipped copies, as well.  (It's residential DSL in the US, so there's
not a huge amount of bandwidth.)

I get the impression that something (ini hald) was trying to use
the freebsd11 version of stat(), and Something Bad happened:

panic: mtx_lock() of spin mutex (null) @ /usr/src/sys/kern/sys_socket.c:305
cpuid = 7
time = 1497011454
KDB: stack backtrace:
db_trace_self_wrapper() at 0x803a461b = 
db_trace_self_wrapper+0x2b/frame 0xfe0c268ff600
vpanic() at 0x80a1f94c = vpanic+0x19c/frame 0xfe0c268ff680
kassert_panic() at 0x80a1f7a6 = kassert_panic+0x126/frame 
0xfe0c268ff6f0
__mtx_lock_flags() at 0x809fedfe = __mtx_lock_flags+0x14e/frame 
0xfe0c268ff740
soo_stat() at 0x80a8f8f0 = soo_stat+0x60/frame 0xfe0c268ff770
kern_fstat() at 0x809cb378 = kern_fstat+0xa8/frame 0xfe0c268ff7c0
freebsd11_fstat() at 0x809cb28d = freebsd11_fstat+0x1d/frame 
0xfe0c268ff930
amd64_syscall() at 0x80e31fb4 = amd64_syscall+0x5a4/frame 
0xfe0c268ffab0
Xfast_syscall() at 0x80e12eab = Xfast_syscall+0xfb/frame 
0xfe0c268ffab0
--- syscall (189, FreeBSD ELF64, freebsd11_fstat), rip = 0x801b4973a, rsp = 
0x7fffe988, rbp = 0x7fffea20 ---
KDB: enter: panic


Note: the hald in question was built under FreeBSD stable/11 (as
are all my ports); I noted the existence of, and installed,
ports/misc/compat11s before (re-)creating the crash.  (And yes, the
ports that have kernel modules get the kernel modules rebuilt on
head every time I rebuild the kernel on head.)

With the caveat that I actually use the laptop in my day-to-day
activities, I'm happy to try various combinations of patching,
testing, and reporting results.

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Looking forward to telling Mr. Trump: "You're fired!"

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature