Re: Updated to 13-STABLE in VirtualBox; on shutdown stuck after uhub[01] being detached

2021-04-29 Thread Antony Uspensky

On Wed, 28 Apr 2021, parv/freebsd wrote:


Solved the issue via ...

 % sysctl hw.efi.poweroff=0
... after that shudown went on as expected. Got that from  ...

https://forums.freebsd.org/threads/freebsd-13-does-not-shut-down-my-laptop.79853/


Well, this also solved my problem described in a message to this list:

Date: Thu, 1 Apr 2021 18:58:01 +0300 (MSK)
From: Antony Uspensky 
To: freebsd-stable@freebsd.org
Subject: ACPI poweroff is not working on 13.0
Message-ID: 

I was wrong: it was EFI poweroff that did not work, not ACPI one.
I was too lazy to do a bisection, now I am OK.
Thank you for the tip!

Seems, this problem (non-working shutdown in EFI environment) is a POLA 
violation in 13.0. 
A.

___
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: Updated to 13-STABLE in VirtualBox; on shutdown stuck after uhub[01] being detached

2021-04-28 Thread parv/freebsd
(Changed my email address to the one I used to subscribe to the mailing
list.)

On Wed, Apr 28, 2021 at 10:05 AM Guido Falsi wrote:

Hi,


On 28/04/21 00:12, parv wrote:
> > I had updated FreeBSD, in VirtualBox 5.22 on Windows with EFI, from
> > 12-STABLE
> > to 13-STABLE; upgraded the ZFS pools & the EFI boot loader. Currently
> > testing with 13 GENERIC kernel.
>
> You mean you enabled EFI inside virtualbox? Why do you need that?


For testing if FreeBSD can boot with EFI (with ZFS-on-root) ... one day I
may just install the thing directly on a disk, outside of a virtual machine
... one day!



> EFI
> support in VirtualBox is experimental and is available for OSes unable
> to boot without EFI. FreeBSD is perfectly able to boot in virtualbox
> without EFI so no need for it.
>

I am aware.



> > Now on shutdown, "shutdown -p now" (in single user mode, after manually
> > unmounting
> > ZFS datasets [...] the shutting down process gets stuck,
> > and CPU use jumps to 80%
>
...

> > In the end I chose "Power Off" from VirutalBox menu. "Reset" reboots the
> > machine.
> > None of these have any effect ...
> >- Send the shutdown signal
> >- ACPI Shutdown
> >
> > Help please.
>

Solved the issue via ...

  % sysctl hw.efi.poweroff=0
... after that shudown went on as expected. Got that from  ...


https://forums.freebsd.org/threads/freebsd-13-does-not-shut-down-my-laptop.79853/


NOt sure even which further information to ask about this, but to be
> sure I understand correctly, FreeBSD is the guest here, correct?


Yes, FreeBSD is the guest on Windows 10 host.

- parv
___
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: Updated to 13-STABLE in VirtualBox; on shutdown stuck after uhub[01] being detached

2021-04-28 Thread Guido Falsi via freebsd-stable

On 28/04/21 00:12, parv wrote:

Hi there,

I had updated FreeBSD, in VirtualBox 5.22 on Windows with EFI, from
12-STABLE
to 13-STABLE; upgraded the ZFS pools & the EFI boot loader. Currently
testing with 13 GENERIC kernel.


You mean you enabled EFI inside virtualbox? Why do you need that? EFI 
support in VirtualBox is experimental and is available for OSes unable 
to boot without EFI. FreeBSD is perfectly able to boot in virtualbox 
without EFI so no need for it.


Now I understand reconfiguring the VM to not use EFI can be annoying, 
but you should really verify if the problem goes away without EFI.


Also can you try installing another FreeBSD VM and verify the problem 
happens for that one too? This could help understand if the problem is 
with virtualization or specific to the VM.




Now on shutdown, "shutdown -p now" (in single user mode, after manually
unmounting
ZFS datasets via "zfs unmount -a"), the shutting down process gets stuck,
and
CPU use jumps to 80% (Intel i5 6300U, 3 CPUs given to VM, of Thinkpad
X260). Last
few lines are ...

...
All buffers synced.
Uptime: 
uhub0: detached
uhub1: detached


In the end I chose "Power Off" from VirutalBox menu. "Reset" reboots the
machine.
None of these have any effect ...
   - Send the shutdown signal
   - ACPI Shutdown

Help please.


NOt sure even which further information to ask about this, but to be 
sure I understand correctly, FreeBSD is the guest here, correct?


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


Updated to 13-STABLE in VirtualBox; on shutdown stuck after uhub[01] being detached

2021-04-28 Thread parv
Hi there,

I had updated FreeBSD, in VirtualBox 5.22 on Windows with EFI, from
12-STABLE
to 13-STABLE; upgraded the ZFS pools & the EFI boot loader. Currently
testing with 13 GENERIC kernel.

Now on shutdown, "shutdown -p now" (in single user mode, after manually
unmounting
ZFS datasets via "zfs unmount -a"), the shutting down process gets stuck,
and
CPU use jumps to 80% (Intel i5 6300U, 3 CPUs given to VM, of Thinkpad
X260). Last
few lines are ...

...
All buffers synced.
Uptime: 
uhub0: detached
uhub1: detached


In the end I chose "Power Off" from VirutalBox menu. "Reset" reboots the
machine.
None of these have any effect ...
  - Send the shutdown signal
  - ACPI Shutdown

Help please.


- parv
___
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: 9.2-RC1 panic at shutdown

2013-09-12 Thread David Demelier
On 12.09.2013 19:21, Florent Peterschmitt wrote:
> Le 12/09/2013 19:19, David Demelier a écrit :
>> Hello folks,
>>
>> I have a panic at shutdown related to FUSE.
>> #16 0x81af623b in fuse_unmount () from /usr/local/modules/fuse.ko
> 
> Yes, then, did you rebuilt the kernel module after an upgrade?
> 
> 

Yes it should, I have PORTS_MODULES set in my make.conf which should,
but I will try to be sure!
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


9.2-RC1 panic at shutdown

2013-09-12 Thread David Demelier
Hello folks,

I have a panic at shutdown related to FUSE.

#0  doadump (textdump=) at pcpu.h:234
234 pcpu.h: No such file or directory.
in pcpu.h
(kgdb) bt full
#0  doadump (textdump=) at pcpu.h:234
No locals.
#1  0x8090d9a6 in kern_reboot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:449
_ep = (struct eventhandler_entry *) 0x0
_el = (struct eventhandler_list *) 0xfe0004813880
first_buf_printf = 1
#2  0x8090dea7 in panic (fmt=0x1 ) at
/usr/src/sys/kern/kern_shutdown.c:637
td = (struct thread *) 0x1
bootopt = 
newpanic = 
ap = {{gp_offset = 16, fp_offset = 48, overflow_arg_area =
0xff80e7d402b0, reg_save_area = 0xff80e7d401d0}}
panic_cpu = 0
buf = "privileged instruction fault", '\0' 
#3  0x80cf2c20 in trap_fatal (frame=0x1, eva=) at /usr/src/sys/amd64/amd64/trap.c:879
code = 
ss = 40
type = 1
esp = 
softseg = {ssd_base = 0, ssd_limit = 1048575, ssd_type = 27,
ssd_dpl = 0, ssd_p = 1, ssd_long = 1, ssd_def32 = 0, ssd_gran = 1}
msg = 
#4  0x80cf3431 in trap (frame=0xff80e7d40510) at
/usr/src/sys/amd64/amd64/trap.c:605
td = (struct thread *) 0xfe008be0b000
p = (struct proc *) 0xfe0034073000
i = 
ucode = 
code = 0
type = 1
addr = 
ksi = {ksi_link = {tqe_next = 0xff80e7d408dc, tqe_prev =
0x60}, ksi_info = {si_signo = 96, si_errno = 0, si_code = 0, si_pid = 0,
si_uid = 41125008, si_status = -512,
si_addr = 0xfe00027388f0, si_value = {sival_int = 3, sival_ptr =
0x3, sigval_int = 3, sigval_ptr = 0x3}, _reason = {_fault = {_trapno =
40}, _timer = {_timerid = 40, _overrun = 0},
  _mesgq = {_mqd = 40}, _poll = {_band = 40}, __spare__ =
{__spare1__ = 40, __spare2__ = {-405535488, -128, -2137810668, -1, 3, 0,
0, ksi_flags = 2147483647,
  ksi_sigq = 0xfe0002d1}
#5  0x80cdc863 in calltrap () at
/usr/src/sys/amd64/amd64/exception.S:232
No locals.
#6  0x81afd551 in M_FUSEFH () from /usr/local/modules/fuse.ko
No symbol table info available.
#7  0xff80e7d405d8 in ?? ()
No symbol table info available.
#8  0x80d97858 in VOP_UNSET_TEXT_APV (vop=0x81afd3eb,
a=0xff80e7d40610) at vnode_if.c:4110
_enable_stops = 0
rc = 
#9  0x80b9476e in vnode_pager_dealloc
(object=0xfe004c3060e8) at vnode_if.h:1745
vp = 
refs = 0
#10 0x80b86739 in vm_object_terminate
(object=0xfe004c3060e8) at /usr/src/sys/vm/vm_object.c:766
p = 0xfe0035273000
p_next = 0xfe0035273000
#11 0x80b937f9 in vnode_destroy_vobject (vp=0xfe0035273000)
at /usr/src/sys/vm/vnode_pager.c:168
obj = (struct vm_object *) 0xfe004c3060e8
#12 0x81af78a1 in fuse_reclaim () from /usr/local/modules/fuse.ko
No symbol table info available.
#13 0x80d8 in VOP_RECLAIM_APV (vop=0xfe008be0b000,
a=0xfe0035273000) at vnode_if.c:1988
_enable_stops = 0
rc = 
#14 0x809aacd4 in vgonel (vp=0xfe0035273000) at vnode_if.h:830
td = (struct thread *) 0xfe008be0b000
active = 1
mp = (struct mount *) 0x0
#15 0x809ae1de in vflush (mp=0xfe00048ae338, rootrefs=1,
flags=2, td=0xfe008be0b000) at /usr/src/sys/kern/vfs_subr.c:2687
_rc = 
vp = (struct vnode *) 0xfe0035273000
mvp = (struct vnode *) 0xfe008bc36800
rootvp = (struct vnode *) 0xfe0035273000
vattr = {va_type = 2175779674, va_mode = 65535, va_nlink = -1,
va_uid = 689, va_gid = 0, va_fsid = 3889432544, va_fileid = -2133215974,
va_size = 4, va_blocksize = 525312,
  va_atime = {tv_sec = -2198131494912, tv_nsec = 689}, va_mtime =
{tv_sec = -545866381232, tv_nsec = -2137280809}, va_ctime = {tv_sec =
-2127027808, tv_nsec = -2198131494912},
  va_birthtime = {tv_sec = -2199022730240, tv_nsec = -2119187622},
va_gen = 18446743523953738417, va_flags = 0, va_rdev = 3889432736,
va_bytes = 18446741875578056904, va_filerev = 0,
  va_vaflags = 2175779700, va_spare = 219043332096}
busy = 0
error = 0
#16 0x81af623b in fuse_unmount () from /usr/local/modules/fuse.ko
No symbol table info available.
#17 0xfe00048ae338 in ?? ()
No symbol table info available.
#18 0xfe008bdb7d50 in ?? ()
No symbol table info available.
#19 0xfe008be0b000 in ?? ()
No symbol table info available.
#20 0x in ?? ()
No symbol table info available.

I've read somewhere "FreeBSD is stable, more than linux", I agree but
during this year I've got something like 10-15 panics on my laptop. On
Linux never since 2004. Just my 2 cens.

I'm not sure if the panic is reproductible, I will tell you tomorrow.

Warm regards,
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo

Re: 9.2-RC1 panic at shutdown

2013-09-12 Thread Florent Peterschmitt
Le 12/09/2013 19:19, David Demelier a écrit :
> Hello folks,
> 
> I have a panic at shutdown related to FUSE.
> #16 0x81af623b in fuse_unmount () from /usr/local/modules/fuse.ko

Yes, then, did you rebuilt the kernel module after an upgrade?


-- 
Florent Peterschmitt   | Please:
flor...@peterschmitt.fr|  * Avoid HTML/RTF in E-mail.
+33 (0)6 64 33 97 92   |  * Send PDF for documents.
http://florent.peterschmitt.fr |  * Trim your quotations. Really.
Proudly powered by Open Source | Thank you :)



signature.asc
Description: OpenPGP digital signature


Re: 9.2-PRERELEASE #0 r254557 amd64: core dump on shutdown

2013-09-12 Thread John Baldwin
On Thursday, September 12, 2013 1:29:40 am Marko Cupać wrote:
> On Wed, 11 Sep 2013 11:11:24 -0400
> John Baldwin  wrote:
> 
> > Is this reproducible?
> 
> It happened a few times before (maybe 3-4 times this year), but I can't
> reproduce it intentionally.

Hmm, I'm tempted to chalk this up to a hardware failure then.

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

Re: 9.2-PRERELEASE #0 r254557 amd64: core dump on shutdown

2013-09-11 Thread Marko Cupać
On Wed, 11 Sep 2013 11:11:24 -0400
John Baldwin  wrote:

> Is this reproducible?

It happened a few times before (maybe 3-4 times this year), but I can't
reproduce it intentionally.

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

Re: 9.2-PRERELEASE #0 r254557 amd64: core dump on shutdown

2013-09-11 Thread John Baldwin
On Tuesday, September 10, 2013 10:50:55 am Marko Cupać wrote:
> My 9.2-PRERELEASE #0 r254557 amd64 just dumped core on shutdown. I
> updated src to Last Changed Rev: 255395 two days ago but did not get
> to rebuild world&kernel. Also I did not rebuild any ports since.
> Virtualbox was not running.
> 
> pacija@kaa:/var/crash % uname -a
> FreeBSD kaa.mimar.rs 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0 r254557: Sun 
Aug 25 22:44:52 CEST 2013 pac...@kaa.mimar.rs:/usr/obj/usr/src/sys/KAAGEN  
amd64
> 
> pacija@kaa:/var/crash % sudo cat core.txt.2 
> kaa.mimar.rs dumped core - see /var/crash/vmcore.2
> 
> Tue Sep 10 16:41:45 CEST 2013
> 
> FreeBSD kaa.mimar.rs 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0 r254557: Sun 
Aug 25 22:44:52 CEST 2013 pac...@kaa.mimar.rs:/usr/obj/usr/src/sys/KAAGEN  
amd64
> 
> panic: page fault

Is this reproducible?

> #6  0x80cdc843 in calltrap ()
> at /usr/src/sys/amd64/amd64/exception.S:232
> #7  0x80b71085 in swapoff_one (sp=0xfe0006296600, 
> cred=0xfe00037a0e00) at /usr/src/sys/vm/swap_pager.c:1753

Relevant line is:

1753for (swap = swhash[i]; swap != NULL; swap = swap->swb_hnext) {

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

Re: [SOLVED] Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-08-26 Thread Maurizio Vairani

On 24/07/2013 13.19, Ronald Klop wrote:
On Thu, 18 Jul 2013 09:52:13 +0200, Maurizio Vairani 
 wrote:



On 17/07/2013 17:29, Julian H. Stacey wrote:

Maurizio Vairani wrote:

On 17/07/2013 11:50, Ronald Klop wrote:

On Wed, 17 Jul 2013 10:27:09 +0200, Maurizio Vairani
  wrote:


Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue 
Jul 16
16:32:39 CEST 2013 
root@presario:/usr/obj/usr/src/sys/GENERIC  amd64



For speed up the compilation I have added to the pool, tank0,  a
SanDisk memory stick as cache device with the command:


# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this 
screen

shot:


http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html 





and I need to press the power button for more than 4 seconds to
switch off the laptop.

The problem is always reproducible.

Does sysctl hw.usb.no_shutdown_wait=1 help?

Ronald.

Thank you Ronald it works !

In /boot/loader.conf added the line
hw.usb.no_shutdown_wait=1

Maurizio

I wonder (from ignorance as I dont use ZFS yet),
if that merely masks the symptom or cures the fault ?

Presumably one should use a ZFS command to disassociate whatever
might have the cache open ?  (in case something might need to be
written out from cache, if it was a writeable cache ?)

I too had a USB shutdown problem (non ZFS, now solved)&  several people
made useful comments on shutdown scripts etc, so I'm cross referencing:

http://lists.freebsd.org/pipermail/freebsd-mobile/2013-July/012803.html

Cheers,
Julian
Probably it masks the symptom. Andriy Gapon hypothesizes a bug in the 
ZFS clean up code:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-July/017857.html

Surely one can use a startup script with the command:
zpool add tank0 cache /dev/da0
and a shutdown script with:
zpool remove tank0 /dev/da0
but this mask the symptom too.

I prefer the Ronald solution because:
- is simpler: it adds only one line (hw.usb.no_shutdown_wait=1) to 
one file (/boot/loader.conf).
- is fastest: the zpool add/remove commands take time and 
“hw.usb.no_shutdown_wait=1” in /boot/loader.conf speeds up the 
shutdown process.
- is cleaner: the zpool add/remove commands pair will fill up the 
tank0 pool history.


Regards
Maurizio


Keep an eye on this commit when it is merged to 9-stable.
http://svnweb.freebsd.org/changeset/base/253606
It might be the fix of the problem.

Ronald.

It works !
Just upgraded the laptop to r254783. Shutdown and reboot works fine, 
regardless of the hw.usb.no_shutdown_wait value.


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

Re: [SOLVED] Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-24 Thread Ronald Klop
On Thu, 18 Jul 2013 09:52:13 +0200, Maurizio Vairani  
 wrote:



On 17/07/2013 17:29, Julian H. Stacey wrote:

Maurizio Vairani wrote:

On 17/07/2013 11:50, Ronald Klop wrote:

On Wed, 17 Jul 2013 10:27:09 +0200, Maurizio Vairani
  wrote:


Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16
16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC   
amd64



For speed up the compilation I have added to the pool, tank0,  a
SanDisk memory stick as cache device with the command:


# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this screen
shot:


http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html



and I need to press the power button for more than 4 seconds to
switch off the laptop.

The problem is always reproducible.

Does sysctl hw.usb.no_shutdown_wait=1 help?

Ronald.

Thank you Ronald it works !

In /boot/loader.conf added the line
hw.usb.no_shutdown_wait=1

Maurizio

I wonder (from ignorance as I dont use ZFS yet),
if that merely masks the symptom or cures the fault ?

Presumably one should use a ZFS command to disassociate whatever
might have the cache open ?  (in case something might need to be
written out from cache, if it was a writeable cache ?)

I too had a USB shutdown problem (non ZFS, now solved)&  several people
made useful comments on shutdown scripts etc, so I'm cross referencing:

http://lists.freebsd.org/pipermail/freebsd-mobile/2013-July/012803.html

Cheers,
Julian
Probably it masks the symptom. Andriy Gapon hypothesizes a bug in the  
ZFS clean up code:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-July/017857.html

Surely one can use a startup script with the command:
zpool add tank0 cache /dev/da0
and a shutdown script with:
zpool remove tank0 /dev/da0
but this mask the symptom too.

I prefer the Ronald solution because:
- is simpler: it adds only one line (hw.usb.no_shutdown_wait=1) to one  
file (/boot/loader.conf).
- is fastest: the zpool add/remove commands take time and  
“hw.usb.no_shutdown_wait=1” in /boot/loader.conf speeds up the shutdown  
process.
- is cleaner: the zpool add/remove commands pair will fill up the tank0  
pool history.


Regards
Maurizio


Keep an eye on this commit when it is merged to 9-stable.
http://svnweb.freebsd.org/changeset/base/253606
It might be the fix of the problem.

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

Re: [SOLVED] Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-18 Thread Maurizio Vairani

On 17/07/2013 17:29, Julian H. Stacey wrote:

Maurizio Vairani wrote:

On 17/07/2013 11:50, Ronald Klop wrote:

On Wed, 17 Jul 2013 10:27:09 +0200, Maurizio Vairani
  wrote:


Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16
16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC  amd64


For speed up the compilation I have added to the pool, tank0,  a
SanDisk memory stick as cache device with the command:


# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this screen
shot:


http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html



and I need to press the power button for more than 4 seconds to
switch off the laptop.

The problem is always reproducible.

Does sysctl hw.usb.no_shutdown_wait=1 help?

Ronald.

Thank you Ronald it works !

In /boot/loader.conf added the line
hw.usb.no_shutdown_wait=1

Maurizio

I wonder (from ignorance as I dont use ZFS yet),
if that merely masks the symptom or cures the fault ?

Presumably one should use a ZFS command to disassociate whatever
might have the cache open ?  (in case something might need to be
written out from cache, if it was a writeable cache ?)

I too had a USB shutdown problem (non ZFS, now solved)&  several people
made useful comments on shutdown scripts etc, so I'm cross referencing:

http://lists.freebsd.org/pipermail/freebsd-mobile/2013-July/012803.html

Cheers,
Julian
Probably it masks the symptom. Andriy Gapon hypothesizes a bug in the 
ZFS clean up code:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-July/017857.html

Surely one can use a startup script with the command:
zpool add tank0 cache /dev/da0
and a shutdown script with:
zpool remove tank0 /dev/da0
but this mask the symptom too.

I prefer the Ronald solution because:
- is simpler: it adds only one line (hw.usb.no_shutdown_wait=1) to one 
file (/boot/loader.conf).
- is fastest: the zpool add/remove commands take time and 
“hw.usb.no_shutdown_wait=1” in /boot/loader.conf speeds up the shutdown 
process.
- is cleaner: the zpool add/remove commands pair will fill up the tank0 
pool history.


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


Re: [SOLVED] Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Julian H. Stacey
Maurizio Vairani wrote:
> On 17/07/2013 11:50, Ronald Klop wrote:
> > On Wed, 17 Jul 2013 10:27:09 +0200, Maurizio Vairani 
> >  wrote:
> >
> >> Hi all,
> >>
> >>
> >> on a Compaq Presario laptop I have just installed the latest stable
> >>
> >>
> >> #uname -a
> >>
> >> FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16 
> >> 16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC  amd64
> >>
> >>
> >> For speed up the compilation I have added to the pool, tank0,  a 
> >> SanDisk memory stick as cache device with the command:
> >>
> >>
> >> # zpool add tank0 cache /dev/da0
> >>
> >>
> >> But when I shutdown the laptop the process will halt with this screen 
> >> shot:
> >>
> >>
> >> http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html
> >>  
> >>
> >>
> >>
> >> and I need to press the power button for more than 4 seconds to 
> >> switch off the laptop.
> >>
> >> The problem is always reproducible.
> >
> > Does sysctl hw.usb.no_shutdown_wait=1 help?
> >
> > Ronald.
> Thank you Ronald it works !
> 
> In /boot/loader.conf added the line
> hw.usb.no_shutdown_wait=1
> 
> Maurizio

I wonder (from ignorance as I dont use ZFS yet),
if that merely masks the symptom or cures the fault ?

Presumably one should use a ZFS command to disassociate whatever
might have the cache open ?  (in case something might need to be
written out from cache, if it was a writeable cache ?)

I too had a USB shutdown problem (non ZFS, now solved) & several people
made useful comments on shutdown scripts etc, so I'm cross referencing:

http://lists.freebsd.org/pipermail/freebsd-mobile/2013-July/012803.html

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com
 Reply below not above, like a play script.  Indent old text with "> ".
 Send plain text.  No quoted-printable, HTML, base64, multipart/alternative.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Andriy Gapon
on 17/07/2013 12:50 Ronald Klop said the following:
> Does sysctl hw.usb.no_shutdown_wait=1 help?

I believe that the root cause of the issue is that ZFS does not perform full
clean up on shutdown and thus does not release its devices.  But perhaps I am
mistaken.
In any case, I think that doing the same kind of clean up as done on zfs module
unload would be advantageous.

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


[SOLVED] Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Maurizio Vairani

On 17/07/2013 11:50, Ronald Klop wrote:
On Wed, 17 Jul 2013 10:27:09 +0200, Maurizio Vairani 
 wrote:



Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16 
16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC  amd64



For speed up the compilation I have added to the pool, tank0,  a 
SanDisk memory stick as cache device with the command:



# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this screen 
shot:



http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html 




and I need to press the power button for more than 4 seconds to 
switch off the laptop.


The problem is always reproducible.


Does sysctl hw.usb.no_shutdown_wait=1 help?

Ronald.

Thank you Ronald it works !

In /boot/loader.conf added the line
hw.usb.no_shutdown_wait=1

Maurizio

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


Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Steven Hartland


- Original Message - 
From: "Ronald Klop" 


Does sysctl hw.usb.no_shutdown_wait=1 help?


That will just prevent the wait it won't stop the
shutdown from happening.

   Regards
   Steve


This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 


In the event of misdirection, illegible or incomplete transmission please 
telephone +44 845 868 1337
or return the E.mail to postmas...@multiplay.co.uk.

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


Re: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Ronald Klop
On Wed, 17 Jul 2013 10:27:09 +0200, Maurizio Vairani  
 wrote:



Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16  
16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC  amd64



For speed up the compilation I have added to the pool, tank0,  a SanDisk  
memory stick as cache device with the command:



# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this screen  
shot:



http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html


and I need to press the power button for more than 4 seconds to switch  
off the laptop.


The problem is always reproducible.


Does sysctl hw.usb.no_shutdown_wait=1 help?

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


RE: Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Ivailo Tanusheff
I think this is expected as your screenshot shows the USB has being 
disconnected, so you actually lost the cache device on the shutdown.
Maybe you should implement a shutdown script that removes the USB cache from 
the pool before the shutdown command is issued :)

Best regards,
Ivailo Tanusheff

-Original Message-
From: owner-freebsd-sta...@freebsd.org 
[mailto:owner-freebsd-sta...@freebsd.org] On Behalf Of Maurizio Vairani
Sent: Wednesday, July 17, 2013 11:27 AM
To: freebsd-stable@FreeBSD.org; freebsd...@freebsd.org
Subject: Shutdown problem with an USB memory stick as ZFS cache device

Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16 
16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC  amd64


For speed up the compilation I have added to the pool, tank0,  a SanDisk memory 
stick as cache device with the command:


# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this screen shot:


http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html


and I need to press the power button for more than 4 seconds to switch 
off the laptop.

The problem is always reproducible.


Regards

Maurizio

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


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


Shutdown problem with an USB memory stick as ZFS cache device

2013-07-17 Thread Maurizio Vairani

Hi all,


on a Compaq Presario laptop I have just installed the latest stable


#uname -a

FreeBSD presario 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0: Tue Jul 16 
16:32:39 CEST 2013 root@presario:/usr/obj/usr/src/sys/GENERIC  amd64



For speed up the compilation I have added to the pool, tank0,  a SanDisk 
memory stick as cache device with the command:



# zpool add tank0 cache /dev/da0


But when I shutdown the laptop the process will halt with this screen shot:


http://www.dump-it.fr/freebsd-screen-shot/2f9169f18c7c77e52e873580f9c2d4bf.jpg.html


and I need to press the power button for more than 4 seconds to switch 
off the laptop.


The problem is always reproducible.


Regards

Maurizio

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


Re: Shutdown hangs on unmount of a gjournaled file system in 8-Stable

2013-07-09 Thread Andreas Longwitz
Konstantin Belousov wrote:
> On Mon, Jul 08, 2013 at 12:26:43AM +0200, Andreas Longwitz wrote:
>> The deadlock can be explained now: pid 1 (init) sleeps on "mount drain"
>> because mp->mnt_lockref was 1. This setting was done by pid 18 (gjournal
>> switcher) by calling vfs_busy(). pid 18 now sleeps on "suspwt" because
>> mp->mnt_writeopcount was 1. This setting was done by pid 1 before going
>> to sleep by calling vn_start_write() in dounmount().
>>
>> I think the reason for this deadlock is the commit r249055 which seems
>> not to be compatible with gjournal.
> Thank you for the analysis. I think 'not compatible' is some
> understatement. The situation clearly causes a deadlock, you are right.
> 
> The vfs_busy(); vfs_write_suspend(); call sequence is somewhat dubious,
> in fact, exactly because unmount could start in between. I think that
> vfs_write_suspend() must avoid setting MNT_SUSPEND if unmount was
> started. Patch below, for HEAD, should fix the problem, by marking the
> callers of vfs_write_suspend(), which are not protected by the covered
> vnode lock, with the VS_SKIP_UNMOUNT flag.

Agree.

> I believe that the conflicts on stable/8 should be trivial, if any.

Yes, I have adapted r244795, r244925 and r245286 from head and your
patch for the umount hang to 8-Stable and everything looks fine. All my
reboots worked as expected.

By the way, because the source gjounal.c is involved: can you extend the
panic message for Journal overflow a little bit:

-> diff g_journal.c.orig g_journal.c
342,343c343,344
< panic("Journal overflow (joffset=%jd active=%jd inactive=%jd)",
<   (intmax_t)sc->sc_journal_offset,
---
> panic("Journal overflow (id=%d joffset=%jd active=%jd inactive=%jd)",
>   sc->sc_id, (intmax_t)sc->sc_journal_offset,

This was helpful for analyzing the still unsolved "suspwt" lock problem
from kern/164252, please look at
 http://lists.freebsd.org/pipermail/freebsd-geom/2012-May/005246.html

-- 
Andreas Longwitz


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


Re: Shutdown hangs on unmount of a gjournaled file system in 8-Stable

2013-07-07 Thread Konstantin Belousov
On Mon, Jul 08, 2013 at 12:26:43AM +0200, Andreas Longwitz wrote:
> The deadlock can be explained now: pid 1 (init) sleeps on "mount drain"
> because mp->mnt_lockref was 1. This setting was done by pid 18 (gjournal
> switcher) by calling vfs_busy(). pid 18 now sleeps on "suspwt" because
> mp->mnt_writeopcount was 1. This setting was done by pid 1 before going
> to sleep by calling vn_start_write() in dounmount().
> 
> I think the reason for this deadlock is the commit r249055 which seems
> not to be compatible with gjournal.
Thank you for the analysis. I think 'not compatible' is some
understatement. The situation clearly causes a deadlock, you are right.

The vfs_busy(); vfs_write_suspend(); call sequence is somewhat dubious,
in fact, exactly because unmount could start in between. I think that
vfs_write_suspend() must avoid setting MNT_SUSPEND if unmount was
started. Patch below, for HEAD, should fix the problem, by marking the
callers of vfs_write_suspend(), which are not protected by the covered
vnode lock, with the VS_SKIP_UNMOUNT flag.

I believe that the conflicts on stable/8 should be trivial, if any.

diff --git a/sys/geom/journal/g_journal.c b/sys/geom/journal/g_journal.c
index a3c996c..3ce2785 100644
--- a/sys/geom/journal/g_journal.c
+++ b/sys/geom/journal/g_journal.c
@@ -2960,7 +2960,7 @@ g_journal_do_switch(struct g_class *classp)
GJ_TIMER_STOP(1, &bt, "BIO_FLUSH time of %s", sc->sc_name);
 
GJ_TIMER_START(1, &bt);
-   error = vfs_write_suspend(mp);
+   error = vfs_write_suspend(mp, VS_SKIP_UNMOUNT);
GJ_TIMER_STOP(1, &bt, "Suspend time of %s", mountpoint);
if (error != 0) {
GJ_DEBUG(0, "Cannot suspend file system %s (error=%d).",
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 7eac0ef..06e59f9 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1668,8 +1668,7 @@ vn_finished_secondary_write(mp)
  * Request a filesystem to suspend write operations.
  */
 int
-vfs_write_suspend(mp)
-   struct mount *mp;
+vfs_write_suspend(struct mount *mp, int flags)
 {
int error;
 
@@ -1680,6 +1679,21 @@ vfs_write_suspend(mp)
}
while (mp->mnt_kern_flag & MNTK_SUSPEND)
msleep(&mp->mnt_flag, MNT_MTX(mp), PUSER - 1, "wsuspfs", 0);
+
+   /*
+* Unmount holds a write reference on the mount point.  If we
+* own busy reference and drain for writers, we deadlock with
+* the reference draining in the unmount path.  Callers of
+* vfs_write_suspend() must specify VS_SKIP_UNMOUNT if
+* vfs_busy() reference is owned and caller is not in the
+* unmount context.
+*/
+   if ((flags & VS_SKIP_UNMOUNT) != 0 &&
+   (mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) {
+   MNT_IUNLOCK(mp);
+   return (EBUSY);
+   }
+
mp->mnt_kern_flag |= MNTK_SUSPEND;
mp->mnt_susp_owner = curthread;
if (mp->mnt_writeopcount > 0)
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 42bfb65..b0cbcc0 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -398,6 +398,9 @@ extern int  vttoif_tab[];
 #defineVR_START_WRITE  0x0001  /* vfs_write_resume: start write 
atomically */
 #defineVR_NO_SUSPCLR   0x0002  /* vfs_write_resume: do not clear 
suspension */
 
+#defineVS_SKIP_UNMOUNT 0x0001  /* vfs_write_suspend: fail if the
+  filesystem is being unmounted */
+
 #defineVREF(vp)vref(vp)
 
 #ifdef DIAGNOSTIC
@@ -711,7 +714,7 @@ int vn_io_fault_pgmove(vm_page_t ma[], vm_offset_t offset, 
int xfersize,
 intvfs_cache_lookup(struct vop_lookup_args *ap);
 void   vfs_timestamp(struct timespec *);
 void   vfs_write_resume(struct mount *mp, int flags);
-intvfs_write_suspend(struct mount *mp);
+intvfs_write_suspend(struct mount *mp, int flags);
 intvop_stdbmap(struct vop_bmap_args *);
 intvop_stdfsync(struct vop_fsync_args *);
 intvop_stdgetwritemount(struct vop_getwritemount_args *);
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index 9a9c88a..ad157aa 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -423,7 +423,7 @@ restart:
 */
for (;;) {
vn_finished_write(wrtmp);
-   if ((error = vfs_write_suspend(vp->v_mount)) != 0) {
+   if ((error = vfs_write_suspend(vp->v_mount, 0)) != 0) {
vn_start_write(NULL, &wrtmp, V_WAIT);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
goto out;
diff --git a/sys/ufs/ffs/ffs_suspend.c b/sys/ufs/ffs/ffs_suspend.c
index 3198c1a..a8c4578 100644
--- a/sys/ufs/ffs/ffs_suspend.c
+++ b/sys/ufs/ffs/ffs_suspend.c
@@ -206,7 +206,7 @@ ffs_susp_suspend(struct mount *mp)
return (EPERM);
 #endif
 
-   if ((error = vfs_write_suspend(mp)) != 0)
+   if ((error = vfs_write_

Shutdown hangs on unmount of a gjournaled file system in 8-Stable

2013-07-07 Thread Andreas Longwitz
The problem occurs after an update of 8-stable from r248120 to r252111.
Sometimes shutdown hangs:

Waiting (max 60 seconds) for system process `vnlru' to stop...done
Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
Waiting (max 60 seconds) for system process `syncer' to stop...
Syncing disks, vnodes remaining...0 0 done
All buffers synced.

>From the kernel dump I see the deadlock occurs on unmount of a
gjournaled file system. Involved are two processes

db> ps
pid ppid pgrp uid state wmesg  wchan  cmd
  1   0   1   0  SLs  mount dr 0xff007f7e559c [init]
 18   0   0   0  SL   suspwt   0xff007f7e5364 [g_journal switcher]

(kgdb) info threads
 158 Thread 12 (PID=1: init)  sched_switch (td=0xff000235e8e0,
  newtd=,
flags=) at /usr/src/sys/kern/sched_ule.c:1932
 
 217 Thread 100076 (PID=18: g_journal switcher)  sched_switch

(td=0xff0002bd6000,
newtd=, flags=) at
/usr/src/sys/kern/sched_ule.c:1932


(kgdb) thread 158
[Switching to thread 158 (Thread 12)]#0
sched_switche(td=0xff000235e8e0,
newtd=, flags=) at
/usr/src/sys/kern/sched_ule.c:1932
1932cpuid = PCPU_GET(cpuid);

(kgdb) bt
#0  sched_switch (td=0xff000235e8e0, newtd=,
  flags=)
  at /usr/src/sys/kern/sched_ule.c:1932
#1  0x80407836 in mi_switch (flags=260, newtd=0x0) at

  /usr/src/sys/kern/kern_synch.c:466
#2  0x8043e0e2 in sleepq_wait (wchan=0xff007f7e559c, pri=80)
  at /usr/src/sys/kern/subr_sleepqueue.c:613
#3  0x80407fc6 in _sleep (ident=0xff007f7e559c,
  lock=0xff007f7e52f0,
  priority=,
  wmesg=0x8069f595 "mount drain", timo=0)
  at /usr/src/sys/kern/kern_synch.c:250
#4  0x8048ee42 in dounmount (mp=0xff007f7e52f0,
  flags=524288, td=)
  at /usr/src/sys/kern/vfs_mount.c:1266
#5  0x80493202 in vfs_unmountall () at
  /usr/src/sys/kern/vfs_subr.c:3321
#6  0x803fec69 in boot (howto=) at
  /usr/src/sys/kern/kern_shutdown.c:428
#7  0x803fef86 in reboot (td=,
  uap=0xff8000238bb0)
  at /usr/src/sys/kern/kern_shutdown.c:191
#8  0x805db1b4 in amd64_syscall (td=0xff000235e8e0,
  traced=0) at subr_syscall.c:114
#9  0x805c282c in Xfast_syscall () at
 /usr/src/sys/amd64/amd64/exception.S:387

(kgdb) f 5
#5  0x80493202 in vfs_unmountall () at
  /usr/src/sys/kern/vfs_subr.c:3321
3321error = dounmount(mp, MNT_FORCE, td);

(kgdb) p mp->mnt_lockref
$1=1

(kgdb) f 4
#4  0x8048ee42 in dounmount (mp=0xff007f7e52f0,
 flags=524288, td=)
 at /usr/src/sys/kern/vfs_mount.c:1266
1266error = msleep(&mp->mnt_lockref, MNT_MTX(mp), PVFS,

(kgdb) list
1261if (flags & MNT_FORCE)
1262 mp->mnt_kern_flag |= MNTK_UNMOUNTF;
1263error = 0;
1264if (mp->mnt_lockref) {
1265 mp->mnt_kern_flag |= MNTK_DRAINING;
1266 error = msleep(&mp->mnt_lockref, MNT_MTX(mp), PVFS,
1267"mount drain", 0);
1268}
1269MNT_IUNLOCK(mp);
1270KASSERT(mp->mnt_lockref == 0,

(kgdb) thread 217
[Switching to thread 217 (Thread 100076)]#0  sched_switch
  (td=0xff0002bd6000,
   newtd=,
   flags=) at
   /usr/src/sys/kern/sched_ule.c:1932
1932cpuid = PCPU_GET(cpuid);

(kgdb) bt
#0  sched_switch (td=0xff0002bd6000, newtd=,
   flags=)
   at /usr/src/sys/kern/sched_ule.c:1932
#1  0x80407836 in mi_switch (flags=260, newtd=0x0) at
   /usr/src/sys/kern/kern_synch.c:466
#2  0x8043e0e2 in sleepq_wait
   (wchan=0xff007f7e5364, pri=159)
   at /usr/src/sys/kern/subr_sleepqueue.c:613
#3  0x80407fc6 in _sleep (ident=0xff007f7e5364,
   lock=0xff007f7e52f0,
   priority=,
   wmesg=0x806a0813 "suspwt", timo=0)
   at /usr/src/sys/kern/kern_synch.c:250
#4  0x804a25f0 in vfs_write_suspend (mp=0xff007f7e52f0) at
   /usr/src/sys/kern/vfs_vnops.c:1277
#5  0x80c843bd in g_journal_switcher
   (arg=) at
   /usr/src/sys/modules/geom/geom_journal/../
../../geom/journal/g_journal.c:2968
#6  0x803d326f in fork_exit (callout=0x80c838e0
   , arg=0x80c8b140,
   frame=0xff8242e68c40) at
   /usr/src/sys/kern/kern_fork.c:872
#7  0x805c2a0e in fork_trampoline () at
   /usr/src/sys/amd

Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-23 Thread Willem Jan Withagen


Op 23 jun. 2013 om 03:15 heeft Jeremy Chadwick  het volgende 
geschreven:

> On Sun, Jun 23, 2013 at 02:41:27AM +0200, Willem Jan Withagen wrote:
>> On 19-6-2013 17:04, Jeremy Chadwick wrote:
>>> - Adam runs 9.1-RELEASE because of business needs pertaining to
>>>  freebsd-update and binary updates.  (I ask more about this for
>>>  benefits of readers below, however -- because this situation comes
>>>  up a lot and I want to know what real-world admins do)
>> 
>> The bug is very specifically available in 9.1-RELEASE because I got
>> bit by it before the release of 9.1. But discussed it with avg@ and
>> it did not make it into the release, but was submitted only like 2
>> weeks later.
>> 
>> So in that case you can probably stop looking.
>> 
>> For just about any 9.1-STABLE after that should the fix be in the code.
> 
> I'm not sure why so many people (so far) seem to think that this problem
> is always the same issue -- it isn't.  There are multiple things that
> have historically (and/or presently) have caused this issue.
> 
> Here's the list I composed only a few days ago, and it is far from
> thorough:
> 
> http://lists.freebsd.org/pipermail/freebsd-stable/2013-June/073863.html
> 

Being in software for over 30 years I assume very little about:
it's correctness.
But I assume that it could be me, causing pilot-errors.

So what I was trying to say:
Several of the bugs in this range were fixed shortly after the 9.1-release, so 
the first step I'd like to suggest, is to get beyond this point in the release 
stream. And test again.

My reasoning was more the other way around: unless you have gone to a release 
with at least these fixes, you cannot tell whether it is already fixed or not.
Until then, a lot of the debugging could be not fully usefull.

--WjW

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


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-22 Thread Jeremy Chadwick
On Sun, Jun 23, 2013 at 02:41:27AM +0200, Willem Jan Withagen wrote:
> On 19-6-2013 17:04, Jeremy Chadwick wrote:
> >- Adam runs 9.1-RELEASE because of business needs pertaining to
> >   freebsd-update and binary updates.  (I ask more about this for
> >   benefits of readers below, however -- because this situation comes
> >   up a lot and I want to know what real-world admins do)
> 
> The bug is very specifically available in 9.1-RELEASE because I got
> bit by it before the release of 9.1. But discussed it with avg@ and
> it did not make it into the release, but was submitted only like 2
> weeks later.
> 
> So in that case you can probably stop looking.
> 
> For just about any 9.1-STABLE after that should the fix be in the code.

I'm not sure why so many people (so far) seem to think that this problem
is always the same issue -- it isn't.  There are multiple things that
have historically (and/or presently) have caused this issue.

Here's the list I composed only a few days ago, and it is far from
thorough:

http://lists.freebsd.org/pipermail/freebsd-stable/2013-June/073863.html

My point is that the "shutdown -r issue" issue might manifest itself in
the same fashion for everyone, but the **root cause** often differs.
I.e.  what fixed it for you may not fix it for Adam.  We must wait and
see (he's in the process of getting a system to try stable/9 on).

-- 
| Jeremy Chadwick   j...@koitsu.org |
| UNIX Systems Administratorhttp://jdc.koitsu.org/ |
| Making life hard for others since 1977. PGP 4BD6C0CB |

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


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-22 Thread Willem Jan Withagen

On 19-6-2013 17:04, Jeremy Chadwick wrote:

- Adam runs 9.1-RELEASE because of business needs pertaining to
   freebsd-update and binary updates.  (I ask more about this for
   benefits of readers below, however -- because this situation comes
   up a lot and I want to know what real-world admins do)


The bug is very specifically available in 9.1-RELEASE because I got bit 
by it before the release of 9.1. But discussed it with avg@ and it did 
not make it into the release, but was submitted only like 2 weeks later.


So in that case you can probably stop looking.

For just about any 9.1-STABLE after that should the fix be in the code.

--WjW

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


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-22 Thread Willem Jan Withagen

On 19-6-2013 15:41, Steven Hartland wrote:

- Original Message - From: "Ronald Klop"




On Wed, 19 Jun 2013 14:53:19 +0200, Adam Strohl
 wrote:


On 6/19/2013 19:21, Jeremy Chadwick wrote:

On Wed, Jun 19, 2013 at 06:35:57PM +0700, Adam Strohl wrote:

Hello -STABLE@,

So I've seen this situation seemingly randomly on a number of both
physical 9.1 boxes as well as VMs for I would say 6-9 months at
least.  I finally have a physical box here that reproduces it
consistently that I can reboot easily (ie; not a production/client
server).


Hi,

My home computer had the same symptom (not rebooting after 'all
buffers flushed' message) a couple of months ago. But I follow
9-STABLE and the problem is gone for a while now.


avg@ did a lot of work on the ZFS vfs locking which fixed at least one
hang on reboot for ZFS. I don't believe this is in 9.1-RELEASE, so you
should test a stable/9 or 8.4-RELEASE (which is newer than 9.1-RELEASE)
kernel.


I was one of the victims of this bug, a while back.
Patched and ran a lot of diffs from avg@, even tried some stuff he wrote 
for -Current, but we got things working.
And in the end it was integrated into -STABLE. So I'm running an 
unpatched -STABLE, and I did not have the problem since.


Currently running:
9.1-STABLE FreeBSD 9.1-STABLE #172 r250288: Mon May 6 06:49:36 CEST 2013

And the system got rebooted only just this week for some maintenance.

So either you take a look at the -Current code to see if more changes 
have been made, or perhaps ask avg@ for suggestions.


--WjW

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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-20 Thread Kevin Oberman
On Thu, Jun 20, 2013 at 4:55 PM, Bengt Ahlgren  wrote:

> Konstantin Belousov  writes:
>
> > On Mon, Jun 17, 2013 at 09:16:56PM +0200, Michiel Boland wrote:
> >> On 06/16/2013 17:11, Michiel Boland wrote:
> >> > Hi. Recently I switched to WITH_NEW_XORG, primarily because the
> >> > stock X server
> >> > with Intel driver has some issues that make it unusable for me.
> >> >
> >> > The new X server and Intel driver works extremely well, so kudos
> >> > to whoever made
> >> > this possible.
> >> >
> >> > Unfortunately, I am now experiencing random hangs on shutdown. On
> >> > shutdown the
> >> > system randomly freezes after
> >> >
> >> > [...] syslogd: exiting on signal 15
> >> >
> >> > I would then expect to see 'Waiting (max 60 seconds) for system
> >> > process 'XXX' to
> >> > stop messages, but these never arrive.
> >>
> >> So it turns out that init hangs because vga_txtmouse (draw_txtmouse in
> fact) is
> >> hogging the clock swi. The routine is waiting for a vertical retrace
> which never
> >> arrives. (The new intel driver can't return to text console, so the
> screen just
> >> goes blank when X exits.)
> >>
> >> Some workarounds:
> >>
> >> - don't run moused (i.e. disable it in rc.conf and devd.conf)
> >>instead run the X server in combination with hald
> >>
> >> - do run moused, but then either
> >>
> >>   - unplug the mouse before shutting down
> >>
> >>- build a kernel with VGA_NO_FONT_LOADING
> >>
> >> Of course the long-term fix is to remove the possibly infinite loop in
> >> draw_txtmouse.
> >>
> >> Thanks to Konstantin for his patience in helping me track this down.
> >
> > The following patch, although a hack, should fix the issue.
> > Michiel tested it.
> >
> > diff --git a/sys/dev/drm2/i915/intel_fb.c b/sys/dev/drm2/i915/intel_fb.c
> > index 3cb3b78..e41a49f 100644
> > --- a/sys/dev/drm2/i915/intel_fb.c
> > +++ b/sys/dev/drm2/i915/intel_fb.c
> > @@ -207,6 +207,8 @@ static void intel_fbdev_destroy(struct drm_device
> *dev,
> >   }
> >  }
> >
> > +extern int sc_txtmouse_no_retrace_wait;
> > +
> >  int intel_fbdev_init(struct drm_device *dev)
> >  {
> >   struct intel_fbdev *ifbdev;
> > @@ -229,6 +231,7 @@ int intel_fbdev_init(struct drm_device *dev)
> >
> >   drm_fb_helper_single_add_all_connectors(&ifbdev->helper);
> >   drm_fb_helper_initial_config(&ifbdev->helper, 32);
> > + sc_txtmouse_no_retrace_wait = 1;
> >   return 0;
> >  }
> >
> > diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c
> > index 6e6663c..fc7f02f 100644
> > --- a/sys/dev/syscons/scvgarndr.c
> > +++ b/sys/dev/syscons/scvgarndr.c
> > @@ -395,6 +395,8 @@ vga_txtblink(scr_stat *scp, int at, int flip)
> >  {
> >  }
> >
> > +int sc_txtmouse_no_retrace_wait;
> > +
> >  #ifndef SC_NO_CUTPASTE
> >
> >  static void
> > @@ -445,7 +447,9 @@ draw_txtmouse(scr_stat *scp, int x, int y)
> >  #if 1
> >   /* wait for vertical retrace to avoid jitter on some videocards */
> >   crtc_addr = scp->sc->adp->va_crtc_addr;
> > - while (!(inb(crtc_addr + 6) & 0x08)) /* idle */ ;
> > + while (!sc_txtmouse_no_retrace_wait &&
> > + !(inb(crtc_addr + 6) & 0x08))
> > + /* idle */ ;
> >  #endif
> >   c = scp->sc->mouse_char;
> >   vidd_load_font(scp->sc->adp, 0, 32, 8, font_buf, c, 4);
>
> This patch fixes the shutdown hangs after KMS is initialised for me (on
> a Thinkpad X201 w recent 9-STABLE)!  Thanks!
>
> 9.1-REL does not hang, however.  Don't know whether this is interesting,
> but I bisected 9-STABLE to find out where the problem started (kernel
> only together with 9.1-REL userland).  9-STABLE up to and including
> r246775 works as it should, but starting with r246785, it hangs on
> shutdown.  See (yes, it is mouse related!):
>
> http://svnweb.freebsd.org/base?view=revision&revision=246785
>
> Just to be clear: These hangs _only_ occur if KMS gets initialised.
> When testing this, I booted, started kdm, and then chose shutdown in the
> kdm menu.  moused was running.
>
> Bengt
>

See *251961* <http://svnweb.freebsd.org/base?view=revision&revision=251961>to
see the work-around and an explanation of what it worked around. This
goes away when return to console mode is available with KMS. The problem is
as old as KMS support, but
246785<http://svnweb.freebsd.org/base?view=revision&revision=246785>triggered
it most of the time when it was occasional before that. It's a
race issue.
-- 
R. Kevin Oberman, Network Engineer
E-mail: rkober...@gmail.com
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-20 Thread Bengt Ahlgren
Konstantin Belousov  writes:

> On Mon, Jun 17, 2013 at 09:16:56PM +0200, Michiel Boland wrote:
>> On 06/16/2013 17:11, Michiel Boland wrote:
>> > Hi. Recently I switched to WITH_NEW_XORG, primarily because the
>> > stock X server
>> > with Intel driver has some issues that make it unusable for me.
>> >
>> > The new X server and Intel driver works extremely well, so kudos
>> > to whoever made
>> > this possible.
>> >
>> > Unfortunately, I am now experiencing random hangs on shutdown. On
>> > shutdown the
>> > system randomly freezes after
>> >
>> > [...] syslogd: exiting on signal 15
>> >
>> > I would then expect to see 'Waiting (max 60 seconds) for system
>> > process 'XXX' to
>> > stop messages, but these never arrive.
>> 
>> So it turns out that init hangs because vga_txtmouse (draw_txtmouse in fact) 
>> is 
>> hogging the clock swi. The routine is waiting for a vertical retrace which 
>> never 
>> arrives. (The new intel driver can't return to text console, so the screen 
>> just 
>> goes blank when X exits.)
>> 
>> Some workarounds:
>> 
>> - don't run moused (i.e. disable it in rc.conf and devd.conf)
>>instead run the X server in combination with hald
>> 
>> - do run moused, but then either
>> 
>>   - unplug the mouse before shutting down
>> 
>>- build a kernel with VGA_NO_FONT_LOADING
>> 
>> Of course the long-term fix is to remove the possibly infinite loop in 
>> draw_txtmouse.
>> 
>> Thanks to Konstantin for his patience in helping me track this down.
>
> The following patch, although a hack, should fix the issue.
> Michiel tested it.
>
> diff --git a/sys/dev/drm2/i915/intel_fb.c b/sys/dev/drm2/i915/intel_fb.c
> index 3cb3b78..e41a49f 100644
> --- a/sys/dev/drm2/i915/intel_fb.c
> +++ b/sys/dev/drm2/i915/intel_fb.c
> @@ -207,6 +207,8 @@ static void intel_fbdev_destroy(struct drm_device *dev,
>   }
>  }
>  
> +extern int sc_txtmouse_no_retrace_wait;
> +
>  int intel_fbdev_init(struct drm_device *dev)
>  {
>   struct intel_fbdev *ifbdev;
> @@ -229,6 +231,7 @@ int intel_fbdev_init(struct drm_device *dev)
>  
>   drm_fb_helper_single_add_all_connectors(&ifbdev->helper);
>   drm_fb_helper_initial_config(&ifbdev->helper, 32);
> + sc_txtmouse_no_retrace_wait = 1;
>   return 0;
>  }
>  
> diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c
> index 6e6663c..fc7f02f 100644
> --- a/sys/dev/syscons/scvgarndr.c
> +++ b/sys/dev/syscons/scvgarndr.c
> @@ -395,6 +395,8 @@ vga_txtblink(scr_stat *scp, int at, int flip)
>  {
>  }
>  
> +int sc_txtmouse_no_retrace_wait;
> +
>  #ifndef SC_NO_CUTPASTE
>  
>  static void
> @@ -445,7 +447,9 @@ draw_txtmouse(scr_stat *scp, int x, int y)
>  #if 1
>   /* wait for vertical retrace to avoid jitter on some videocards */
>   crtc_addr = scp->sc->adp->va_crtc_addr;
> - while (!(inb(crtc_addr + 6) & 0x08)) /* idle */ ;
> + while (!sc_txtmouse_no_retrace_wait &&
> + !(inb(crtc_addr + 6) & 0x08))
> + /* idle */ ;
>  #endif
>   c = scp->sc->mouse_char;
>   vidd_load_font(scp->sc->adp, 0, 32, 8, font_buf, c, 4); 

This patch fixes the shutdown hangs after KMS is initialised for me (on
a Thinkpad X201 w recent 9-STABLE)!  Thanks!

9.1-REL does not hang, however.  Don't know whether this is interesting,
but I bisected 9-STABLE to find out where the problem started (kernel
only together with 9.1-REL userland).  9-STABLE up to and including
r246775 works as it should, but starting with r246785, it hangs on
shutdown.  See (yes, it is mouse related!):

http://svnweb.freebsd.org/base?view=revision&revision=246785

Just to be clear: These hangs _only_ occur if KMS gets initialised.
When testing this, I booted, started kdm, and then chose shutdown in the
kdm menu.  moused was running.

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


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-20 Thread Richard Tector

On 19/06/2013 12:35, Adam Strohl wrote:

Hello -STABLE@,

So I've seen this situation seemingly randomly on a number of both
physical 9.1 boxes as well as VMs for I would say 6-9 months at least.
  I finally have a physical box here that reproduces it consistently
that I can reboot easily (ie; not a production/client server).

No matter what I do:

reboot
shutdown -p
shutdown -r

This specific server will stop at "All buffers synced" and not actually
power down or reboot.  KB input seems to be ignored.  This server is a
ZFS NAS (with GMIRROR for boot blocks) but the other boxes which show
this are using GMIRRORs for root/swap/boot (no ZFS).

Here is what happens on the console: http://i.imgur.com/1H8JMyB.jpg



Hi,

Just to add a 'me too'. I see this on two different boxes, both 
currently running recentish 9.1-STABLE, and it has definitely been an 
issue for me since at least 9.0-RELEASE.


One of the boxes is a Dell R210 II with a single WD HDD - dmesg: 
http://daniel.thekeelecentre.com/dmesg.txt

I've tried booting/rebooting without the USB KVM dongle attached too.
Notes - does not run moused and no OpenLDAP.

The second host I have the issue with is a home-build using a Tyan 
Toledo i3210W (S5211) and two Seagate HDDs - dmesg: 
http://daniel.thekeelecentre.com/dmesg-daffy.txt (yes, a disk has 
failed, but the reboot issue pre-dated this).
Note - does not run moused, but did run slapd. I saw the same DB 
corruption as the OP.


I can play with the latter box as it is no longer in use and will try 
the following suggestions from Jeremy later this evening:

4. Does "sysctl hw.usb.no_shutdown_wait=1" help you?
5. Does "sysctl hw.acpi.handle_reboot=1" help you?
6. Does "sysctl hw.acpi.disable_on_reboot=1" help you?

Regards,

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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-20 Thread Kevin Oberman
On Thu, Jun 20, 2013 at 1:23 AM, Javad Kouhi  wrote:

> On Wed, 19 Jun 2013 01:58:18 +0430, Jeremy Chadwick 
> wrote:
>
>  On Wed, Jun 19, 2013 at 01:41:10AM +0430, Javad Kouhi wrote:
>>
>>> I've read the posts again. Although the issue looks same as Michiel
>>> Boland (first link) but I'm not sure if the root of the issue is same
>>> as Michiel's too (second link). Anyway, it should be discussed in
>>> another thread as you said.
>>>
>>
>> Let me be more clear:
>>
>> I have seen repeated reports from people complaining about "lockups when
>> shutting down" many times over the years.  The ones I remember:
>>
>> - Certain oddities with SCSI/SATA storage drivers and disks (many of
>>   these have been fixed)
>> - ACPI-based reboot not working correctly on some motherboards
>>   (depends on hw.acpi.handle_reboot and sometimes
>>   hw.acpi.disable_on_reboot) -- not sure if this still pops up
>> - USB layer causing issues, or possibly some USB CAM integration
>>   problem (this is still an ongoing one)
>> - Now some sort of weird Intel graphics driver (and DRM?) quirk
>>   involving moused(8) and Vsync (the issue reported by Michiel)
>>
>> And I'm certain I'm forgetting others.
>>
>> What Kevin Oberman said also applies -- these are painful to debug
>> because the system is already in a "shutting down" state where usability
>> and accessibility becomes bare minimal, and you're kind of at your
>> wits end.
>>
>> Booting verbose can help -- there are other messages printed to the VGA
>> (and/or serial) console during the shutdown phase when verbose.
>>
>> All you can hope for is that the kernel is still alive and Ctrl-Alt-Esc
>> to force a drop to DDB (assuming all of this is enabled in your kernel)
>> works and that someone familiar with the FreeBSD kernel can help you
>> debug it (possibly it's just easier to do that, type "panic", then
>> issue "call doadump" to force a dump to swap at that point -- kib@
>> might have better recommendations).
>>
>> Serial console can also greatly help, because quite often there are
>> pages upon pages of debugging information that are useful, otherwise you
>> have to hope the VGA console keyboard is functional (even more tricky
>> with USB) and that Scroll Lock + Page Up/Down function along with taking
>> photos of the screen; doing it this way is stressful and painful for
>> everyone involved.
>>
>> I hope this sheds some light on why I said what I did.  :-)
>>
>>
>
> Ok, I will compile a new kernel with DDB option. I will submit the crash
> info and dmesg output the next time it happens. (in a new thread)
>
> Thanks for your help.
>
> Regards,
>

Please note that head was just patched to fix the moused issue. The fix is
also applicable to 9, but I don't know when it might be MFCed. Several
people have reported that it does resolve the problem (which is an infinite
loop in the kernel)
 and my first test seems to indicate that it works for me, but I can't be
sure as the problem was sporadic.

And, yes, I would LOVE to have a serial console back when Intel KMS is used!

-- 
R. Kevin Oberman, Network Engineer
E-mail: rkober...@gmail.com
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-20 Thread Javad Kouhi

On Wed, 19 Jun 2013 01:58:18 +0430, Jeremy Chadwick  wrote:


On Wed, Jun 19, 2013 at 01:41:10AM +0430, Javad Kouhi wrote:

I've read the posts again. Although the issue looks same as Michiel
Boland (first link) but I'm not sure if the root of the issue is same
as Michiel's too (second link). Anyway, it should be discussed in
another thread as you said.


Let me be more clear:

I have seen repeated reports from people complaining about "lockups when
shutting down" many times over the years.  The ones I remember:

- Certain oddities with SCSI/SATA storage drivers and disks (many of
  these have been fixed)
- ACPI-based reboot not working correctly on some motherboards
  (depends on hw.acpi.handle_reboot and sometimes
  hw.acpi.disable_on_reboot) -- not sure if this still pops up
- USB layer causing issues, or possibly some USB CAM integration
  problem (this is still an ongoing one)
- Now some sort of weird Intel graphics driver (and DRM?) quirk
  involving moused(8) and Vsync (the issue reported by Michiel)

And I'm certain I'm forgetting others.

What Kevin Oberman said also applies -- these are painful to debug
because the system is already in a "shutting down" state where usability
and accessibility becomes bare minimal, and you're kind of at your
wits end.

Booting verbose can help -- there are other messages printed to the VGA
(and/or serial) console during the shutdown phase when verbose.

All you can hope for is that the kernel is still alive and Ctrl-Alt-Esc
to force a drop to DDB (assuming all of this is enabled in your kernel)
works and that someone familiar with the FreeBSD kernel can help you
debug it (possibly it's just easier to do that, type "panic", then
issue "call doadump" to force a dump to swap at that point -- kib@
might have better recommendations).

Serial console can also greatly help, because quite often there are
pages upon pages of debugging information that are useful, otherwise you
have to hope the VGA console keyboard is functional (even more tricky
with USB) and that Scroll Lock + Page Up/Down function along with taking
photos of the screen; doing it this way is stressful and painful for
everyone involved.

I hope this sheds some light on why I said what I did.  :-)




Ok, I will compile a new kernel with DDB option. I will submit the crash  
info and dmesg output the next time it happens. (in a new thread)


Thanks for your help.

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


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Adam Strohl

On 6/19/2013 22:04, Jeremy Chadwick wrote:

On Wed, Jun 19, 2013 at 09:15:18PM +0700, Adam Strohl wrote:

On 6/19/2013 20:35, Jeremy Chadwick wrote:


I've snipped out portions which aren't relevant at this point in the
convo.  I'm trying to be terse as much as possible here (honest).

To recap for readers/mailing list:

- Adam seems the same behaviour on systems on bare metal, as well as
   FreeBSD guests running under VMware ESXi 5.0 hypervisor.  However,
   as I stated on the list just yesterday about "lock-ups on shutdown",
   every situation may be different and there is a well-established
   history of this problem on FreeBSD where each root cause (bugs)
   were completely different from one another.

- The system we're discussing at this point in the thread is on
   bare metal -- specifically an Asus P8B-X motherboard, with BIOS
   version 6103, driven entirely by on-board Intel AHCI (not BIOS-level
   RAID).

- Adam runs 9.1-RELEASE because of business needs pertaining to
   freebsd-update and binary updates.  (I ask more about this for
   benefits of readers below, however -- because this situation comes
   up a lot and I want to know what real-world admins do)



This is all correct.


Thanks.  I was mainly interested in the storage controller being used
(in this case ahci(4)) and the disks being used (notorious ST3000DM001,
known for excessively parking heads).


Yeah, was not my first choice but then again ... RAIDZ-2 :)  HD
supply chain here (Thailand) is weird considering how many are made
here (and can't buy).  Smartd screams about them possibly needing a
firmware update (they don't according to Seagate).   Had no issues
aside from a failure a month or so again (it's an HD ... it
happens).


Absolutely understood -- and FYI, in case you need backup, your thought
process/conclusion here is spot on (re: "it's a MHDD, failures happen").


Indeed :-D



Irrelevant to your shutdown problem: as for smartmontools bitching about
the firmware: no vendors disclose what actual changes go into their
drive firmware updates (vendors if you are reading this: I will have
your souls...), so I have to read a bunch of end-user forums where
nobody knows what they're talking about, and then of course find this
"highly educational" *cough* article from Adaptec:

http://ask.adaptec.com/app/answers/detail/a_id/17241/~/known-issues-with-seagate-barracuda-7200.14-desktop-drives



Yeah I agree .. I tried to firmware upgrade them when I was building the 
system but it said they didn't qualify when using the boot ISO.  I just 
checked the site and it says no firmware update available too when using 
their search by serial # tool.   At this point I'm leery about updating 
given that I've got data on it anyway.  I do occasionally (maybe once a 
week or two and they're in the same room as me/my office) hear one parking.


I see nothing wrong in smart though, no dmesg errors and have noticed no 
issues with the array and it bench tests at around 850 MB/sec.  Too bad 
10 Gbit equipment isn't cheaper.


Also when I bought the 6 for this array I got a 7th as a cold spare :P


The problem here is that there have been *so many* firmware bugs with
Seagate's drives in the past 2 years or so that it's impossible for me
to know which fixes what.  You buy what you buy because that's what you
buy, and that's cool -- but I avoid their stuff like the plague.


Yeah.  I'd prefer WD myself but this place is swimming in "green" and 
now "red" drives.  uhgl.


<< Snipping out the unrelated parts ... >>


Can you try removing VESA and SC_PIXEL_MODE please?  I know that
sounds crazy ("what on earth would that have to do with it?"), but
please try it.  I can explain the justification if need be -- I'm being
extra paranoid of something that got discovered here on -stable only a
few days ago.  It's a stretch, but I can see potential relevance.  I can
provide details/links later.


No change unfortunately.




4. Does "sysctl hw.usb.no_shutdown_wait=1" help you?


Weirdly this allowed it to reboot on the first try (without needing
to be reset), but not the second.


I'm not surprised.  Pleas re-try with stable/9; Hans has been constantly
working on the USB stack and fixing major bugs.


Got it but probably not going to go this route as it means no more
binary upgrades.  While I can reboot it, it is the office NAS here
and so 'testing out' -STABLE I think probably isn't going to happen.


I understand.  I have a question relating to this below.


Place background_fsck="no" in /etc/rc.conf.  If the machine does not
have a clean filesystem on boot-up, you'll know because the system will
immediately begin fsck (in the foreground actively).  You'll recognise
that output if it happens, trust me.


Preaching to the choir, we se

Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-19 Thread Warren Block

On Sun, 16 Jun 2013, Ian Lepore wrote:


On Sun, 2013-06-16 at 09:07 -0700, Jeremy Chadwick wrote:

On Sun, Jun 16, 2013 at 06:01:49PM +0200, Michiel Boland wrote:

On 06/16/2013 17:55, Jeremy Chadwick wrote:
[...]


Are you running moused(8)?  Actually, I can see quite clearly that you
are in your core.txt:

Starting ums0 moused.

Try turning that off.  Don't ask me how, because devd(8) / devd.conf(5)
might be involved.



The moused is started by devd - I don't see a quick way of turning that off.


Comment out the relevant crap in devd.conf(5).  Search for "ums"
and comment out the two "notify" sections.


I don't understand why people treat devd as if it's some sort of evil
virus that they're forced to live with (using phrases like "crap in
devd.conf").  In general, the standard devd rules tend to fall into 3
categories:
 * use logger(1) to record some anomaly
 * kldload a module
 * invoke a standard /etc/rc.d script

For moused, the devd rules invoke /etc/rc.d/moused, which implies that
setting moused_enable=NO in rc.conf would be all that's needed to
disable it.


Seems that way, but it's misleading.  Plug in a USB mouse, and devd will 
start moused anyway (with different options, but still...).  ISTR that 
can be disabled with


  moused_enable="NO"
  moused_nondefault_enable="NO"

I have not tested that lately.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Matthew D. Fuller
On Wed, Jun 19, 2013 at 09:52:00AM -0700 I heard the voice of
Jeremy Chadwick, and lo! it spake thus:
> 
> Justified in your environment, but not in mine -- where most of my
> systems (at home) are extremely quiet (1000-1200rpm fans, lots of
> noise dampening material, etc.).  A 10C increase *during idle* is
> enough to make me wary.

Mmm.  Well, some of them are in 1U cases, and so behind very loud
little fans (but that's in a datacenter where *I* don't have to hear
it).  But the ones sitting beside me are behind <1kRPM fans (80 and
120 mm), and are around 28-30c (which is a tad high; the filters are
overdue for cleaning).  And ambient is probably 24-25.  I'd be
seriously creeped out if an *active* drive were 10 over ambient, much
less if flipping some config setting moved anything 10.

(this is also why I _hate_ laptops...)


> On the other hand, their forum was *filled* with post after post
> about the issue, including one fellow whose drive in something like
> 3 months was almost reaching MTBF head park/reload count.

Oh, sure.  If you don't get the stupid things to stop, you can measure
their life with an egg timer.  The 400-some these drives got before I
turned APM off happened in, like, an afternoon.


> If you had what I do (moderate-to-severe IBS), you'd know that it
> definitely doesn't get passed back in a more concentrated form.
> First joke I've been able to make about my health condition, yeah!

Well, if your diet consists of hard drive manufacturer's souls, it's
no wonder your system got all screwed up!  You gotta find something to
eat with more moral fiber!;p


-- 
Matthew Fuller (MF4839)   |  fulle...@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
   On the Internet, nobody can hear you scream.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Jeremy Chadwick
On Wed, Jun 19, 2013 at 11:34:39AM -0500, Matthew D. Fuller wrote:
> On Wed, Jun 19, 2013 at 09:16:35AM -0700 I heard the voice of
> Jeremy Chadwick, and lo! it spake thus:
> > 
> > The above CDB + subcommand disables APM entirely.  There is a lot
> > more to APM than just parking heads (and in all honesty, APM should
> > have nothing to do with parking heads).  Disabling APM can actually
> > have drastic effects on drive temperature (meaning there are certain
> > chip and/or motor operations that said feature controls *in
> > addition* to head parking), and other firmware-level features that
> > aren't documented.
> 
> True enough, in concept.  With all the drives sitting behind
> ventilation perfectly capable of dealing with 15kRPM drives, I don't
> worry about what that might do to the 7200's though...

Justified in your environment, but not in mine -- where most of my
systems (at home) are extremely quiet (1000-1200rpm fans, lots of noise
dampening material, etc.).  A 10C increase *during idle* is enough to
make me wary.  I also have extremely sensitive hearing, so drives
clicking is something I can hear from quite a distance -- I guess
working with them for so long over the years has made me sensitive to
'em.

> > Furthermore, that CDB does not work for all drives.  There are
> > Seagate drives -- I know because I bought some and returned them
> > when the APM trick did not work -- that lack the LCC-disable tie-in
> > to APM.  The drive either rejected the CDB (ATA status code error
> > returned), while others accepted it but nothing in 0xec (IDENTIFY)
> > reported as got changed.
> 
> Well, I haven't seen it with these.  Several of
> ada0:  ATA-8 SATA 3.x device
> and some systems with CC4C too.

The drives I was testing were STx000DM001.  I don't remember if I had a
DM002.  I also don't remember the firmware version they had on them, but
I do remember there were no updates available from Seagate at that time.
On the other hand, their forum was *filled* with post after post about
the issue, including one fellow whose drive in something like 3 months
was almost reaching MTBF head park/reload count.

But my point is this: 3.5" drives do not need this feature in 95% of
environments.  In desktop systems it's worthless -- in consumer desktops
it accomplishes nothing but noise and annoyance and impacts I/O, and in
business desktop desktop environments it serves no purpose because most
places have their desktops go into sleep mode (so drive standby/sleep
gets used).  And in the server environment it's pure 100% worthless.

With 2.5" drives I can see it being more useful, but only if the drive
is used in a laptop.  There are NASes (and now servers too!) which use
2.5" drives, and I sure as hell wouldn't want that happening there.

So really it's just a bad feature all around that should be specific to
one environment demographic; the vendors should have made a 2.5" drive
"dedicated for laptops" that had this feature enabled, while disabld on
all other drives (2.5" and 3.5").  What we got was nearly opposite.

> > I will have -- and eat -- their souls.
> 
> The problem with that is that the undigestible bits of "soul" just get
> passed right back into the ecosystem, and in a more concentrated form.
> 
> Some might suggest that's already happened, and is got us here in the
> first place  8-}

If you had what I do (moderate-to-severe IBS), you'd know that it
definitely doesn't get passed back in a more concentrated form.  First
joke I've been able to make about my health condition, yeah!  Ha!  I
kill me! -- Alf

-- 
| Jeremy Chadwick   j...@koitsu.org |
| UNIX Systems Administratorhttp://jdc.koitsu.org/ |
| Making life hard for others since 1977. PGP 4BD6C0CB |

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


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Matthew D. Fuller
On Wed, Jun 19, 2013 at 09:16:35AM -0700 I heard the voice of
Jeremy Chadwick, and lo! it spake thus:
> 
> The above CDB + subcommand disables APM entirely.  There is a lot
> more to APM than just parking heads (and in all honesty, APM should
> have nothing to do with parking heads).  Disabling APM can actually
> have drastic effects on drive temperature (meaning there are certain
> chip and/or motor operations that said feature controls *in
> addition* to head parking), and other firmware-level features that
> aren't documented.

True enough, in concept.  With all the drives sitting behind
ventilation perfectly capable of dealing with 15kRPM drives, I don't
worry about what that might do to the 7200's though...


> Furthermore, that CDB does not work for all drives.  There are
> Seagate drives -- I know because I bought some and returned them
> when the APM trick did not work -- that lack the LCC-disable tie-in
> to APM.  The drive either rejected the CDB (ATA status code error
> returned), while others accepted it but nothing in 0xec (IDENTIFY)
> reported as got changed.

Well, I haven't seen it with these.  Several of
ada0:  ATA-8 SATA 3.x device
and some systems with CC4C too.


> I will have -- and eat -- their souls.

The problem with that is that the undigestible bits of "soul" just get
passed right back into the ecosystem, and in a more concentrated form.

Some might suggest that's already happened, and is got us here in the
first place  8-}


-- 
Matthew Fuller (MF4839)   |  fulle...@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
   On the Internet, nobody can hear you scream.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Jeremy Chadwick
On Wed, Jun 19, 2013 at 10:53:46AM -0500, Matthew D. Fuller wrote:
> On Wed, Jun 19, 2013 at 08:04:14AM -0700 I heard the voice of
> Jeremy Chadwick, and lo! it spake thus:
> > 
> > 
> > Readers: if any of you have a ST[123]000DM001 drive running the CC24
> > firmware, and can confirm high head parking counts (SMART attribute
> > 193), and are willing to upgrade your drive firmware to the latest then
> > see if the LCC increments stop (or at least settle down to normal
> > levels), I'd love to hear from you.  I have been socially boycotting
> > these models of drives because of that idiotic firmware design choice
> > for quite some time now (not to mention the parking on those drives
> > is audibly loud in a normal living room), and if the F/W actually
> > inhibits the excessive parking then I have some drives to consider
> > upgrading.  :-)
> > 
> 
> I dunno about firmware, but you can smack 'em with a big hammer...
> 
> /etc/rc.local:
> for i in 0 1; do
> /sbin/camcontrol cmd ada${i} -a "EF 85 00 00 00 00 00 00 00 00 00 00"
> done
> 
> x-ref:
> http://lists.freebsd.org/pipermail/freebsd-stable/2009-November/052997.html
> 
> 
> LCC was somewhere in the upper 400's (I wanna say 480-some?) a year
> and change ago when I dropped that in.  It's 506/493 now on the two
> drives.

The above CDB + subcommand disables APM entirely.  There is a lot more
to APM than just parking heads (and in all honesty, APM should have
nothing to do with parking heads).  Disabling APM can actually have
drastic effects on drive temperature (meaning there are certain chip
and/or motor operations that said feature controls *in addition* to head
parking), and other firmware-level features that aren't documented.

Furthermore, that CDB does not work for all drives.  There are Seagate
drives -- I know because I bought some and returned them when the APM
trick did not work -- that lack the LCC-disable tie-in to APM.  The
drive either rejected the CDB (ATA status code error returned), while
others accepted it but nothing in 0xec (IDENTIFY) reported as got
changed.

The only model of drive I know that reliably works with this method is
the WD Green/-GP drive, and the drive temperatures do increase.  No idea
on the Blues.  (Another reason I recommend the Reds...)

What *should* have happened is that a new 0xef subcommand should have
been created for this.  Subs range from 0x00-0xff.  T13 spec shows
that a huge number of them (I'd say 30% or more) are marked "Reserved"
and an additional 30% or so are marked "Obsolete".  And finally,
0x56-0x5c, 0xd6-0xdc and 0xe0 are "Vendor Specific".

But looking at this from a more general view, the real issue is that
these types of features should not have been introduced to begin with.
The vendors introduced this problem, and now are marketing drives with
said feature disabled, claiming "we fixed the problem that annoys so
many of you!" -- the same problem **they introduced without asking
anyone**.

I will have -- and eat -- their souls.

-- 
| Jeremy Chadwick   j...@koitsu.org |
| UNIX Systems Administratorhttp://jdc.koitsu.org/ |
| Making life hard for others since 1977. PGP 4BD6C0CB |

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


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Matthew D. Fuller
On Wed, Jun 19, 2013 at 08:04:14AM -0700 I heard the voice of
Jeremy Chadwick, and lo! it spake thus:
> 
> 
> Readers: if any of you have a ST[123]000DM001 drive running the CC24
> firmware, and can confirm high head parking counts (SMART attribute
> 193), and are willing to upgrade your drive firmware to the latest then
> see if the LCC increments stop (or at least settle down to normal
> levels), I'd love to hear from you.  I have been socially boycotting
> these models of drives because of that idiotic firmware design choice
> for quite some time now (not to mention the parking on those drives
> is audibly loud in a normal living room), and if the F/W actually
> inhibits the excessive parking then I have some drives to consider
> upgrading.  :-)
> 

I dunno about firmware, but you can smack 'em with a big hammer...

/etc/rc.local:
for i in 0 1; do
/sbin/camcontrol cmd ada${i} -a "EF 85 00 00 00 00 00 00 00 00 00 00"
done

x-ref:
http://lists.freebsd.org/pipermail/freebsd-stable/2009-November/052997.html


LCC was somewhere in the upper 400's (I wanna say 480-some?) a year
and change ago when I dropped that in.  It's 506/493 now on the two
drives.


-- 
Matthew Fuller (MF4839)   |  fulle...@over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
   On the Internet, nobody can hear you scream.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Jeremy Chadwick
On Wed, Jun 19, 2013 at 09:15:18PM +0700, Adam Strohl wrote:
> On 6/19/2013 20:35, Jeremy Chadwick wrote:

I've snipped out portions which aren't relevant at this point in the
convo.  I'm trying to be terse as much as possible here (honest).

To recap for readers/mailing list:

- Adam seems the same behaviour on systems on bare metal, as well as
  FreeBSD guests running under VMware ESXi 5.0 hypervisor.  However,
  as I stated on the list just yesterday about "lock-ups on shutdown",
  every situation may be different and there is a well-established
  history of this problem on FreeBSD where each root cause (bugs)
  were completely different from one another.

- The system we're discussing at this point in the thread is on
  bare metal -- specifically an Asus P8B-X motherboard, with BIOS
  version 6103, driven entirely by on-board Intel AHCI (not BIOS-level
  RAID).

- Adam runs 9.1-RELEASE because of business needs pertaining to
  freebsd-update and binary updates.  (I ask more about this for
  benefits of readers below, however -- because this situation comes
  up a lot and I want to know what real-world admins do)

> >Thanks.  I was mainly interested in the storage controller being used
> >(in this case ahci(4)) and the disks being used (notorious ST3000DM001,
> >known for excessively parking heads).
> 
> Yeah, was not my first choice but then again ... RAIDZ-2 :)  HD
> supply chain here (Thailand) is weird considering how many are made
> here (and can't buy).  Smartd screams about them possibly needing a
> firmware update (they don't according to Seagate).   Had no issues
> aside from a failure a month or so again (it's an HD ... it
> happens).

Absolutely understood -- and FYI, in case you need backup, your thought
process/conclusion here is spot on (re: "it's a MHDD, failures happen").

Irrelevant to your shutdown problem: as for smartmontools bitching about
the firmware: no vendors disclose what actual changes go into their
drive firmware updates (vendors if you are reading this: I will have
your souls...), so I have to read a bunch of end-user forums where
nobody knows what they're talking about, and then of course find this
"highly educational" *cough* article from Adaptec:

http://ask.adaptec.com/app/answers/detail/a_id/17241/~/known-issues-with-seagate-barracuda-7200.14-desktop-drives

The problem here is that there have been *so many* firmware bugs with
Seagate's drives in the past 2 years or so that it's impossible for me
to know which fixes what.  You buy what you buy because that's what you
buy, and that's cool -- but I avoid their stuff like the plague.


Readers: if any of you have a ST[123]000DM001 drive running the CC24
firmware, and can confirm high head parking counts (SMART attribute
193), and are willing to upgrade your drive firmware to the latest then
see if the LCC increments stop (or at least settle down to normal
levels), I'd love to hear from you.  I have been socially boycotting
these models of drives because of that idiotic firmware design choice
for quite some time now (not to mention the parking on those drives
is audibly loud in a normal living room), and if the F/W actually
inhibits the excessive parking then I have some drives to consider
upgrading.  :-)


> >I can also see you're running your own kernel.  We'll get to that in a
> >moment.
> 
> It's GENERIC with the following added to the end:
> 
> # -- Add Support for nicer console
> #
> options VESA
> options SC_PIXEL_MODE

Can you try removing VESA and SC_PIXEL_MODE please?  I know that
sounds crazy ("what on earth would that have to do with it?"), but
please try it.  I can explain the justification if need be -- I'm being
extra paranoid of something that got discovered here on -stable only a
few days ago.  It's a stretch, but I can see potential relevance.  I can
provide details/links later.

> >>>4. Does "sysctl hw.usb.no_shutdown_wait=1" help you?
> >>
> >>Weirdly this allowed it to reboot on the first try (without needing
> >>to be reset), but not the second.
> >
> >I'm not surprised.  Pleas re-try with stable/9; Hans has been constantly
> >working on the USB stack and fixing major bugs.
> 
> Got it but probably not going to go this route as it means no more
> binary upgrades.  While I can reboot it, it is the office NAS here
> and so 'testing out' -STABLE I think probably isn't going to happen.

I understand.  I have a question relating to this below.

> >Place background_fsck="no" in /etc/rc.conf.  If the machine does not
> >have a clean filesystem on boot-up, you'll know because the system will
> >immediately begin fsck (in the foreground actively).  You'll recog

Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Steven Hartland


- Original Message - 
From: "Adam Strohl" 

To: "Steven Hartland" 
Cc: "Jeremy Chadwick" ; 
Sent: Wednesday, June 19, 2013 3:29 PM
Subject: Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly 
dismount



On 6/19/2013 21:21, Steven Hartland wrote:

You still need to test if stable/9 fixes your issue though as otherwise
you don't know if the issue your seeing has already been fixed, and if
its the old know ZFS vfs hang on shutdown, it has.


Thanks Steve, understood but probably not going to happen with this box. 
 I can reboot this thing but it's our NAS and not a test bed.  This 
problem on this machine isn't a big deal because its a server and not 
rebooted often (and easy to bring back).  But I more was hoping it would 
let me easily test solutions to the issue since the other servers 
showing the issue are in client production with the mind that the VMs 
not use ZFS also show a similar/identical issue  My gut says it 
appeared in/with 9.1 (We never saw this with 9.0 servers).   It is also 
possible this is a different issue from those other servers and VMs.


How far away is 9.2? ;-P

Depending on how things go with Jeremy I'll probably have to wait this 
out unless I can get a test machine or VM where I can reproduce the 
issue AND upgrade it to -STABLE (again assuming it's even the same issue).


Don't rule out there being more than one issue at play.

   Regards
   Steve


This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 


In the event of misdirection, illegible or incomplete transmission please 
telephone +44 845 868 1337
or return the E.mail to postmas...@multiplay.co.uk.

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


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Adam Strohl

On 6/19/2013 21:21, Steven Hartland wrote:

You still need to test if stable/9 fixes your issue though as otherwise
you don't know if the issue your seeing has already been fixed, and if
its the old know ZFS vfs hang on shutdown, it has.


Thanks Steve, understood but probably not going to happen with this box. 
 I can reboot this thing but it's our NAS and not a test bed.  This 
problem on this machine isn't a big deal because its a server and not 
rebooted often (and easy to bring back).  But I more was hoping it would 
let me easily test solutions to the issue since the other servers 
showing the issue are in client production with the mind that the VMs 
not use ZFS also show a similar/identical issue  My gut says it 
appeared in/with 9.1 (We never saw this with 9.0 servers).   It is also 
possible this is a different issue from those other servers and VMs.


How far away is 9.2? ;-P

Depending on how things go with Jeremy I'll probably have to wait this 
out unless I can get a test machine or VM where I can reproduce the 
issue AND upgrade it to -STABLE (again assuming it's even the same issue).

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


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Steven Hartland


- Original Message - 
From: "Adam Strohl" 

To: "Jeremy Chadwick" 
Cc: 
Sent: Wednesday, June 19, 2013 3:15 PM
Subject: Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly 
dismount



On 6/19/2013 20:35, Jeremy Chadwick wrote:


Nope, I see basically the same thing sometimes under ESXi 5.0
Hypervisor (and yes it worries me the implications of something so
broad).  Those unites I just haven't been able to isolate on a
server which isn't critical.  Lets focus on this server for now
though per your suggestion below.


I'm sorry but I don't understand your first sentence -- the first part
of your sentence says "nope" (I have to assume in reply to my "on bare
metal" part), but then says "I see basically the same thing sometimes
under ESXi" which implies an alternate environment in comparison (i.e.
we *are* talking about bare metal).  Consider me confused.  :-)


Basically: The issue is extremely similar if not the same root cause, be 
it a native or virtual server.  This server though is native.





2. We need to know what version of "9.1" you're using, i.e. 9.1-RELEASE.
If you use stable/9 (RELENG_9) we need to see uname -a output (you can
hide the machine name if you want).


Sorry, this ZFS box is 9.1-R P4 (kernel built today):

FreeBSD ilos.dsn 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #6: Wed Jun
19 15:31:12 ICT 2013
root@hostname:/usr/obj/usr/src/sys/ATEAMSYSTEMS  amd64


I suggest trying stable/9 (and staying with it, for that matter).


The issue is no binary updates and we have a large deploy base, so we've 
stuck with -R and use it internally because it's what we deploy.


You still need to test if stable/9 fixes your issue though as otherwise
you don't know if the issue your seeing has already been fixed, and if
its the old know ZFS vfs hang on shutdown, it has.

   Regards
   Steve


This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 


In the event of misdirection, illegible or incomplete transmission please 
telephone +44 845 868 1337
or return the E.mail to postmas...@multiplay.co.uk.

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


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Adam Strohl

On 6/19/2013 20:35, Jeremy Chadwick wrote:


Nope, I see basically the same thing sometimes under ESXi 5.0
Hypervisor (and yes it worries me the implications of something so
broad).  Those unites I just haven't been able to isolate on a
server which isn't critical.  Lets focus on this server for now
though per your suggestion below.


I'm sorry but I don't understand your first sentence -- the first part
of your sentence says "nope" (I have to assume in reply to my "on bare
metal" part), but then says "I see basically the same thing sometimes
under ESXi" which implies an alternate environment in comparison (i.e.
we *are* talking about bare metal).  Consider me confused.  :-)


Basically: The issue is extremely similar if not the same root cause, be 
it a native or virtual server.  This server though is native.





2. We need to know what version of "9.1" you're using, i.e. 9.1-RELEASE.
If you use stable/9 (RELENG_9) we need to see uname -a output (you can
hide the machine name if you want).


Sorry, this ZFS box is 9.1-R P4 (kernel built today):

FreeBSD ilos.dsn 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #6: Wed Jun
19 15:31:12 ICT 2013
root@hostname:/usr/obj/usr/src/sys/ATEAMSYSTEMS  amd64


I suggest trying stable/9 (and staying with it, for that matter).


The issue is no binary updates and we have a large deploy base, so we've 
stuck with -R and use it internally because it's what we deploy.





3. Can we please have dmesg from this machine?  The controller and some
other hardware details matter.


Sure take a look at the full log here: http://pastebin.com/k55gVVuU

This includes a boot, then a reboot as I describe (you can see it
logs the All Buffers Synced, etc) then powering back on.


Thanks.  I was mainly interested in the storage controller being used
(in this case ahci(4)) and the disks being used (notorious ST3000DM001,
known for excessively parking heads).


Yeah, was not my first choice but then again ... RAIDZ-2 :)  HD supply 
chain here (Thailand) is weird considering how many are made here (and 
can't buy).  Smartd screams about them possibly needing a firmware 
update (they don't according to Seagate).   Had no issues aside from a 
failure a month or so again (it's an HD ... it happens).



AFAIK this isn't one of the
controllers that was known for weird "quirky issues" pertaining to
flushing data to disk on shutdown.

I have to ask: is this FreeBSD box running under a HV?


No, native/direct for sure on this one.



If it *is not* running under a HV, could we please get exact motherboard
model and version (including BIOS version)?  Sometimes (not always) you
can get this from "kenv | grep smbios."


No problem I built this one personally:

Asus P8B-X BIOS revision 6103




I can also see you're running your own kernel.  We'll get to that in a
moment.


It's GENERIC with the following added to the end:

# -- Add Support for nicer console
#
options VESA
options SC_PIXEL_MODE

# -- PF Support
#
device pf
device pflog
device pfsync

# -- Core temperature reporting
#
device  coretemp # For Intel CPUs

device  smbios




4. Does "sysctl hw.usb.no_shutdown_wait=1" help you?


Weirdly this allowed it to reboot on the first try (without needing
to be reset), but not the second.


I'm not surprised.  Pleas re-try with stable/9; Hans has been constantly
working on the USB stack and fixing major bugs.


Got it but probably not going to go this route as it means no more 
binary upgrades.  While I can reboot it, it is the office NAS here and 
so 'testing out' -STABLE I think probably isn't going to happen.





The "Starting background file
system checks in 60 seconds" message appeared ... that only happens
when something is dirty, right?


No it does not.  That message is always printed when you use background
fsck, which is the default.


Got it.



I do not advocate using background fsck, because it has been known (and
may still do this -- I do not care to find out, I do not have time for
unreliable filesystem nonsense) to not always fix all filesystem
problems.  Meaning: people using background fsck have been known to boot
into single-user and issue "fsck" manually and find issues.

Place background_fsck="no" in /etc/rc.conf.  If the machine does not
have a clean filesystem on boot-up, you'll know because the system will
immediately begin fsck (in the foreground actively).  You'll recognise
that output if it happens, trust me.


Preaching to the choir, we set this on all servers this one somehow did 
not have it set (I think due to ZFS making it unique and not copying our 
rc.conf template over properly).





So the second try with just this I could ctrl alt del it and it
responded .. kind of:
http://i.imgur.com/POAIaNg.jpg

Still had to reset it though.


This looks like a c

Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Steven Hartland
- Original Message - 
From: "Ronald Klop" 



On Wed, 19 Jun 2013 14:53:19 +0200, Adam Strohl  
 wrote:



On 6/19/2013 19:21, Jeremy Chadwick wrote:

On Wed, Jun 19, 2013 at 06:35:57PM +0700, Adam Strohl wrote:

Hello -STABLE@,

So I've seen this situation seemingly randomly on a number of both
physical 9.1 boxes as well as VMs for I would say 6-9 months at
least.  I finally have a physical box here that reproduces it
consistently that I can reboot easily (ie; not a production/client
server).


Hi,

My home computer had the same symptom (not rebooting after 'all buffers  
flushed' message) a couple of months ago. But I follow 9-STABLE and the  
problem is gone for a while now.


avg@ did a lot of work on the ZFS vfs locking which fixed at least one
hang on reboot for ZFS. I don't believe this is in 9.1-RELEASE, so you
should test a stable/9 or 8.4-RELEASE (which is newer than 9.1-RELEASE)
kernel.

   Regards
   Steve


This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 


In the event of misdirection, illegible or incomplete transmission please 
telephone +44 845 868 1337
or return the E.mail to postmas...@multiplay.co.uk.

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


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Jeremy Chadwick
On Wed, Jun 19, 2013 at 07:53:19PM +0700, Adam Strohl wrote:
> On 6/19/2013 19:21, Jeremy Chadwick wrote:
> >On Wed, Jun 19, 2013 at 06:35:57PM +0700, Adam Strohl wrote:
> >>Hello -STABLE@,
> >>
> >>So I've seen this situation seemingly randomly on a number of both
> >>physical 9.1 boxes as well as VMs for I would say 6-9 months at
> >>least.  I finally have a physical box here that reproduces it
> >>consistently that I can reboot easily (ie; not a production/client
> >>server).
> >>
> >>No matter what I do:
> >>
> >>reboot
> >>shutdown -p
> >>shutdown -r
> >>
> >>This specific server will stop at "All buffers synced" and not
> >>actually power down or reboot.  KB input seems to be ignored.  This
> >>server is a ZFS NAS (with GMIRROR for boot blocks) but the other
> >>boxes which show this are using GMIRRORs for root/swap/boot (no
> >>ZFS).
> >>
> >>Here is what happens on the console: http://i.imgur.com/1H8JMyB.jpg
> >>
> >>When I reset the server it appears that disks were not dismounted
> >>cleanly ... on this ZFS box it comes back quick because ZFS is good
> >>like that but on the other servers with GMIRROR roots rebuilding the
> >>GMIRROR and fscking at the same time is murder on the
> >>disk/performance until it finishes.
> >
> >1. You mention "as well as VMs".  Anything under a "virtual machine" or
> >under a hypervisor is going to be very, very, **VERY** different than
> >bare metal.  So I hope the issues you're talking about above are on bare
> >metal -- I will assume so.
> 
> Nope, I see basically the same thing sometimes under ESXi 5.0
> Hypervisor (and yes it worries me the implications of something so
> broad).  Those unites I just haven't been able to isolate on a
> server which isn't critical.  Lets focus on this server for now
> though per your suggestion below.

I'm sorry but I don't understand your first sentence -- the first part
of your sentence says "nope" (I have to assume in reply to my "on bare
metal" part), but then says "I see basically the same thing sometimes
under ESXi" which implies an alternate environment in comparison (i.e.
we *are* talking about bare metal).  Consider me confused.  :-)

> >2. We need to know what version of "9.1" you're using, i.e. 9.1-RELEASE.
> >If you use stable/9 (RELENG_9) we need to see uname -a output (you can
> >hide the machine name if you want).
> 
> Sorry, this ZFS box is 9.1-R P4 (kernel built today):
> 
> FreeBSD ilos.dsn 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #6: Wed Jun
> 19 15:31:12 ICT 2013
> root@hostname:/usr/obj/usr/src/sys/ATEAMSYSTEMS  amd64

I suggest trying stable/9 (and staying with it, for that matter).

> >3. Can we please have dmesg from this machine?  The controller and some
> >other hardware details matter.
> 
> Sure take a look at the full log here: http://pastebin.com/k55gVVuU
> 
> This includes a boot, then a reboot as I describe (you can see it
> logs the All Buffers Synced, etc) then powering back on.

Thanks.  I was mainly interested in the storage controller being used
(in this case ahci(4)) and the disks being used (notorious ST3000DM001,
known for excessively parking heads).  AFAIK this isn't one of the
controllers that was known for weird "quirky issues" pertaining to
flushing data to disk on shutdown.

I have to ask: is this FreeBSD box running under a HV?

If it *is not* running under a HV, could we please get exact motherboard
model and version (including BIOS version)?  Sometimes (not always) you
can get this from "kenv | grep smbios."

I can also see you're running your own kernel.  We'll get to that in a
moment.

> >4. Does "sysctl hw.usb.no_shutdown_wait=1" help you?
> 
> Weirdly this allowed it to reboot on the first try (without needing
> to be reset), but not the second.

I'm not surprised.  Pleas re-try with stable/9; Hans has been constantly
working on the USB stack and fixing major bugs.

> The "Starting background file
> system checks in 60 seconds" message appeared ... that only happens
> when something is dirty, right?

No it does not.  That message is always printed when you use background
fsck, which is the default.

I do not advocate using background fsck, because it has been known (and
may still do this -- I do not care to find out, I do not have time for
unreliable filesystem nonsense) to not always fix all filesystem
problems.  Meaning: people using background fsck have been known to boot
into single-user and issue "fsck" manually and find iss

Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Ronald Klop
On Wed, 19 Jun 2013 14:53:19 +0200, Adam Strohl  
 wrote:



On 6/19/2013 19:21, Jeremy Chadwick wrote:

On Wed, Jun 19, 2013 at 06:35:57PM +0700, Adam Strohl wrote:

Hello -STABLE@,

So I've seen this situation seemingly randomly on a number of both
physical 9.1 boxes as well as VMs for I would say 6-9 months at
least.  I finally have a physical box here that reproduces it
consistently that I can reboot easily (ie; not a production/client
server).


Hi,

My home computer had the same symptom (not rebooting after 'all buffers  
flushed' message) a couple of months ago. But I follow 9-STABLE and the  
problem is gone for a while now.


Ronald.



No matter what I do:

reboot
shutdown -p
shutdown -r

This specific server will stop at "All buffers synced" and not
actually power down or reboot.  KB input seems to be ignored.  This
server is a ZFS NAS (with GMIRROR for boot blocks) but the other
boxes which show this are using GMIRRORs for root/swap/boot (no
ZFS).

Here is what happens on the console: http://i.imgur.com/1H8JMyB.jpg

When I reset the server it appears that disks were not dismounted
cleanly ... on this ZFS box it comes back quick because ZFS is good
like that but on the other servers with GMIRROR roots rebuilding the
GMIRROR and fscking at the same time is murder on the
disk/performance until it finishes.


1. You mention "as well as VMs".  Anything under a "virtual machine" or
under a hypervisor is going to be very, very, **VERY** different than
bare metal.  So I hope the issues you're talking about above are on bare
metal -- I will assume so.


Nope, I see basically the same thing sometimes under ESXi 5.0 Hypervisor  
(and yes it worries me the implications of something so broad).  Those  
unites I just haven't been able to isolate on a server which isn't  
critical.  Lets focus on this server for now though per your suggestion  
below.




2. We need to know what version of "9.1" you're using, i.e. 9.1-RELEASE.
If you use stable/9 (RELENG_9) we need to see uname -a output (you can
hide the machine name if you want).


Sorry, this ZFS box is 9.1-R P4 (kernel built today):

FreeBSD ilos.dsn 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #6: Wed Jun 19  
15:31:12 ICT 2013 root@hostname:/usr/obj/usr/src/sys/ATEAMSYSTEMS   
amd64




3. Can we please have dmesg from this machine?  The controller and some
other hardware details matter.


Sure take a look at the full log here: http://pastebin.com/k55gVVuU

This includes a boot, then a reboot as I describe (you can see it logs  
the All Buffers Synced, etc) then powering back on.




4. Does "sysctl hw.usb.no_shutdown_wait=1" help you?


Weirdly this allowed it to reboot on the first try (without needing to  
be reset), but not the second.  The "Starting background file system  
checks in 60 seconds" message appeared ... that only happens when  
something is dirty, right?


So the second try with just this I could ctrl alt del it and it  
responded .. kind of:

http://i.imgur.com/POAIaNg.jpg

Still had to reset it though.



5. Does "sysctl hw.acpi.handle_reboot=1" help you?


No change, still responded to a ctrl alt del like above, but like that  
still needs to be reset and comes back dirty.




6. Does "sysctl hw.acpi.disable_on_reboot=1" help you?


No change.  Same as above, ctrl alt del responds but needs a hard reset  
still.




7. If none of the above helps, can you please boot verbose mode and then
when the system "locks up" on "shutdown -r now" take a picture of the
VGA console?


Lots of debug on boot obviously but not much different on shutdown/hang:
http://i.imgur.com/SgzSsoP.jpg



8. Does the machine run moused(8) (check the process list please, do not
rely on rc.conf) ?


ps -auxww | grep moused reveals nothing running (which is how I have  
things set).





Another interesting thing is that this particular server runs slapd
(OpenLDAP) which, when it comes back up, has a "corrupted" DB
(easily fixed with db_recover, but still).  This might be because FS
commits aren't happening at the end.   I can even manually stop
slapd (service slapd stop) then run sync(8) (I assume this does
something for ZFS too) and it still comes back as hosed if I reboot
shortly after.  If I start/stop slapd it's fine.  So I feel like
there is an FS/dismount thing going on here.


sync(8) does not do what you think it does.  Please read (not skim) this
entire thread starting here:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-April/thread.html#16982
http://lists.freebsd.org/pipermail/freebsd-fs/2013-April/016982.html


Groking this now ..



Your problem is related to unclean shutdown; fix that and your issues go
away.


Yeah that is my feeling as well.




Additional information: I also have some boxes which will reboot
(ie; they don't freeze like some do at the end) but they don't
dismount cle

Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Adam Strohl

On 6/19/2013 19:53, Adam Strohl wrote:

sync(8) does not do what you think it does.  Please read (not skim) this
entire thread starting here:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-April/thread.html#16982

http://lists.freebsd.org/pipermail/freebsd-fs/2013-April/016982.html


Groking this now ..



Epic.  So basically "mount -u -o ro " is really what I (and probably 
everyone else) wants and the man page needs a major overhaul + 
disclaimer (and possibly a recommendation to use "mount -u -o ro " 
instead).



--
Adam Strohl
http://www.ateamsystems.com/
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Adam Strohl

On 6/19/2013 19:21, Jeremy Chadwick wrote:

On Wed, Jun 19, 2013 at 06:35:57PM +0700, Adam Strohl wrote:

Hello -STABLE@,

So I've seen this situation seemingly randomly on a number of both
physical 9.1 boxes as well as VMs for I would say 6-9 months at
least.  I finally have a physical box here that reproduces it
consistently that I can reboot easily (ie; not a production/client
server).

No matter what I do:

reboot
shutdown -p
shutdown -r

This specific server will stop at "All buffers synced" and not
actually power down or reboot.  KB input seems to be ignored.  This
server is a ZFS NAS (with GMIRROR for boot blocks) but the other
boxes which show this are using GMIRRORs for root/swap/boot (no
ZFS).

Here is what happens on the console: http://i.imgur.com/1H8JMyB.jpg

When I reset the server it appears that disks were not dismounted
cleanly ... on this ZFS box it comes back quick because ZFS is good
like that but on the other servers with GMIRROR roots rebuilding the
GMIRROR and fscking at the same time is murder on the
disk/performance until it finishes.


1. You mention "as well as VMs".  Anything under a "virtual machine" or
under a hypervisor is going to be very, very, **VERY** different than
bare metal.  So I hope the issues you're talking about above are on bare
metal -- I will assume so.


Nope, I see basically the same thing sometimes under ESXi 5.0 Hypervisor 
(and yes it worries me the implications of something so broad).  Those 
unites I just haven't been able to isolate on a server which isn't 
critical.  Lets focus on this server for now though per your suggestion 
below.




2. We need to know what version of "9.1" you're using, i.e. 9.1-RELEASE.
If you use stable/9 (RELENG_9) we need to see uname -a output (you can
hide the machine name if you want).


Sorry, this ZFS box is 9.1-R P4 (kernel built today):

FreeBSD ilos.dsn 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #6: Wed Jun 19 
15:31:12 ICT 2013 root@hostname:/usr/obj/usr/src/sys/ATEAMSYSTEMS  amd64




3. Can we please have dmesg from this machine?  The controller and some
other hardware details matter.


Sure take a look at the full log here: http://pastebin.com/k55gVVuU

This includes a boot, then a reboot as I describe (you can see it logs 
the All Buffers Synced, etc) then powering back on.




4. Does "sysctl hw.usb.no_shutdown_wait=1" help you?


Weirdly this allowed it to reboot on the first try (without needing to 
be reset), but not the second.  The "Starting background file system 
checks in 60 seconds" message appeared ... that only happens when 
something is dirty, right?


So the second try with just this I could ctrl alt del it and it 
responded .. kind of:

http://i.imgur.com/POAIaNg.jpg

Still had to reset it though.



5. Does "sysctl hw.acpi.handle_reboot=1" help you?


No change, still responded to a ctrl alt del like above, but like that 
still needs to be reset and comes back dirty.




6. Does "sysctl hw.acpi.disable_on_reboot=1" help you?


No change.  Same as above, ctrl alt del responds but needs a hard reset 
still.




7. If none of the above helps, can you please boot verbose mode and then
when the system "locks up" on "shutdown -r now" take a picture of the
VGA console?


Lots of debug on boot obviously but not much different on shutdown/hang:
http://i.imgur.com/SgzSsoP.jpg



8. Does the machine run moused(8) (check the process list please, do not
rely on rc.conf) ?


ps -auxww | grep moused reveals nothing running (which is how I have 
things set).





Another interesting thing is that this particular server runs slapd
(OpenLDAP) which, when it comes back up, has a "corrupted" DB
(easily fixed with db_recover, but still).  This might be because FS
commits aren't happening at the end.   I can even manually stop
slapd (service slapd stop) then run sync(8) (I assume this does
something for ZFS too) and it still comes back as hosed if I reboot
shortly after.  If I start/stop slapd it's fine.  So I feel like
there is an FS/dismount thing going on here.


sync(8) does not do what you think it does.  Please read (not skim) this
entire thread starting here:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-April/thread.html#16982
http://lists.freebsd.org/pipermail/freebsd-fs/2013-April/016982.html


Groking this now ..



Your problem is related to unclean shutdown; fix that and your issues go
away.


Yeah that is my feeling as well.




Additional information: I also have some boxes which will reboot
(ie; they don't freeze like some do at the end) but they don't
dismount cleanly either and have to rebuild both GMIRROR and fsck.
This might be a different issue, too.


Every issue needs to be handled/treated separately.


Sure, I just had run across some threads about that but will focus on 
this ZFS box (and see 

Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Steven Hartland

OS version?
- Original Message - 
From: "Adam Strohl" 

To: 
Sent: Wednesday, June 19, 2013 12:35 PM
Subject: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount



Hello -STABLE@,

So I've seen this situation seemingly randomly on a number of both 
physical 9.1 boxes as well as VMs for I would say 6-9 months at least. 
 I finally have a physical box here that reproduces it consistently 
that I can reboot easily (ie; not a production/client server).


No matter what I do:

reboot
shutdown -p
shutdown -r

This specific server will stop at "All buffers synced" and not actually 
power down or reboot.  KB input seems to be ignored.  This server is a 
ZFS NAS (with GMIRROR for boot blocks) but the other boxes which show 
this are using GMIRRORs for root/swap/boot (no ZFS).


Here is what happens on the console: http://i.imgur.com/1H8JMyB.jpg

When I reset the server it appears that disks were not dismounted 
cleanly ... on this ZFS box it comes back quick because ZFS is good like 
that but on the other servers with GMIRROR roots rebuilding the GMIRROR 
and fscking at the same time is murder on the disk/performance until it 
finishes.


Another interesting thing is that this particular server runs slapd 
(OpenLDAP) which, when it comes back up, has a "corrupted" DB (easily 
fixed with db_recover, but still).  This might be because FS commits 
aren't happening at the end.   I can even manually stop slapd (service 
slapd stop) then run sync(8) (I assume this does something for ZFS too) 
and it still comes back as hosed if I reboot shortly after.  If I 
start/stop slapd it's fine.  So I feel like there is an FS/dismount 
thing going on here.


Additional information: I also have some boxes which will reboot (ie; 
they don't freeze like some do at the end) but they don't dismount 
cleanly either and have to rebuild both GMIRROR and fsck.  This might be 
a different issue, too.


Anyone have any thoughts?  Let me know if I can provide more details etc.

--
Adam Strohl
http://www.ateamsystems.com/
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"




This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 


In the event of misdirection, illegible or incomplete transmission please 
telephone +44 845 868 1337
or return the E.mail to postmas...@multiplay.co.uk.

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


Re: shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Jeremy Chadwick
On Wed, Jun 19, 2013 at 06:35:57PM +0700, Adam Strohl wrote:
> Hello -STABLE@,
> 
> So I've seen this situation seemingly randomly on a number of both
> physical 9.1 boxes as well as VMs for I would say 6-9 months at
> least.  I finally have a physical box here that reproduces it
> consistently that I can reboot easily (ie; not a production/client
> server).
> 
> No matter what I do:
> 
> reboot
> shutdown -p
> shutdown -r
> 
> This specific server will stop at "All buffers synced" and not
> actually power down or reboot.  KB input seems to be ignored.  This
> server is a ZFS NAS (with GMIRROR for boot blocks) but the other
> boxes which show this are using GMIRRORs for root/swap/boot (no
> ZFS).
> 
> Here is what happens on the console: http://i.imgur.com/1H8JMyB.jpg
> 
> When I reset the server it appears that disks were not dismounted
> cleanly ... on this ZFS box it comes back quick because ZFS is good
> like that but on the other servers with GMIRROR roots rebuilding the
> GMIRROR and fscking at the same time is murder on the
> disk/performance until it finishes.

1. You mention "as well as VMs".  Anything under a "virtual machine" or
under a hypervisor is going to be very, very, **VERY** different than
bare metal.  So I hope the issues you're talking about above are on bare
metal -- I will assume so.

2. We need to know what version of "9.1" you're using, i.e. 9.1-RELEASE.
If you use stable/9 (RELENG_9) we need to see uname -a output (you can
hide the machine name if you want).

3. Can we please have dmesg from this machine?  The controller and some
other hardware details matter.

4. Does "sysctl hw.usb.no_shutdown_wait=1" help you?

5. Does "sysctl hw.acpi.handle_reboot=1" help you?

6. Does "sysctl hw.acpi.disable_on_reboot=1" help you?

7. If none of the above helps, can you please boot verbose mode and then
when the system "locks up" on "shutdown -r now" take a picture of the
VGA console?

8. Does the machine run moused(8) (check the process list please, do not
rely on rc.conf) ?

> Another interesting thing is that this particular server runs slapd
> (OpenLDAP) which, when it comes back up, has a "corrupted" DB
> (easily fixed with db_recover, but still).  This might be because FS
> commits aren't happening at the end.   I can even manually stop
> slapd (service slapd stop) then run sync(8) (I assume this does
> something for ZFS too) and it still comes back as hosed if I reboot
> shortly after.  If I start/stop slapd it's fine.  So I feel like
> there is an FS/dismount thing going on here.

sync(8) does not do what you think it does.  Please read (not skim) this
entire thread starting here:

http://lists.freebsd.org/pipermail/freebsd-fs/2013-April/thread.html#16982
http://lists.freebsd.org/pipermail/freebsd-fs/2013-April/016982.html

Your problem is related to unclean shutdown; fix that and your issues go
away.

> Additional information: I also have some boxes which will reboot
> (ie; they don't freeze like some do at the end) but they don't
> dismount cleanly either and have to rebuild both GMIRROR and fsck.
> This might be a different issue, too.

Every issue needs to be handled/treated separately.

-- 
| Jeremy Chadwick   j...@koitsu.org |
| UNIX Systems Administratorhttp://jdc.koitsu.org/ |
| Making life hard for others since 1977. PGP 4BD6C0CB |

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


shutdown -r / shutdown -h / reboot all hang and don't cleanly dismount

2013-06-19 Thread Adam Strohl

Hello -STABLE@,

So I've seen this situation seemingly randomly on a number of both 
physical 9.1 boxes as well as VMs for I would say 6-9 months at least. 
 I finally have a physical box here that reproduces it consistently 
that I can reboot easily (ie; not a production/client server).


No matter what I do:

reboot
shutdown -p
shutdown -r

This specific server will stop at "All buffers synced" and not actually 
power down or reboot.  KB input seems to be ignored.  This server is a 
ZFS NAS (with GMIRROR for boot blocks) but the other boxes which show 
this are using GMIRRORs for root/swap/boot (no ZFS).


Here is what happens on the console: http://i.imgur.com/1H8JMyB.jpg

When I reset the server it appears that disks were not dismounted 
cleanly ... on this ZFS box it comes back quick because ZFS is good like 
that but on the other servers with GMIRROR roots rebuilding the GMIRROR 
and fscking at the same time is murder on the disk/performance until it 
finishes.


Another interesting thing is that this particular server runs slapd 
(OpenLDAP) which, when it comes back up, has a "corrupted" DB (easily 
fixed with db_recover, but still).  This might be because FS commits 
aren't happening at the end.   I can even manually stop slapd (service 
slapd stop) then run sync(8) (I assume this does something for ZFS too) 
and it still comes back as hosed if I reboot shortly after.  If I 
start/stop slapd it's fine.  So I feel like there is an FS/dismount 
thing going on here.


Additional information: I also have some boxes which will reboot (ie; 
they don't freeze like some do at the end) but they don't dismount 
cleanly either and have to rebuild both GMIRROR and fsck.  This might be 
a different issue, too.


Anyone have any thoughts?  Let me know if I can provide more details etc.

--
Adam Strohl
http://www.ateamsystems.com/
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-18 Thread Jeremy Chadwick
On Wed, Jun 19, 2013 at 01:41:10AM +0430, Javad Kouhi wrote:
> I've read the posts again. Although the issue looks same as Michiel
> Boland (first link) but I'm not sure if the root of the issue is same
> as Michiel's too (second link). Anyway, it should be discussed in
> another thread as you said.

Let me be more clear:

I have seen repeated reports from people complaining about "lockups when
shutting down" many times over the years.  The ones I remember:

- Certain oddities with SCSI/SATA storage drivers and disks (many of
  these have been fixed)
- ACPI-based reboot not working correctly on some motherboards
  (depends on hw.acpi.handle_reboot and sometimes
  hw.acpi.disable_on_reboot) -- not sure if this still pops up
- USB layer causing issues, or possibly some USB CAM integration
  problem (this is still an ongoing one)
- Now some sort of weird Intel graphics driver (and DRM?) quirk
  involving moused(8) and Vsync (the issue reported by Michiel)

And I'm certain I'm forgetting others.

What Kevin Oberman said also applies -- these are painful to debug
because the system is already in a "shutting down" state where usability
and accessibility becomes bare minimal, and you're kind of at your
wits end.

Booting verbose can help -- there are other messages printed to the VGA
(and/or serial) console during the shutdown phase when verbose.

All you can hope for is that the kernel is still alive and Ctrl-Alt-Esc
to force a drop to DDB (assuming all of this is enabled in your kernel)
works and that someone familiar with the FreeBSD kernel can help you
debug it (possibly it's just easier to do that, type "panic", then
issue "call doadump" to force a dump to swap at that point -- kib@
might have better recommendations).

Serial console can also greatly help, because quite often there are
pages upon pages of debugging information that are useful, otherwise you
have to hope the VGA console keyboard is functional (even more tricky
with USB) and that Scroll Lock + Page Up/Down function along with taking
photos of the screen; doing it this way is stressful and painful for
everyone involved.

I hope this sheds some light on why I said what I did.  :-)

-- 
| Jeremy Chadwick   j...@koitsu.org |
| UNIX Systems Administratorhttp://jdc.koitsu.org/ |
| Making life hard for others since 1977. PGP 4BD6C0CB |

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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-18 Thread Javad Kouhi
I've read the posts again. Although the issue looks same as Michiel
Boland (first link) but I'm not sure if the root of the issue is same
as Michiel's too (second link). Anyway, it should be discussed in
another thread as you said.

> Second, the patch is not mine -- it's Konstantin's.  I did not write the
> code/fix, nor do I understand it.  All I did was provide a version of
> the same patch that applied cleanly on recent stable/9.  (I'm sorry for
> needing to state this, but clear ownership of code/issues is important.)

That's understandable, thank you both. I didn't mean it that way.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-18 Thread Jeremy Chadwick
On Tue, Jun 18, 2013 at 10:37:10PM +0430, Javad Kouhi wrote:
> On Tue, Jun 18, 2013 at 7:17 PM, Jeremy Chadwick  wrote:
> >
> > I do not use git, I use svn, So I cannot help you with git "crap".
> >
> > Please revert your sys/dev/drm2/i915/intel_fb.c and
> > sys/dev/syscons/scvgarndr.c back to r251934 (or newer) before following
> > what I tell you below.
> >
> > The problem is either that:
> >
> > - The patch you were given is probably for a different FreeBSD release,
> >   thus the code/line numbers/info in the code break the fuzzy logic
> >   matching,
> > - You copy-pasted the diff and because of tabs vs. spaces botched it,
> > - git apply/patch/whatever is weird,
> > - Multitudes of other possibilities I do not care to go into.
> >
> > The hack kib@ gave you is not hard to manually add yourself.  It's very
> > few lines of code.  I'm very surprised you didn't try to manually add it
> > yourself.  So I have done that for you.  First, the proof -- this is
> > against r251939, by the way, but that shouldn't matter as nobody has
> > touched this between r251934 and r251939:
> >
> > $ svn info
> > Path: .
> > Working Copy Root Path: /home/jdc/work/src
> > URL: svn://svn.freebsd.org/base/stable/9
> > Repository Root: svn://svn.freebsd.org/base
> > Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
> > Revision: 251939
> > Node Kind: directory
> > Schedule: normal
> > Last Changed Author: marius
> > Last Changed Rev: 251939
> > Last Changed Date: 2013-06-18 07:20:14 -0700 (Tue, 18 Jun 2013)
> >
> > $ svn status
> > M   sys/dev/drm2/i915/intel_fb.c
> > M   sys/dev/syscons/scvgarndr.c
> >
> > The diff itself is available here:
> >
> > http://jdc.koitsu.org/freebsd/sysmouse_vsync.diff
> >
> > I've also attached it here in Email (assuming the mailing list doesn't
> > delete it).
> >
> > You should apply the patch using:
> >
> >   cd /usr/src  (or wherever your source is)
> >   patch -p0 < sysmouse_vsync.diff
> >
> > Assuming use of svn, you can revert this patch by doing:
> >
> >   cd /usr/src  (or wherever your source is)
> >   svn revert sys/dev/drm2/i915/intel_fb.c
> >   svn revert sys/dev/syscons/scvgarndr.c
> >   rm sys/dev/drm2/i915/intel_fb.c.orig
> >   rm sys/dev/syscons/scvgarndr.c.orig
> >
> > There is probably some other "magical" way to do all of this, but as
> > anyone here knows, I do things manually because in general I do not
> > trust VCSes or the "magic" they do under the hood; I prefer to do things
> > that I know work.
> >
> > Good luck -- I cannot help with any other aspect to the issue.
> >
> > --
> > | Jeremy Chadwick   j...@koitsu.org |
> > | UNIX Systems Administratorhttp://jdc.koitsu.org/ |
> > | Making life hard for others since 1977. PGP 4BD6C0CB |
> >
> 
> Many thanks for the detailed answer. I've applied your patch and then
> rebuilt the world and kernel. To be honest, I tried to apply the patch
> manually but the syntax was too complex for me. Thanks for the help to
> apply the patch.
> 
> Unfortunately, the original issue is still exist and shutdown(8)
> doesn't work properly. I'm a newbie and I don't know what informations
> I should provide, but here is some basic information:
> 
> % uname -a
> FreeBSD minootux 9.1-STABLE FreeBSD 9.1-STABLE #0 r251946M: Tue Jun 18
> 21:16:56 IRDT 2013 root@minootux:/usr/obj/usr/src/sys/GIGABYTE
> amd64
> 
> % pkg_info -I -x xorg-server -x drm
> libdrm-2.4.44   Userspace interface to kernel Direct Rendering Module 
> servi
> xorg-server-1.12.4,1 X.Org X server and related programs
> 
> The machine is a laptop and the following link contains the details
> about the hardware:
> http://www.gigabyte.com/products/product-page.aspx?pid=3793#sp
> 
> KMS and NEW_XORG are enabled in my /etc/make.conf.

First, what makes you think your issue is the same issue as reported by
Michiel Boland?  Let me point you to two of his posts (read them slowly
and in full please):

http://lists.freebsd.org/pipermail/freebsd-stable/2013-June/073821.html

http://lists.freebsd.org/pipermail/freebsd-stable/2013-June/073839.html

Second, the patch is not mine -- it's Konstantin's.  I did not write the
code/fix, nor do I understand it.  All I did was provide a version of
the same patch that applied cleanly on recent stable/9.  (I'm sorry for
needing to state this, but c

Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-18 Thread Javad Kouhi
On Tue, Jun 18, 2013 at 7:17 PM, Jeremy Chadwick  wrote:
>
> I do not use git, I use svn, So I cannot help you with git "crap".
>
> Please revert your sys/dev/drm2/i915/intel_fb.c and
> sys/dev/syscons/scvgarndr.c back to r251934 (or newer) before following
> what I tell you below.
>
> The problem is either that:
>
> - The patch you were given is probably for a different FreeBSD release,
>   thus the code/line numbers/info in the code break the fuzzy logic
>   matching,
> - You copy-pasted the diff and because of tabs vs. spaces botched it,
> - git apply/patch/whatever is weird,
> - Multitudes of other possibilities I do not care to go into.
>
> The hack kib@ gave you is not hard to manually add yourself.  It's very
> few lines of code.  I'm very surprised you didn't try to manually add it
> yourself.  So I have done that for you.  First, the proof -- this is
> against r251939, by the way, but that shouldn't matter as nobody has
> touched this between r251934 and r251939:
>
> $ svn info
> Path: .
> Working Copy Root Path: /home/jdc/work/src
> URL: svn://svn.freebsd.org/base/stable/9
> Repository Root: svn://svn.freebsd.org/base
> Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
> Revision: 251939
> Node Kind: directory
> Schedule: normal
> Last Changed Author: marius
> Last Changed Rev: 251939
> Last Changed Date: 2013-06-18 07:20:14 -0700 (Tue, 18 Jun 2013)
>
> $ svn status
> M   sys/dev/drm2/i915/intel_fb.c
> M   sys/dev/syscons/scvgarndr.c
>
> The diff itself is available here:
>
> http://jdc.koitsu.org/freebsd/sysmouse_vsync.diff
>
> I've also attached it here in Email (assuming the mailing list doesn't
> delete it).
>
> You should apply the patch using:
>
>   cd /usr/src  (or wherever your source is)
>   patch -p0 < sysmouse_vsync.diff
>
> Assuming use of svn, you can revert this patch by doing:
>
>   cd /usr/src  (or wherever your source is)
>   svn revert sys/dev/drm2/i915/intel_fb.c
>   svn revert sys/dev/syscons/scvgarndr.c
>   rm sys/dev/drm2/i915/intel_fb.c.orig
>   rm sys/dev/syscons/scvgarndr.c.orig
>
> There is probably some other "magical" way to do all of this, but as
> anyone here knows, I do things manually because in general I do not
> trust VCSes or the "magic" they do under the hood; I prefer to do things
> that I know work.
>
> Good luck -- I cannot help with any other aspect to the issue.
>
> --
> | Jeremy Chadwick   j...@koitsu.org |
> | UNIX Systems Administratorhttp://jdc.koitsu.org/ |
> | Making life hard for others since 1977. PGP 4BD6C0CB |
>

Many thanks for the detailed answer. I've applied your patch and then
rebuilt the world and kernel. To be honest, I tried to apply the patch
manually but the syntax was too complex for me. Thanks for the help to
apply the patch.

Unfortunately, the original issue is still exist and shutdown(8)
doesn't work properly. I'm a newbie and I don't know what informations
I should provide, but here is some basic information:

% uname -a
FreeBSD minootux 9.1-STABLE FreeBSD 9.1-STABLE #0 r251946M: Tue Jun 18
21:16:56 IRDT 2013 root@minootux:/usr/obj/usr/src/sys/GIGABYTE
amd64

% pkg_info -I -x xorg-server -x drm
libdrm-2.4.44   Userspace interface to kernel Direct Rendering Module servi
xorg-server-1.12.4,1 X.Org X server and related programs

The machine is a laptop and the following link contains the details
about the hardware:
http://www.gigabyte.com/products/product-page.aspx?pid=3793#sp

KMS and NEW_XORG are enabled in my /etc/make.conf.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-18 Thread Kevin Oberman
On Tue, Jun 18, 2013 at 7:47 AM, Jeremy Chadwick  wrote:

> On Tue, Jun 18, 2013 at 07:00:30PM +0430, Javad Kouhi wrote:
> > Thanks for the reply, seems that our source trees are not same, I got
> this:
> >
> > % patch -p1 < /path/to/patch
> > Hmm...  Looks like a unified diff to me...
> > The text leading up to this was:
> > --
> > |diff --git a/sys/dev/drm2/i915/intel_fb.c b/sys/dev/drm2/i915/intel_fb.c
> > |index 3cb3b78..e41a49f 100644
> > |--- a/sys/dev/drm2/i915/intel_fb.c
> > |+++ b/sys/dev/drm2/i915/intel_fb.c
> > --
> > Patching file sys/dev/drm2/i915/intel_fb.c using Plan A...
> > Hunk #1 succeeded at 207 with fuzz 1.
> > Hunk #2 failed at 231.
> > 1 out of 2 hunks failed--saving rejects to
> sys/dev/drm2/i915/intel_fb.c.rej
> > Hmm...  The next patch looks like a unified diff to me...
> > The text leading up to this was:
> > --
> > |diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c
> > |index 6e6663c..fc7f02f 100644
> > |--- a/sys/dev/syscons/scvgarndr.c
> > |+++ b/sys/dev/syscons/scvgarndr.c
> > --
> > Patching file sys/dev/syscons/scvgarndr.c using Plan A...
> > Hunk #1 succeeded at 395.
> > Hunk #2 failed at 447.
> > 1 out of 2 hunks failed--saving rejects to
> sys/dev/syscons/scvgarndr.c.rej
> > done
> >
> >
> > And the git way:
> >
> > % git apply /path/to/patch
> > error: patch failed: sys/dev/drm2/i915/intel_fb.c:207
> > error: sys/dev/drm2/i915/intel_fb.c: patch does not apply
> > error: patch failed: sys/dev/syscons/scvgarndr.c:445
> > error: sys/dev/syscons/scvgarndr.c: patch does not apply
> >
> >
> > I have revision 251934 of -STABLE branch. (I updated my source tree
> > about 3 hours ago using svn)
>
> I do not use git, I use svn, So I cannot help you with git "crap".
>
> Please revert your sys/dev/drm2/i915/intel_fb.c and
> sys/dev/syscons/scvgarndr.c back to r251934 (or newer) before following
> what I tell you below.
>
> The problem is either that:
>
> - The patch you were given is probably for a different FreeBSD release,
>   thus the code/line numbers/info in the code break the fuzzy logic
>   matching,
> - You copy-pasted the diff and because of tabs vs. spaces botched it,
> - git apply/patch/whatever is weird,
> - Multitudes of other possibilities I do not care to go into.
>
> The hack kib@ gave you is not hard to manually add yourself.  It's very
> few lines of code.  I'm very surprised you didn't try to manually add it
> yourself.  So I have done that for you.  First, the proof -- this is
> against r251939, by the way, but that shouldn't matter as nobody has
> touched this between r251934 and r251939:
>
> $ svn info
> Path: .
> Working Copy Root Path: /home/jdc/work/src
> URL: svn://svn.freebsd.org/base/stable/9
> Repository Root: svn://svn.freebsd.org/base
> Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
> Revision: 251939
> Node Kind: directory
> Schedule: normal
> Last Changed Author: marius
> Last Changed Rev: 251939
> Last Changed Date: 2013-06-18 07:20:14 -0700 (Tue, 18 Jun 2013)
>
> $ svn status
> M   sys/dev/drm2/i915/intel_fb.c
> M   sys/dev/syscons/scvgarndr.c
>
> The diff itself is available here:
>
> http://jdc.koitsu.org/freebsd/sysmouse_vsync.diff
>
> I've also attached it here in Email (assuming the mailing list doesn't
> delete it).
>
> You should apply the patch using:
>
>   cd /usr/src  (or wherever your source is)
>   patch -p0 < sysmouse_vsync.diff
>
> Assuming use of svn, you can revert this patch by doing:
>
>   cd /usr/src  (or wherever your source is)
>   svn revert sys/dev/drm2/i915/intel_fb.c
>   svn revert sys/dev/syscons/scvgarndr.c
>   rm sys/dev/drm2/i915/intel_fb.c.orig
>   rm sys/dev/syscons/scvgarndr.c.orig
>
> There is probably some other "magical" way to do all of this, but as
> anyone here knows, I do things manually because in general I do not
> trust VCSes or the "magic" they do under the hood; I prefer to do things
> that I know work.
>
> Good luck -- I cannot help with any other aspect to the issue.
>

After some testing, I now believe that there are two failure modes causing
hangs on shutdown on Intel_KMS systems. Data is mostly empirical, but it
looks pretty clear to me.

Failure 1: Shutdown proceeds through a significant portion of the shutdown
before hanging shortly before syncing disks. Shutdown has passed the point
of most userland capability, so no real access is available.

Failure2: 

Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-18 Thread Jeremy Chadwick
On Tue, Jun 18, 2013 at 07:00:30PM +0430, Javad Kouhi wrote:
> Thanks for the reply, seems that our source trees are not same, I got this:
> 
> % patch -p1 < /path/to/patch
> Hmm...  Looks like a unified diff to me...
> The text leading up to this was:
> --
> |diff --git a/sys/dev/drm2/i915/intel_fb.c b/sys/dev/drm2/i915/intel_fb.c
> |index 3cb3b78..e41a49f 100644
> |--- a/sys/dev/drm2/i915/intel_fb.c
> |+++ b/sys/dev/drm2/i915/intel_fb.c
> --
> Patching file sys/dev/drm2/i915/intel_fb.c using Plan A...
> Hunk #1 succeeded at 207 with fuzz 1.
> Hunk #2 failed at 231.
> 1 out of 2 hunks failed--saving rejects to sys/dev/drm2/i915/intel_fb.c.rej
> Hmm...  The next patch looks like a unified diff to me...
> The text leading up to this was:
> --
> |diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c
> |index 6e6663c..fc7f02f 100644
> |--- a/sys/dev/syscons/scvgarndr.c
> |+++ b/sys/dev/syscons/scvgarndr.c
> --
> Patching file sys/dev/syscons/scvgarndr.c using Plan A...
> Hunk #1 succeeded at 395.
> Hunk #2 failed at 447.
> 1 out of 2 hunks failed--saving rejects to sys/dev/syscons/scvgarndr.c.rej
> done
> 
> 
> And the git way:
> 
> % git apply /path/to/patch
> error: patch failed: sys/dev/drm2/i915/intel_fb.c:207
> error: sys/dev/drm2/i915/intel_fb.c: patch does not apply
> error: patch failed: sys/dev/syscons/scvgarndr.c:445
> error: sys/dev/syscons/scvgarndr.c: patch does not apply
> 
> 
> I have revision 251934 of -STABLE branch. (I updated my source tree
> about 3 hours ago using svn)

I do not use git, I use svn, So I cannot help you with git "crap".

Please revert your sys/dev/drm2/i915/intel_fb.c and
sys/dev/syscons/scvgarndr.c back to r251934 (or newer) before following
what I tell you below.

The problem is either that:

- The patch you were given is probably for a different FreeBSD release,
  thus the code/line numbers/info in the code break the fuzzy logic
  matching,
- You copy-pasted the diff and because of tabs vs. spaces botched it,
- git apply/patch/whatever is weird,
- Multitudes of other possibilities I do not care to go into.

The hack kib@ gave you is not hard to manually add yourself.  It's very
few lines of code.  I'm very surprised you didn't try to manually add it
yourself.  So I have done that for you.  First, the proof -- this is
against r251939, by the way, but that shouldn't matter as nobody has
touched this between r251934 and r251939:

$ svn info
Path: .
Working Copy Root Path: /home/jdc/work/src
URL: svn://svn.freebsd.org/base/stable/9
Repository Root: svn://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 251939
Node Kind: directory
Schedule: normal
Last Changed Author: marius
Last Changed Rev: 251939
Last Changed Date: 2013-06-18 07:20:14 -0700 (Tue, 18 Jun 2013)

$ svn status
M   sys/dev/drm2/i915/intel_fb.c
M   sys/dev/syscons/scvgarndr.c

The diff itself is available here:

http://jdc.koitsu.org/freebsd/sysmouse_vsync.diff

I've also attached it here in Email (assuming the mailing list doesn't
delete it).

You should apply the patch using:

  cd /usr/src  (or wherever your source is)
  patch -p0 < sysmouse_vsync.diff

Assuming use of svn, you can revert this patch by doing:

  cd /usr/src  (or wherever your source is)
  svn revert sys/dev/drm2/i915/intel_fb.c
  svn revert sys/dev/syscons/scvgarndr.c
  rm sys/dev/drm2/i915/intel_fb.c.orig
  rm sys/dev/syscons/scvgarndr.c.orig

There is probably some other "magical" way to do all of this, but as
anyone here knows, I do things manually because in general I do not
trust VCSes or the "magic" they do under the hood; I prefer to do things
that I know work.

Good luck -- I cannot help with any other aspect to the issue.

-- 
| Jeremy Chadwick   j...@koitsu.org |
| UNIX Systems Administratorhttp://jdc.koitsu.org/ |
| Making life hard for others since 1977. PGP 4BD6C0CB |

Index: sys/dev/drm2/i915/intel_fb.c
===
--- sys/dev/drm2/i915/intel_fb.c	(revision 251939)
+++ sys/dev/drm2/i915/intel_fb.c	(working copy)
@@ -207,6 +207,8 @@ static void intel_fbdev_destroy(struct drm_device
 	}
 }
 
+extern int sc_txtmouse_no_retrace_wait;
+
 int intel_fbdev_init(struct drm_device *dev)
 {
 	struct intel_fbdev *ifbdev;
@@ -229,6 +231,7 @@ int intel_fbdev_init(struct drm_device *dev)
 
 	drm_fb_helper_single_add_all_connectors(&ifbdev->helper);
 	drm_fb_helper_initial_config(&ifbdev->helper, 32);
+	sc_txtmouse_no_retrace_wait = 1;
 	return 0;
 }
 
Index: sys/dev/syscons/scvgarndr.c
===
--- sys/dev/syscons/scvgarndr.c	(revision 251939)
+++ sys/dev/syscons/scvgarndr.c	(working copy)
@@ -395,6 +395,8 @@ vga_txtblink(scr_stat *scp, int at, int flip)
 {
 }
 
+int sc_txtmouse_no_retrace_wait;
+
 #ifndef SC_NO_CUTP

Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-18 Thread Javad Kouhi
Thanks for the reply, seems that our source trees are not same, I got this:

% patch -p1 < /path/to/patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--
|diff --git a/sys/dev/drm2/i915/intel_fb.c b/sys/dev/drm2/i915/intel_fb.c
|index 3cb3b78..e41a49f 100644
|--- a/sys/dev/drm2/i915/intel_fb.c
|+++ b/sys/dev/drm2/i915/intel_fb.c
--
Patching file sys/dev/drm2/i915/intel_fb.c using Plan A...
Hunk #1 succeeded at 207 with fuzz 1.
Hunk #2 failed at 231.
1 out of 2 hunks failed--saving rejects to sys/dev/drm2/i915/intel_fb.c.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--
|diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c
|index 6e6663c..fc7f02f 100644
|--- a/sys/dev/syscons/scvgarndr.c
|+++ b/sys/dev/syscons/scvgarndr.c
--
Patching file sys/dev/syscons/scvgarndr.c using Plan A...
Hunk #1 succeeded at 395.
Hunk #2 failed at 447.
1 out of 2 hunks failed--saving rejects to sys/dev/syscons/scvgarndr.c.rej
done


And the git way:

% git apply /path/to/patch
error: patch failed: sys/dev/drm2/i915/intel_fb.c:207
error: sys/dev/drm2/i915/intel_fb.c: patch does not apply
error: patch failed: sys/dev/syscons/scvgarndr.c:445
error: sys/dev/syscons/scvgarndr.c: patch does not apply


I have revision 251934 of -STABLE branch. (I updated my source tree
about 3 hours ago using svn)
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-18 Thread Michiel Boland

On 06/18/2013 13:28, Javad Kouhi wrote:

Hi,

I have exactly the same problem. I've tried to apply the above patch
but it refused. I've checked out  the last revision (251934) of
-STABLE branch using Subversion.

% git apply --check patch
error: patch failed: sys/dev/drm2/i915/intel_fb.c:207
error: sys/dev/drm2/i915/intel_fb.c: patch does not apply
error: patch failed: sys/dev/syscons/scvgarndr.c:445
error: sys/dev/syscons/scvgarndr.c: patch does not apply

How can I apply this patch?


I think you want to lose the '--check' option here.

Cheers
Michiel

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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-18 Thread Javad Kouhi
Hi,

I have exactly the same problem. I've tried to apply the above patch
but it refused. I've checked out  the last revision (251934) of
-STABLE branch using Subversion.

% git apply --check patch
error: patch failed: sys/dev/drm2/i915/intel_fb.c:207
error: sys/dev/drm2/i915/intel_fb.c: patch does not apply
error: patch failed: sys/dev/syscons/scvgarndr.c:445
error: sys/dev/syscons/scvgarndr.c: patch does not apply

How can I apply this patch?
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-17 Thread Konstantin Belousov
On Mon, Jun 17, 2013 at 09:16:56PM +0200, Michiel Boland wrote:
> On 06/16/2013 17:11, Michiel Boland wrote:
> > Hi. Recently I switched to WITH_NEW_XORG, primarily because the stock X 
> > server
> > with Intel driver has some issues that make it unusable for me.
> >
> > The new X server and Intel driver works extremely well, so kudos to whoever 
> > made
> > this possible.
> >
> > Unfortunately, I am now experiencing random hangs on shutdown. On shutdown 
> > the
> > system randomly freezes after
> >
> > [...] syslogd: exiting on signal 15
> >
> > I would then expect to see 'Waiting (max 60 seconds) for system process 
> > 'XXX' to
> > stop messages, but these never arrive.
> 
> So it turns out that init hangs because vga_txtmouse (draw_txtmouse in fact) 
> is 
> hogging the clock swi. The routine is waiting for a vertical retrace which 
> never 
> arrives. (The new intel driver can't return to text console, so the screen 
> just 
> goes blank when X exits.)
> 
> Some workarounds:
> 
> - don't run moused (i.e. disable it in rc.conf and devd.conf)
>instead run the X server in combination with hald
> 
> - do run moused, but then either
> 
>   - unplug the mouse before shutting down
> 
>- build a kernel with VGA_NO_FONT_LOADING
> 
> Of course the long-term fix is to remove the possibly infinite loop in 
> draw_txtmouse.
> 
> Thanks to Konstantin for his patience in helping me track this down.

The following patch, although a hack, should fix the issue.
Michiel tested it.

diff --git a/sys/dev/drm2/i915/intel_fb.c b/sys/dev/drm2/i915/intel_fb.c
index 3cb3b78..e41a49f 100644
--- a/sys/dev/drm2/i915/intel_fb.c
+++ b/sys/dev/drm2/i915/intel_fb.c
@@ -207,6 +207,8 @@ static void intel_fbdev_destroy(struct drm_device *dev,
}
 }
 
+extern int sc_txtmouse_no_retrace_wait;
+
 int intel_fbdev_init(struct drm_device *dev)
 {
struct intel_fbdev *ifbdev;
@@ -229,6 +231,7 @@ int intel_fbdev_init(struct drm_device *dev)
 
drm_fb_helper_single_add_all_connectors(&ifbdev->helper);
drm_fb_helper_initial_config(&ifbdev->helper, 32);
+   sc_txtmouse_no_retrace_wait = 1;
return 0;
 }
 
diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c
index 6e6663c..fc7f02f 100644
--- a/sys/dev/syscons/scvgarndr.c
+++ b/sys/dev/syscons/scvgarndr.c
@@ -395,6 +395,8 @@ vga_txtblink(scr_stat *scp, int at, int flip)
 {
 }
 
+int sc_txtmouse_no_retrace_wait;
+
 #ifndef SC_NO_CUTPASTE
 
 static void
@@ -445,7 +447,9 @@ draw_txtmouse(scr_stat *scp, int x, int y)
 #if 1
/* wait for vertical retrace to avoid jitter on some videocards */
crtc_addr = scp->sc->adp->va_crtc_addr;
-   while (!(inb(crtc_addr + 6) & 0x08)) /* idle */ ;
+   while (!sc_txtmouse_no_retrace_wait &&
+   !(inb(crtc_addr + 6) & 0x08))
+   /* idle */ ;
 #endif
c = scp->sc->mouse_char;
vidd_load_font(scp->sc->adp, 0, 32, 8, font_buf, c, 4); 


pgpxVLvIhVDpR.pgp
Description: PGP signature


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-17 Thread Michiel Boland

On 06/16/2013 17:11, Michiel Boland wrote:

Hi. Recently I switched to WITH_NEW_XORG, primarily because the stock X server
with Intel driver has some issues that make it unusable for me.

The new X server and Intel driver works extremely well, so kudos to whoever made
this possible.

Unfortunately, I am now experiencing random hangs on shutdown. On shutdown the
system randomly freezes after

[...] syslogd: exiting on signal 15

I would then expect to see 'Waiting (max 60 seconds) for system process 'XXX' to
stop messages, but these never arrive.


So it turns out that init hangs because vga_txtmouse (draw_txtmouse in fact) is 
hogging the clock swi. The routine is waiting for a vertical retrace which never 
arrives. (The new intel driver can't return to text console, so the screen just 
goes blank when X exits.)


Some workarounds:

- don't run moused (i.e. disable it in rc.conf and devd.conf)
  instead run the X server in combination with hald

- do run moused, but then either

 - unplug the mouse before shutting down

  - build a kernel with VGA_NO_FONT_LOADING

Of course the long-term fix is to remove the possibly infinite loop in 
draw_txtmouse.


Thanks to Konstantin for his patience in helping me track this down.

Cheers
Michiel

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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Michiel Boland

So apparently the value of 'rebooting' is 0 at the time of the hang...

db> x rebooting
rebooting:  0

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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Konstantin Belousov
On Sun, Jun 16, 2013 at 08:06:21PM +0200, Michiel Boland wrote:
> On 06/16/2013 19:46, Konstantin Belousov wrote:
> > On Sun, Jun 16, 2013 at 07:12:33PM +0200, Michiel Boland wrote:
> >> On 06/16/2013 17:37, Konstantin Belousov wrote:
> >> [...]
> >>> I do not see anything related to i915 in the core.txt you provided.
> >>>
> >>> Next time the machine hangs, start with the output of ps command from
> >>> ddb and 'show allpcpu', together with 'alltrace'.
> >>>
> >>
> >> Ok, I captured 'ps', 'show allpcpu' and 'alltrace' from a stuck shutdown. 
> >> I've
> >> appended it to my core.txt. (See previous e-mail.) (Note that the ddb 
> >> commands
> >> are from a different session - so the ddb output may not match with the 
> >> kgdb
> >> output.)
> >>
> >
> > Hm, how do you initiate the shutdown ? Show the exact command.
> > Also, from the same moment of the hung system, enter the ddb and
> > again do ps, alltrace and 'x rebooting'.
> >
> 
> The exact command to generate the hangs from which I created the reports was
> 
> 'shutdown -r now'
> 
> FWIW - the saved core from the ddb-induced panic has
> 
> (kgdb) print rebooting
> $1 = 1
I explicitely asked you to provide me with the consistent ps/alltrace
and 'x rebooting' output.  What you did is useless.

In the ddb trace you appended, there is no thread which executes
the reboot(2) system call.


pgpxBIhY0i5UK.pgp
Description: PGP signature


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Ian Lepore
On Sun, 2013-06-16 at 09:07 -0700, Jeremy Chadwick wrote:
> On Sun, Jun 16, 2013 at 06:01:49PM +0200, Michiel Boland wrote:
> > On 06/16/2013 17:55, Jeremy Chadwick wrote:
> > [...]
> > 
> > >Are you running moused(8)?  Actually, I can see quite clearly that you
> > >are in your core.txt:
> > >
> > >Starting ums0 moused.
> > >
> > >Try turning that off.  Don't ask me how, because devd(8) / devd.conf(5)
> > >might be involved.
> > >
> > 
> > The moused is started by devd - I don't see a quick way of turning that off.
> 
> Comment out the relevant crap in devd.conf(5).  Search for "ums"
> and comment out the two "notify" sections.

I don't understand why people treat devd as if it's some sort of evil
virus that they're forced to live with (using phrases like "crap in
devd.conf").  In general, the standard devd rules tend to fall into 3
categories:  
  * use logger(1) to record some anomaly
  * kldload a module
  * invoke a standard /etc/rc.d script

For moused, the devd rules invoke /etc/rc.d/moused, which implies that
setting moused_enable=NO in rc.conf would be all that's needed to
disable it.

-- Ian


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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Michiel Boland

On 06/16/2013 20:06, Michiel Boland wrote:

FWIW - the saved core from the ddb-induced panic has

(kgdb) print rebooting
$1 = 1



I realised instantly after I sent my message that this is meaningless - so 
please ignore that.


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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Michiel Boland

On 06/16/2013 19:46, Konstantin Belousov wrote:

On Sun, Jun 16, 2013 at 07:12:33PM +0200, Michiel Boland wrote:

On 06/16/2013 17:37, Konstantin Belousov wrote:
[...]

I do not see anything related to i915 in the core.txt you provided.

Next time the machine hangs, start with the output of ps command from
ddb and 'show allpcpu', together with 'alltrace'.



Ok, I captured 'ps', 'show allpcpu' and 'alltrace' from a stuck shutdown. I've
appended it to my core.txt. (See previous e-mail.) (Note that the ddb commands
are from a different session - so the ddb output may not match with the kgdb
output.)



Hm, how do you initiate the shutdown ? Show the exact command.
Also, from the same moment of the hung system, enter the ddb and
again do ps, alltrace and 'x rebooting'.



The exact command to generate the hangs from which I created the reports was

'shutdown -r now'

FWIW - the saved core from the ddb-induced panic has

(kgdb) print rebooting
$1 = 1

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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Konstantin Belousov
On Sun, Jun 16, 2013 at 07:12:33PM +0200, Michiel Boland wrote:
> On 06/16/2013 17:37, Konstantin Belousov wrote:
> [...]
> > I do not see anything related to i915 in the core.txt you provided.
> >
> > Next time the machine hangs, start with the output of ps command from
> > ddb and 'show allpcpu', together with 'alltrace'.
> >
> 
> Ok, I captured 'ps', 'show allpcpu' and 'alltrace' from a stuck shutdown. 
> I've 
> appended it to my core.txt. (See previous e-mail.) (Note that the ddb 
> commands 
> are from a different session - so the ddb output may not match with the kgdb 
> output.)
> 

Hm, how do you initiate the shutdown ? Show the exact command.
Also, from the same moment of the hung system, enter the ddb and
again do ps, alltrace and 'x rebooting'.


pgpFfv8UYSLYj.pgp
Description: PGP signature


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Michiel Boland

On 06/16/2013 17:37, Konstantin Belousov wrote:
[...]

I do not see anything related to i915 in the core.txt you provided.

Next time the machine hangs, start with the output of ps command from
ddb and 'show allpcpu', together with 'alltrace'.



Ok, I captured 'ps', 'show allpcpu' and 'alltrace' from a stuck shutdown. I've 
appended it to my core.txt. (See previous e-mail.) (Note that the ddb commands 
are from a different session - so the ddb output may not match with the kgdb 
output.)



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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Steven Hartland


- Original Message - 
From: "Michiel Boland" 

To: "FreeBSD Stable" 
Sent: Sunday, June 16, 2013 4:11 PM
Subject: system sporadically hangs on shutdown after switching to WITH_NEW_XORG


Hi. Recently I switched to WITH_NEW_XORG, primarily because the stock X server 
with Intel driver has some issues that make it unusable for me.


The new X server and Intel driver works extremely well, so kudos to whoever made 
this possible.


Unfortunately, I am now experiencing random hangs on shutdown. On shutdown the 
system randomly freezes after


[...] syslogd: exiting on signal 15

I would then expect to see 'Waiting (max 60 seconds) for system process 'XXX' to 
stop messages, but these never arrive.


I paniced the machine in ddb, so I have a crash dump if someone want to look at 
it. The crashinfo is at http://barrytown.boland.org/core.txt (I would have 
pasted it here but it is a bit verbose.)


Machine has an Intel G41 chipset, with a SAMSUNG SSD 830 Series HD, running 
9.1-STABLE r251803. Serial console. GENERIC kernel, expect for options DDB and 
ALT_BREAK_TO_DEBUGGER.


Who knows what's going on here?


Does setting the sysctl: hw.usb.no_shutdown_wait=1 help?

   Regards
   steve


This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 


In the event of misdirection, illegible or incomplete transmission please 
telephone +44 845 868 1337
or return the E.mail to postmas...@multiplay.co.uk.

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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Jeremy Chadwick
On Sun, Jun 16, 2013 at 06:01:49PM +0200, Michiel Boland wrote:
> On 06/16/2013 17:55, Jeremy Chadwick wrote:
> [...]
> 
> >Are you running moused(8)?  Actually, I can see quite clearly that you
> >are in your core.txt:
> >
> >Starting ums0 moused.
> >
> >Try turning that off.  Don't ask me how, because devd(8) / devd.conf(5)
> >might be involved.
> >
> 
> The moused is started by devd - I don't see a quick way of turning that off.

Comment out the relevant crap in devd.conf(5).  Search for "ums"
and comment out the two "notify" sections.

> As a workaround I'm trying to run a kernel with
> 
>  options SC_NO_SYSMOUSE
> 
> to see if the hangs go away.

That's one way to do it, I guess.

Be aware that I do not use X, however I have repeatedly seen mentioned
on these lists problems/complexities from where people rely on moused(8)
to "drive their mouse" while inside of X (or possibly that X and
moused(8) are both simultaneously polling the mouse).  There's
apparently a very specific kind of X configuration you're supposed to
use to get proper mouse/keyboard/HAL/HID/whatever support, and tons of
people have it wrongt.  Warren Block I think has some insights into
this, or could maybe help shed some light on what I'm remembering.

-- 
| Jeremy Chadwick   j...@koitsu.org |
| UNIX Systems Administratorhttp://jdc.koitsu.org/ |
| Making life hard for others since 1977. PGP 4BD6C0CB |

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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Michiel Boland

On 06/16/2013 17:55, Jeremy Chadwick wrote:
[...]


Are you running moused(8)?  Actually, I can see quite clearly that you
are in your core.txt:

Starting ums0 moused.

Try turning that off.  Don't ask me how, because devd(8) / devd.conf(5)
might be involved.



The moused is started by devd - I don't see a quick way of turning that off.

As a workaround I'm trying to run a kernel with

 options SC_NO_SYSMOUSE

to see if the hangs go away.

Cheers
Michiel

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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Jeremy Chadwick
On Sun, Jun 16, 2013 at 05:48:52PM +0200, Michiel Boland wrote:
> On 06/16/2013 17:37, Konstantin Belousov wrote:
> >On Sun, Jun 16, 2013 at 05:11:15PM +0200, Michiel Boland wrote:
> >>Hi. Recently I switched to WITH_NEW_XORG, primarily because the stock X 
> >>server
> >>with Intel driver has some issues that make it unusable for me.
> >>
> >>The new X server and Intel driver works extremely well, so kudos to whoever 
> >>made
> >>this possible.
> >>
> >>Unfortunately, I am now experiencing random hangs on shutdown. On shutdown 
> >>the
> >>system randomly freezes after
> >>
> >>[...] syslogd: exiting on signal 15
> >>
> >>I would then expect to see 'Waiting (max 60 seconds) for system process 
> >>'XXX' to
> >>stop messages, but these never arrive.
> >>
> >>I paniced the machine in ddb, so I have a crash dump if someone want to 
> >>look at
> >>it. The crashinfo is at http://barrytown.boland.org/core.txt (I would have
> >>pasted it here but it is a bit verbose.)
> >>
> >>Machine has an Intel G41 chipset, with a SAMSUNG SSD 830 Series HD, running
> >>9.1-STABLE r251803. Serial console. GENERIC kernel, expect for options DDB 
> >>and
> >>ALT_BREAK_TO_DEBUGGER.
> >>
> >>Who knows what's going on here?
> >
> >I do not see anything related to i915 in the core.txt you provided.
> >
> >Next time the machine hangs, start with the output of ps command from
> >ddb and 'show allpcpu', together with 'alltrace'.
> >
> 
> Ok.
> 
> I appended 'thread apply all bt' from kgdb to the core.txt, maybe
> there is something interesting in there.
> 
> I did notice the following
> 
> Thread 17 (Thread 17):
> #0  cpustop_handler () at /usr/src/sys/amd64/amd64/mp_machdep.c:1392
> #1  0x80cbebbd in ipi_nmi_handler () at
> /usr/src/sys/amd64/amd64/mp_machdep.c:1374
> #2  0x80ccc159 in trap (frame=0x81424890) at
> /usr/src/sys/amd64/amd64/trap.c:211
> #3  0x80cb55af in nmi_calltrap () at
> /usr/src/sys/amd64/amd64/exception.S:501
> #4  0x80d0c029 in vga_txtmouse (scp=0xfe0005586600,
> x=320, y=200, on=) at cpufunc.h:186
> Previous frame inner to this frame (corrupt stack?)
> 
> Maybe the hang is caused by the removal of the text mouse cursor?
> (Just guessing here.)

vga_txtmouse comes from syscons(4).

Are you making use of vidcontrol(1) in any way to set the system console
(outside of X) to something that uses the VGA framebuffer?  There are
probably some loader.conf or rc.conf variables that control this (I do
not know).

Are you running moused(8)?  Actually, I can see quite clearly that you
are in your core.txt:

Starting ums0 moused.

Try turning that off.  Don't ask me how, because devd(8) / devd.conf(5)
might be involved.

-- 
| Jeremy Chadwick   j...@koitsu.org |
| UNIX Systems Administratorhttp://jdc.koitsu.org/ |
| Making life hard for others since 1977. PGP 4BD6C0CB |

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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Michiel Boland

On 06/16/2013 17:37, Konstantin Belousov wrote:

On Sun, Jun 16, 2013 at 05:11:15PM +0200, Michiel Boland wrote:

Hi. Recently I switched to WITH_NEW_XORG, primarily because the stock X server
with Intel driver has some issues that make it unusable for me.

The new X server and Intel driver works extremely well, so kudos to whoever made
this possible.

Unfortunately, I am now experiencing random hangs on shutdown. On shutdown the
system randomly freezes after

[...] syslogd: exiting on signal 15

I would then expect to see 'Waiting (max 60 seconds) for system process 'XXX' to
stop messages, but these never arrive.

I paniced the machine in ddb, so I have a crash dump if someone want to look at
it. The crashinfo is at http://barrytown.boland.org/core.txt (I would have
pasted it here but it is a bit verbose.)

Machine has an Intel G41 chipset, with a SAMSUNG SSD 830 Series HD, running
9.1-STABLE r251803. Serial console. GENERIC kernel, expect for options DDB and
ALT_BREAK_TO_DEBUGGER.

Who knows what's going on here?


I do not see anything related to i915 in the core.txt you provided.

Next time the machine hangs, start with the output of ps command from
ddb and 'show allpcpu', together with 'alltrace'.



Ok.

I appended 'thread apply all bt' from kgdb to the core.txt, maybe there is 
something interesting in there.


I did notice the following

Thread 17 (Thread 17):
#0  cpustop_handler () at /usr/src/sys/amd64/amd64/mp_machdep.c:1392
#1  0x80cbebbd in ipi_nmi_handler () at 
/usr/src/sys/amd64/amd64/mp_machdep.c:1374
#2  0x80ccc159 in trap (frame=0x81424890) at 
/usr/src/sys/amd64/amd64/trap.c:211
#3  0x80cb55af in nmi_calltrap () at 
/usr/src/sys/amd64/amd64/exception.S:501
#4  0x80d0c029 in vga_txtmouse (scp=0xfe0005586600, x=320, y=200, 
on=) at cpufunc.h:186

Previous frame inner to this frame (corrupt stack?)

Maybe the hang is caused by the removal of the text mouse cursor? (Just guessing 
here.)


Cheers
Michiel

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


Re: system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Konstantin Belousov
On Sun, Jun 16, 2013 at 05:11:15PM +0200, Michiel Boland wrote:
> Hi. Recently I switched to WITH_NEW_XORG, primarily because the stock X 
> server 
> with Intel driver has some issues that make it unusable for me.
> 
> The new X server and Intel driver works extremely well, so kudos to whoever 
> made 
> this possible.
> 
> Unfortunately, I am now experiencing random hangs on shutdown. On shutdown 
> the 
> system randomly freezes after
> 
> [...] syslogd: exiting on signal 15
> 
> I would then expect to see 'Waiting (max 60 seconds) for system process 'XXX' 
> to 
> stop messages, but these never arrive.
> 
> I paniced the machine in ddb, so I have a crash dump if someone want to look 
> at 
> it. The crashinfo is at http://barrytown.boland.org/core.txt (I would have 
> pasted it here but it is a bit verbose.)
> 
> Machine has an Intel G41 chipset, with a SAMSUNG SSD 830 Series HD, running 
> 9.1-STABLE r251803. Serial console. GENERIC kernel, expect for options DDB 
> and 
> ALT_BREAK_TO_DEBUGGER.
> 
> Who knows what's going on here?

I do not see anything related to i915 in the core.txt you provided.

Next time the machine hangs, start with the output of ps command from
ddb and 'show allpcpu', together with 'alltrace'.


pgpqYPumBgaGi.pgp
Description: PGP signature


system sporadically hangs on shutdown after switching to WITH_NEW_XORG

2013-06-16 Thread Michiel Boland
Hi. Recently I switched to WITH_NEW_XORG, primarily because the stock X server 
with Intel driver has some issues that make it unusable for me.


The new X server and Intel driver works extremely well, so kudos to whoever made 
this possible.


Unfortunately, I am now experiencing random hangs on shutdown. On shutdown the 
system randomly freezes after


[...] syslogd: exiting on signal 15

I would then expect to see 'Waiting (max 60 seconds) for system process 'XXX' to 
stop messages, but these never arrive.


I paniced the machine in ddb, so I have a crash dump if someone want to look at 
it. The crashinfo is at http://barrytown.boland.org/core.txt (I would have 
pasted it here but it is a bit verbose.)


Machine has an Intel G41 chipset, with a SAMSUNG SSD 830 Series HD, running 
9.1-STABLE r251803. Serial console. GENERIC kernel, expect for options DDB and 
ALT_BREAK_TO_DEBUGGER.


Who knows what's going on here?

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


Re: Panic at shutdown (acpi related)

2013-03-01 Thread Ronald Klop
On Sun, 24 Feb 2013 13:04:52 +0100, David Demelier  
 wrote:



Le mardi 12 février 2013 21:42:01 Ronald Klop a écrit :

On Tue, 12 Feb 2013 19:44:49 +0100, David Demelier

 wrote:
> Le mardi 12 février 2013 10:01:10 Andriy Gapon a écrit :
>> on 12/02/2013 09:57 David Demelier said the following:
>> > Yes I have added debugging option in my kernel. I have makeoptions
>> > DEBUG=-g in my config. Do I need more ?
>>
>> .symbols?
>
> I don't understand what you are saying, I have
> /boot/kernel/kernel.symbols.
> Please tell me what I'm doing wrong. I've just read and done the steps
> written
> there :
>
> http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-
> gdb.html
>
> So I've run
>
> # cd /usr/obj/usr/src/sys/Melon
> # kgdb kernel.debug /var/crash/vmcore.0

Why not something like kgdb /boot/kernel/kernel.symbols
/var/crash/vmcore.0?
That looks like what the manual page of kgdb seems to suggest.

Regards,
Ronald.

> and that's the only trace I get using bt full :
>
> 229 #define IS_BSP()(PCPU_GET(cpuid) == 0)
> (kgdb) bt full
> #0  doadump (textdump=) at pcpu.h:229
> No locals.
> #1  0x in ?? ()
> No symbol table info available.
>


I have that, in fact I was using bt full instead of short bt :

#0  doadump (textdump=Variable "textdump" is not available.
) at pcpu.h:224
#1  0x0004 in ?? ()
#2  0x805146b6 in kern_reboot (howto=260) at
/usr/src/sys/kern/kern_shutdown.c:448
#3  0x80514b79 in panic (fmt=0x1 )
at /usr/src/sys/kern/kern_shutdown.c:636
#4  0x8071e919 in trap_fatal (frame=0xc, eva=Variable "eva" is  
not

available.
) at /usr/src/sys/amd64/amd64/trap.c:857
#5  0x8071eca4 in trap_pfault (frame=0xff80d63db5d0,  
usermode=0)

at /usr/src/sys/amd64/amd64/trap.c:773
#6  0x8071f09b in trap (frame=0xff80d63db5d0) at
/usr/src/sys/amd64/amd64/trap.c:456
#7  0x8070993f in calltrap () at
/usr/src/sys/amd64/amd64/exception.S:228
#8  0x802ddbf5 in AcpiOsAcquireObject (Cache=0xfe00015de400)
at /usr/src/sys/contrib/dev/acpica/utilities/utcache.c:316
#9  0x802e27c1 in AcpiUtAllocateObjectDescDbg
(ModuleName=0x80795110 "dsutils",
LineNumber=703, ComponentId=Variable "ComponentId" is not available.
) at /usr/src/sys/contrib/dev/acpica/utilities/utobject.c:437
#10 0x802e2972 in AcpiUtCreateInternalObjectDbg
(ModuleName=0x80795110 "dsutils",
LineNumber=703, ComponentId=64, Type=1)
at /usr/src/sys/contrib/dev/acpica/utilities/utobject.c:112
#11 0x802b32ea in AcpiDsCreateOperand  
(WalkState=0xfe000380fc00,

Arg=0xfe00017d39c0,
ArgIndex=0) at  
/usr/src/sys/contrib/dev/acpica/dispatcher/dsutils.c:703
#12 0x802b3686 in AcpiDsCreateOperands  
(WalkState=0xfe000380fc00,

FirstArg=0xfe00017d39c0) at
/usr/src/sys/contrib/dev/acpica/dispatcher/dsutils.c:798
#13 0x802b4323 in AcpiDsExecEndOp (WalkState=0xfe000380fc00)
at /usr/src/sys/contrib/dev/acpica/dispatcher/dswexec.c:449
#14 0x802d55e9 in AcpiPsParseLoop (WalkState=0xfe000380fc00)
at /usr/src/sys/contrib/dev/acpica/parser/psloop.c:1249
#15 0x802d6a5b in AcpiPsParseAml (WalkState=0xfe000380fc00)
at /usr/src/sys/contrib/dev/acpica/parser/psparse.c:525
#16 0x802d7ad7 in AcpiPsExecuteMethod (Info=0xfe00411b9500)
at /usr/src/sys/contrib/dev/acpica/parser/psxface.c:368
#17 0x802ce3af in AcpiNsEvaluate (Info=0xfe00411b9500)
at /usr/src/sys/contrib/dev/acpica/namespace/nseval.c:193
#18 0x802d3567 in AcpiEvaluateObject (Handle=0xfe00017d6d40,
Pathname=0x807b2e9b "_TMP", ExternalParams=0x0,
ReturnBuffer=0xff80d63dba50)
at /usr/src/sys/contrib/dev/acpica/namespace/nsxfeval.c:289
#19 0x8031ca84 in acpi_GetInteger (handle=0xfe00017d6d40,
path=0x807b2e9b "_TMP", number=0xff80d63dbab4) at
/usr/src/sys/dev/acpica/acpi.c:2204
#20 0x80331756 in acpi_tz_get_temperature (sc=0xfe0001a2fa00)
at /usr/src/sys/dev/acpica/acpi_thermal.c:462
#21 0x803329d6 in acpi_tz_monitor (Context=0xfe0001a2fa00)
at /usr/src/sys/dev/acpica/acpi_thermal.c:497
#22 0x80332f92 in acpi_tz_thread (arg=Variable "arg" is not  
available.

) at /usr/src/sys/dev/acpica/acpi_thermal.c:864
#23 0x804e7a3d in fork_exit (callout=0x80332e50
, arg=0x0,
frame=0xff80d63dbc00) at /usr/src/sys/kern/kern_fork.c:992
#24 0x80709dfe in fork_trampoline () at
/usr/src/sys/amd64/amd64/exception.S:602
#25 0x in ?? ()
#26 0x in ?? ()
#27 0x0001 in ?? ()
#28 0x in ?? ()
#29 0x in ?? ()
#30 0x in ?? ()
#31 0x in ?? ()
#32 0x in ?? ()
#33 0x in ?? ()
#34 0x in ?? ()
#35 0x in ?? ()
#36 0x in ?? ()
#37 0x in ?? ()
#38 0

Re: Panic at shutdown

2013-02-24 Thread David Demelier
Le mardi 12 février 2013 21:42:01 Ronald Klop a écrit :
> On Tue, 12 Feb 2013 19:44:49 +0100, David Demelier
> 
>  wrote:
> > Le mardi 12 février 2013 10:01:10 Andriy Gapon a écrit :
> >> on 12/02/2013 09:57 David Demelier said the following:
> >> > Yes I have added debugging option in my kernel. I have makeoptions
> >> > DEBUG=-g in my config. Do I need more ?
> >> 
> >> .symbols?
> > 
> > I don't understand what you are saying, I have
> > /boot/kernel/kernel.symbols.
> > Please tell me what I'm doing wrong. I've just read and done the steps
> > written
> > there :
> > 
> > http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-
> > gdb.html
> > 
> > So I've run
> > 
> > # cd /usr/obj/usr/src/sys/Melon
> > # kgdb kernel.debug /var/crash/vmcore.0
> 
> Why not something like kgdb /boot/kernel/kernel.symbols
> /var/crash/vmcore.0?
> That looks like what the manual page of kgdb seems to suggest.
> 
> Regards,
> Ronald.
> 
> > and that's the only trace I get using bt full :
> > 
> > 229 #define IS_BSP()(PCPU_GET(cpuid) == 0)
> > (kgdb) bt full
> > #0  doadump (textdump=) at pcpu.h:229
> > No locals.
> > #1  0x in ?? ()
> > No symbol table info available.
> > 

I have that, in fact I was using bt full instead of short bt :

#0  doadump (textdump=Variable "textdump" is not available.
) at pcpu.h:224
#1  0x0004 in ?? ()
#2  0x805146b6 in kern_reboot (howto=260) at 
/usr/src/sys/kern/kern_shutdown.c:448
#3  0x80514b79 in panic (fmt=0x1 )
at /usr/src/sys/kern/kern_shutdown.c:636
#4  0x8071e919 in trap_fatal (frame=0xc, eva=Variable "eva" is not 
available.
) at /usr/src/sys/amd64/amd64/trap.c:857
#5  0x8071eca4 in trap_pfault (frame=0xff80d63db5d0, usermode=0)
at /usr/src/sys/amd64/amd64/trap.c:773
#6  0x8071f09b in trap (frame=0xff80d63db5d0) at 
/usr/src/sys/amd64/amd64/trap.c:456
#7  0x8070993f in calltrap () at 
/usr/src/sys/amd64/amd64/exception.S:228
#8  0x802ddbf5 in AcpiOsAcquireObject (Cache=0xfe00015de400)
at /usr/src/sys/contrib/dev/acpica/utilities/utcache.c:316
#9  0x802e27c1 in AcpiUtAllocateObjectDescDbg 
(ModuleName=0x80795110 "dsutils", 
LineNumber=703, ComponentId=Variable "ComponentId" is not available.
) at /usr/src/sys/contrib/dev/acpica/utilities/utobject.c:437
#10 0x802e2972 in AcpiUtCreateInternalObjectDbg 
(ModuleName=0x80795110 "dsutils", 
LineNumber=703, ComponentId=64, Type=1)
at /usr/src/sys/contrib/dev/acpica/utilities/utobject.c:112
#11 0x802b32ea in AcpiDsCreateOperand (WalkState=0xfe000380fc00, 
Arg=0xfe00017d39c0, 
ArgIndex=0) at /usr/src/sys/contrib/dev/acpica/dispatcher/dsutils.c:703
#12 0x802b3686 in AcpiDsCreateOperands (WalkState=0xfe000380fc00, 
FirstArg=0xfe00017d39c0) at 
/usr/src/sys/contrib/dev/acpica/dispatcher/dsutils.c:798
#13 0x802b4323 in AcpiDsExecEndOp (WalkState=0xfe000380fc00)
at /usr/src/sys/contrib/dev/acpica/dispatcher/dswexec.c:449
#14 0x802d55e9 in AcpiPsParseLoop (WalkState=0xfe000380fc00)
at /usr/src/sys/contrib/dev/acpica/parser/psloop.c:1249
#15 0x802d6a5b in AcpiPsParseAml (WalkState=0xfe000380fc00)
at /usr/src/sys/contrib/dev/acpica/parser/psparse.c:525
#16 0x802d7ad7 in AcpiPsExecuteMethod (Info=0xfe00411b9500)
at /usr/src/sys/contrib/dev/acpica/parser/psxface.c:368
#17 0x802ce3af in AcpiNsEvaluate (Info=0xfe00411b9500)
at /usr/src/sys/contrib/dev/acpica/namespace/nseval.c:193
#18 0x802d3567 in AcpiEvaluateObject (Handle=0xfe00017d6d40, 
Pathname=0x807b2e9b "_TMP", ExternalParams=0x0, 
ReturnBuffer=0xff80d63dba50)
at /usr/src/sys/contrib/dev/acpica/namespace/nsxfeval.c:289
#19 0x8031ca84 in acpi_GetInteger (handle=0xfe00017d6d40, 
path=0x807b2e9b "_TMP", number=0xff80d63dbab4) at 
/usr/src/sys/dev/acpica/acpi.c:2204
#20 0x80331756 in acpi_tz_get_temperature (sc=0xfe0001a2fa00)
at /usr/src/sys/dev/acpica/acpi_thermal.c:462
#21 0x803329d6 in acpi_tz_monitor (Context=0xfe0001a2fa00)
at /usr/src/sys/dev/acpica/acpi_thermal.c:497
#22 0x80332f92 in acpi_tz_thread (arg=Variable "arg" is not available.
) at /usr/src/sys/dev/acpica/acpi_thermal.c:864
#23 0x804e7a3d in fork_exit (callout=0x80332e50 
, arg=0x0, 
frame=0xff80d63dbc00) at /usr/src/sys/kern/kern_fork.c:992
#24 0x80709dfe in fork_trampoline () at 
/usr/src/sys/amd64/amd64/exception.S:602
#25 0x in ?? ()
#26 0x in ?? ()
#27 0x0001 in ?? ()
#28 0x in ?? ()
#29 0x in ?? ()
#30 0x in ?? ()
#31 0x in ?? ()
#32 0x in ?? ()
#33 0x in ?? ()
#34 0x in ?? ()
#35 0x in ?? ()
#36 0x in ?? ()
#37 0x

Re: Panic at shutdown

2013-02-19 Thread David Demelier
2013/2/14 David Demelier 

> Le mardi 12 février 2013 21:42:01 Ronald Klop a écrit :
> > On Tue, 12 Feb 2013 19:44:49 +0100, David Demelier
> >
> >  wrote:
> > > Le mardi 12 février 2013 10:01:10 Andriy Gapon a écrit :
> > >> on 12/02/2013 09:57 David Demelier said the following:
> > >> > Yes I have added debugging option in my kernel. I have makeoptions
> > >> > DEBUG=-g in my config. Do I need more ?
> > >>
> > >> .symbols?
> > >
> > > I don't understand what you are saying, I have
> > > /boot/kernel/kernel.symbols.
> > > Please tell me what I'm doing wrong. I've just read and done the steps
> > > written
> > > there :
> > >
> > > http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-
> > > gdb.html
> > >
> > > So I've run
> > >
> > > # cd /usr/obj/usr/src/sys/Melon
> > > # kgdb kernel.debug /var/crash/vmcore.0
> >
> > Why not something like kgdb /boot/kernel/kernel.symbols
> > /var/crash/vmcore.0?
> > That looks like what the manual page of kgdb seems to suggest.
> >
> > Regards,
> > Ronald.
> >
> > > and that's the only trace I get using bt full :
> > >
> > > 229 #define IS_BSP()(PCPU_GET(cpuid) == 0)
> > > (kgdb) bt full
> > > #0  doadump (textdump=) at pcpu.h:229
> > > No locals.
> > > #1  0x in ?? ()
> > > No symbol table info available.
> > >
> > >
> > > --
> > > David Demelier
> > > ___
> > > freebsd-stable@freebsd.org mailing list
> > > http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> > > To unsubscribe, send any mail to "
> freebsd-stable-unsubscr...@freebsd.org"
> >
> > ___
> > freebsd-stable@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> > To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org
> "
>
> Today I have a little bit more :
>
> #0  0x804f358b in isbufbusy (bp=0xfe0003810480) at
> /usr/src/sys/kern/kern_shutdown.c:280
> 280 if (((bp->b_flags & (B_INVAL | B_PERSISTENT)) == 0 &&
> (kgdb) bt full
> #0  0x804f358b in isbufbusy (bp=0xfe0003810480) at
> /usr/src/sys/kern/kern_shutdown.c:280
> No locals.
> #1  0x0004 in ?? ()
> No symbol table info available.
> #2  0x804f3aa6 in kern_reboot (howto=260) at
> /usr/src/sys/kern/kern_shutdown.c:451
> _ep = (struct eventhandler_entry *) 0x100
> _el = (struct eventhandler_list *) 0x804f35b3
> first_buf_printf = 1
> #3  0x804f3f69 in panic (fmt=Variable "fmt" is not available.
> ) at /usr/src/sys/kern/kern_shutdown.c:624
> td = (struct thread *) 0x1
> bootopt = 260
> newpanic = 1
> ap = {{gp_offset = 16, fp_offset = 48, overflow_arg_area =
> 0xff80daaf0420, reg_save_area = 0xff80daaf0350}}
> panic_cpu = 0
> buf = "general protection fault", '\0' 
> #4  0x806fcf69 in trap_fatal (frame=0x9, eva=Variable "eva" is not
> available.
> ) at /usr/src/sys/amd64/amd64/trap.c:851
> code = Variable "code" is not available.
>
>
I feel very very ashamed because these random panics were occurring because
of my kernel config that contained drm and radeondrm devices while I use
x11/nvidia-driver.. However, I think we should add a notice in the
nvidia-driver pkg-message to prevent any problems?

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

Re: Panic at shutdown

2013-02-14 Thread David Demelier
Le mardi 12 février 2013 21:42:01 Ronald Klop a écrit :
> On Tue, 12 Feb 2013 19:44:49 +0100, David Demelier
> 
>  wrote:
> > Le mardi 12 février 2013 10:01:10 Andriy Gapon a écrit :
> >> on 12/02/2013 09:57 David Demelier said the following:
> >> > Yes I have added debugging option in my kernel. I have makeoptions
> >> > DEBUG=-g in my config. Do I need more ?
> >> 
> >> .symbols?
> > 
> > I don't understand what you are saying, I have
> > /boot/kernel/kernel.symbols.
> > Please tell me what I'm doing wrong. I've just read and done the steps
> > written
> > there :
> > 
> > http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-
> > gdb.html
> > 
> > So I've run
> > 
> > # cd /usr/obj/usr/src/sys/Melon
> > # kgdb kernel.debug /var/crash/vmcore.0
> 
> Why not something like kgdb /boot/kernel/kernel.symbols
> /var/crash/vmcore.0?
> That looks like what the manual page of kgdb seems to suggest.
> 
> Regards,
> Ronald.
> 
> > and that's the only trace I get using bt full :
> > 
> > 229 #define IS_BSP()(PCPU_GET(cpuid) == 0)
> > (kgdb) bt full
> > #0  doadump (textdump=) at pcpu.h:229
> > No locals.
> > #1  0x in ?? ()
> > No symbol table info available.
> > 
> > 
> > --
> > David Demelier
> > ___
> > freebsd-stable@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> > To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
> 
> ___
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Today I have a little bit more :

#0  0x804f358b in isbufbusy (bp=0xfe0003810480) at 
/usr/src/sys/kern/kern_shutdown.c:280
280 if (((bp->b_flags & (B_INVAL | B_PERSISTENT)) == 0 &&
(kgdb) bt full
#0  0x804f358b in isbufbusy (bp=0xfe0003810480) at 
/usr/src/sys/kern/kern_shutdown.c:280
No locals.
#1  0x0004 in ?? ()
No symbol table info available.
#2  0x804f3aa6 in kern_reboot (howto=260) at 
/usr/src/sys/kern/kern_shutdown.c:451
_ep = (struct eventhandler_entry *) 0x100
_el = (struct eventhandler_list *) 0x804f35b3
first_buf_printf = 1
#3  0x804f3f69 in panic (fmt=Variable "fmt" is not available.
) at /usr/src/sys/kern/kern_shutdown.c:624
td = (struct thread *) 0x1
bootopt = 260
newpanic = 1
ap = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 
0xff80daaf0420, reg_save_area = 0xff80daaf0350}}
panic_cpu = 0
buf = "general protection fault", '\0' 
#4  0x806fcf69 in trap_fatal (frame=0x9, eva=Variable "eva" is not 
available.
) at /usr/src/sys/amd64/amd64/trap.c:851
code = Variable "code" is not available.


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


Re: Panic at shutdown

2013-02-12 Thread Ronald Klop
On Tue, 12 Feb 2013 19:44:49 +0100, David Demelier  
 wrote:



Le mardi 12 février 2013 10:01:10 Andriy Gapon a écrit :

on 12/02/2013 09:57 David Demelier said the following:
> Yes I have added debugging option in my kernel. I have makeoptions
> DEBUG=-g in my config. Do I need more ?

.symbols?


I don't understand what you are saying, I have  
/boot/kernel/kernel.symbols.
Please tell me what I'm doing wrong. I've just read and done the steps  
written

there :

http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-
gdb.html

So I've run

# cd /usr/obj/usr/src/sys/Melon
# kgdb kernel.debug /var/crash/vmcore.0


Why not something like kgdb /boot/kernel/kernel.symbols  
/var/crash/vmcore.0?

That looks like what the manual page of kgdb seems to suggest.

Regards,
Ronald.




and that's the only trace I get using bt full :

229 #define IS_BSP()(PCPU_GET(cpuid) == 0)
(kgdb) bt full
#0  doadump (textdump=) at pcpu.h:229
No locals.
#1  0x in ?? ()
No symbol table info available.


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

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

Re: Panic at shutdown

2013-02-12 Thread David Demelier
Okay I will update everything and use GENERIC config, if I get more info
I'll tell you :-),

Cheers and thanks for your answers


2013/2/12 Andriy Gapon 

> on 12/02/2013 20:44 David Demelier said the following:
> > Le mardi 12 février 2013 10:01:10 Andriy Gapon a écrit :
> >> on 12/02/2013 09:57 David Demelier said the following:
> >>> Yes I have added debugging option in my kernel. I have makeoptions
> >>> DEBUG=-g in my config. Do I need more ?
> >>
> >> .symbols?
> >
> > I don't understand what you are saying, I have
> /boot/kernel/kernel.symbols.
> > Please tell me what I'm doing wrong. I've just read and done the steps
> written
> > there :
> >
> > http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-
> > gdb.html
> >
> > So I've run
> >
> > # cd /usr/obj/usr/src/sys/Melon
> > # kgdb kernel.debug /var/crash/vmcore.0
> >
> > and that's the only trace I get using bt full :
> >
> > 229 #define IS_BSP()(PCPU_GET(cpuid) == 0)
> > (kgdb) bt full
> > #0  doadump (textdump=) at pcpu.h:229
> > No locals.
> > #1  0x in ?? ()
> > No symbol table info available.
>
> I don't know what you are doing wrong, but the above message ("No symbol
> table
> info available") is wrong.
> Perhaps your world (kgdb) and kernel are out of sync, maybe something
> else...
>
> --
> Andriy Gapon
>



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

Re: Panic at shutdown

2013-02-12 Thread Andriy Gapon
on 12/02/2013 20:44 David Demelier said the following:
> Le mardi 12 février 2013 10:01:10 Andriy Gapon a écrit :
>> on 12/02/2013 09:57 David Demelier said the following:
>>> Yes I have added debugging option in my kernel. I have makeoptions
>>> DEBUG=-g in my config. Do I need more ?
>>
>> .symbols?
> 
> I don't understand what you are saying, I have /boot/kernel/kernel.symbols. 
> Please tell me what I'm doing wrong. I've just read and done the steps 
> written 
> there :
> 
> http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-
> gdb.html
> 
> So I've run 
> 
> # cd /usr/obj/usr/src/sys/Melon
> # kgdb kernel.debug /var/crash/vmcore.0
> 
> and that's the only trace I get using bt full :
> 
> 229 #define IS_BSP()(PCPU_GET(cpuid) == 0)
> (kgdb) bt full
> #0  doadump (textdump=) at pcpu.h:229
> No locals.
> #1  0x in ?? ()
> No symbol table info available.

I don't know what you are doing wrong, but the above message ("No symbol table
info available") is wrong.
Perhaps your world (kgdb) and kernel are out of sync, maybe something else...

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


Re: Panic at shutdown

2013-02-12 Thread David Demelier
Le mardi 12 février 2013 10:01:10 Andriy Gapon a écrit :
> on 12/02/2013 09:57 David Demelier said the following:
> > Yes I have added debugging option in my kernel. I have makeoptions
> > DEBUG=-g in my config. Do I need more ?
> 
> .symbols?

I don't understand what you are saying, I have /boot/kernel/kernel.symbols. 
Please tell me what I'm doing wrong. I've just read and done the steps written 
there :

http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-
gdb.html

So I've run 

# cd /usr/obj/usr/src/sys/Melon
# kgdb kernel.debug /var/crash/vmcore.0

and that's the only trace I get using bt full :

229 #define IS_BSP()(PCPU_GET(cpuid) == 0)
(kgdb) bt full
#0  doadump (textdump=) at pcpu.h:229
No locals.
#1  0x in ?? ()
No symbol table info available.


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


Re: Panic at shutdown

2013-02-12 Thread Andriy Gapon
on 12/02/2013 09:57 David Demelier said the following:
> Yes I have added debugging option in my kernel. I have makeoptions DEBUG=-g in
> my config. Do I need more ?

.symbols?
I don't know how else to explain consistently broken / useless stack traces.

> I'm not sure to understand what you meant about stray signatures..

"-- " sequence.  Let me show you:

-- 

There is a stray signature sequence above this line.

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


Re: Panic at shutdown

2013-02-11 Thread David Demelier
Yes I have added debugging option in my kernel. I have makeoptions DEBUG=-g
in my config. Do I need more ?

I'm not sure to understand what you meant about stray signatures..

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


Re: Panic at shutdown

2013-02-11 Thread Andriy Gapon
on 11/02/2013 22:33 David Demelier said the following:
> Le jeudi 7 février 2013 10:55:09 Andriy Gapon a écrit :
>> Without so much as a stack trace there is nothing to chew on.
>> A useable vmcore would be better.
>>
>> Did you perhaps use kgdb with a mismatching kernel?


Please don't leave stray signature separators in your emails - that makes
reading and replying painful in compliant clients - as you can see.

The ACPI messages don't tell _me_ much.

If your kernel and modules are built with no debugging support whatsoever or
.symbols files are missing, then it is almost pointless to get kernel dumps.

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


Re: Panic at shutdown

2013-02-11 Thread David Demelier
Le jeudi 7 février 2013 10:55:09 Andriy Gapon a écrit :
> Without so much as a stack trace there is nothing to chew on.
> A useable vmcore would be better.
> 
> Did you perhaps use kgdb with a mismatching kernel?
-- 

I still have panic, and recompiled kernel, the stack info is not better but I 
have a lot of message before : (Always related to ACPI)

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:
ACPI Error: Object not a Integer, type Reference (20110527/exresnte-210)
ACPI Error: Method execution failed [\_SB_.BAT0._UID] (Node 
0xfe00017eaaf0), AE_AML_OPERAND_TYPE (20110527/uteval-113)
ACPI Error: Needed [Integer/String/Buffer], found [Reference] 
0xfe0001807678 (20110527/exresop-533)
ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for 
[OpcodeName unavailable] (20110527/dswexec-498)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BTDR] (Node 
0xfe00017e6ac8), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BSTA] (Node 
0xfe00017e6aa0), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method parse/execution failed [\_SB_.BAT0._STA] (Node 
0xfe00017eaac8), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method execution failed [\_SB_.BAT0._STA] (Node 
0xfe00017eaac8), AE_AML_OPERAND_TYPE (20110527/uteval-113)
ACPI Error: Object not a Integer, type Reference (20110527/exresnte-210)
ACPI Error: Method execution failed [\_SB_.BAT0._UID] (Node 
0xfe00017eaaf0), AE_AML_OPERAND_TYPE (20110527/uteval-113)
ACPI Error: Needed [Integer/String/Buffer], found [Reference] 
0xfe0001807678 (20110527/exresop-533)
ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for 
[OpcodeName unavailable] (20110527/dswexec-498)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BTDR] (Node 
0xfe00017e6ac8), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BSTA] (Node 
0xfe00017e6aa0), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method parse/execution failed [\_SB_.BAT0._STA] (Node 
0xfe00017eaac8), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method execution failed [\_SB_.BAT0._STA] (Node 
0xfe00017eaac8), AE_AML_OPERAND_TYPE (20110527/uteval-113)
ACPI Error: Object not a Integer, type Reference (20110527/exresnte-210)
ACPI Error: Method execution failed [\_SB_.BAT0._UID] (Node 
0xfe00017eaaf0), AE_AML_OPERAND_TYPE (20110527/uteval-113)
ACPI Error: Needed [Integer/String/Buffer], found [Mutex] 0xfe0001807678 
(20110527/exresop-533)
ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for 
[OpcodeName unavailable] (20110527/dswexec-498)
ACPI Error: Method parse/execution failed [\_GPE.HWWP] (Node 
0xfe00017d2208), AE_AML_OPERAND_TYPE (20110527/psparse-560)


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x368
fault code  = supervisor read data, page not present
instruction pointer = 0x20:0x804e433b
stack pointer   = 0x28:0xff80dd819730
frame pointer   = 0x28:0xfe0003aa3920
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 = 1543 (upowerd)
trap number = 12
panic: page fault
cpuid = 0
Uptime: 2h11m52s
Dumping 632 out of 3054 
MB:..3%..11%..21%..31%..41%..51%..61%..71%..81%..92%

Reading symbols from /boot/kernel/vboxdrv.ko...done.
Loaded symbols for /boot/kernel/vboxdrv.ko
#0  doadump (textdump=) at pcpu.h:229

warning: Source file is more recent than executable.

229 #define IS_BSP()(PCPU_GET(cpuid) == 0)
(kgdb) bt full
#0  doadump (textdump=) at pcpu.h:229
No locals.
#1  0x in ?? ()
No symbol table info available.
(kgdb) bt full
#0  doadump (textdump=) at pcpu.h:229  

No locals.  
   
#1  0x in ?? () 
  
No symbol table info available.   

--
David Demelier
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsu

Re: Panic at shutdown

2013-02-07 Thread David Demelier
On 07/02/2013 09:55, Andriy Gapon wrote:
> 
> Without so much as a stack trace there is nothing to chew on.
> A useable vmcore would be better.
> 
> Did you perhaps use kgdb with a mismatching kernel?
> 

I don't remember, I just rebuild a new kernel and will provide more info
if panic occurs again!
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: Panic at shutdown

2013-02-07 Thread Andriy Gapon

Without so much as a stack trace there is nothing to chew on.
A useable vmcore would be better.

Did you perhaps use kgdb with a mismatching kernel?

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


Re: Panic at shutdown

2013-02-06 Thread David Demelier
On 06/02/2013 16:31, David Demelier wrote:
> Hello there,
> 
> I recently had a panic at shutdown in 9.1-STABLE, there's the backtrace:
> 
> 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:
> <118>.
> <118>Feb  5 23:30:31 Melon syslogd: exiting on signal 15
> <5>wlan0: link state changed to DOWN
> <5>lagg0: link state changed to DOWN
> Waiting (max 60 seconds) for system process `vnlru' to stop...done
> Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
> Waiting (max 60 seconds) for system process `syncer' to stop...
> Syncing disks, vnodes remaining...7 1 1 0 done
> All buffers synced.
> ACPI Error: Needed [Integer/String/Buffer], found [Reference]
> 0xfe0001807678 (20110527/exresop-443)
> ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
> [OpcodeName unavailable] (20110527/dswexec-498)
> ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.SMAB] (Node
> 0xfe00017edc08), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> ACPI Error: Method parse/execution failed [\_TZ_.GFXZ._TMP] (Node
> 0xfe00017d3280), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> ACPI Error: Needed type [Reference], found [Integer] 0xfe0001807678
> (20110527/exresop-116)
> ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
> [OpcodeName unavailable] (20110527/dswexec-498)
> ACPI Error: Method parse/execution failed [\_TZ_.INTM] (Node
> 0xfe00017d4168), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> ACPI Error: Method parse/execution failed [\_TZ_.DTSZ._TMP] (Node
> 0xfe00017d4500), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> ACPI Error: Needed [Integer/String/Buffer], found [Reference]
> 0xfe0001807678 (20110527/exresop-533)
> ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
> [OpcodeName unavailable] (20110527/dswexec-498)
> ACPI Error: Method parse/execution failed [\_TZ_.GTTP] (Node
> 0xfe00017d6050), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> ACPI Error: Method parse/execution failed [\_TZ_.CPUZ._TMP] (Node
> 0xfe00017d41e0), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> ACPI Error: Needed [Integer/String/Buffer], found [Reference]
> 0xfe0001807678 (20110527/exresop-533)
> ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
> [OpcodeName unavailable] (20110527/dswexec-498)
> ACPI Error: Method parse/execution failed [\_TZ_.GTTP] (Node
> 0xfe00017d6050), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> ACPI Error: Method parse/execution failed [\_TZ_.SKNZ._TMP] (Node
> 0xfe00017d8258), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> ACPI Error: Needed [Integer/String/Buffer], found [Reference]
> 0xfe0001807678 (20110527/exresop-533)
> ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
> [OpcodeName unavailable] (20110527/dswexec-498)
> ACPI Error: Method parse/execution failed [\_TZ_.GTTP] (Node
> 0xfe00017d6050), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> ACPI Error: Method parse/execution failed [\_TZ_.BATZ._TMP] (Node
> 0xfe00017d8118), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> ACPI Error: Needed type [Reference], found [Integer] 0xfe0001807678
> (20110527/exresop-116)
> ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
> [OpcodeName unavailable] (20110527/dswexec-498)
> ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.KRFS]
> (Node 0xfe00017e71e0), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> ACPI Error: Method parse/execution failed [\_SB_.GRFS] (Node
> 0xfe00017f37f8), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> ACPI Error: Method parse/execution failed [\_TZ_.FDTZ._TMP] (Node
> 0xfe00017d8078), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> Uptime: 2h1m59s
> ACPI Error: Needed type [Reference], found [Integer] 0xfe0001807678
> (20110527/exresop-116)
> ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
> [OpcodeName unavailable] (20110527/dswexec-498)
> ACPI Error: Method parse/execution failed [\_SB_.PCI0.PEGP.DGFX._DOS]
> (Node 0xfe00017d9528), AE_AML_OPERAND_TYPE (20110527/psparse-560)
> can't evaluate \_SB_.PCI0.PEGP.DGFX._DOS - AE_AML_OPERAND_TYPE
> usbus0: Controller shutdown
> uhub0: at usbus0, port 1, addr 1 (disconnected)
> ugen0.2:  at usbus0 (disconnected)
&g

Panic at shutdown

2013-02-06 Thread David Demelier
Hello there,

I recently had a panic at shutdown in 9.1-STABLE, there's the backtrace:

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:
<118>.
<118>Feb  5 23:30:31 Melon syslogd: exiting on signal 15
<5>wlan0: link state changed to DOWN
<5>lagg0: link state changed to DOWN
Waiting (max 60 seconds) for system process `vnlru' to stop...done
Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
Waiting (max 60 seconds) for system process `syncer' to stop...
Syncing disks, vnodes remaining...7 1 1 0 done
All buffers synced.
ACPI Error: Needed [Integer/String/Buffer], found [Reference]
0xfe0001807678 (20110527/exresop-443)
ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
[OpcodeName unavailable] (20110527/dswexec-498)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.SMAB] (Node
0xfe00017edc08), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method parse/execution failed [\_TZ_.GFXZ._TMP] (Node
0xfe00017d3280), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Needed type [Reference], found [Integer] 0xfe0001807678
(20110527/exresop-116)
ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
[OpcodeName unavailable] (20110527/dswexec-498)
ACPI Error: Method parse/execution failed [\_TZ_.INTM] (Node
0xfe00017d4168), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method parse/execution failed [\_TZ_.DTSZ._TMP] (Node
0xfe00017d4500), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Needed [Integer/String/Buffer], found [Reference]
0xfe0001807678 (20110527/exresop-533)
ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
[OpcodeName unavailable] (20110527/dswexec-498)
ACPI Error: Method parse/execution failed [\_TZ_.GTTP] (Node
0xfe00017d6050), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method parse/execution failed [\_TZ_.CPUZ._TMP] (Node
0xfe00017d41e0), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Needed [Integer/String/Buffer], found [Reference]
0xfe0001807678 (20110527/exresop-533)
ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
[OpcodeName unavailable] (20110527/dswexec-498)
ACPI Error: Method parse/execution failed [\_TZ_.GTTP] (Node
0xfe00017d6050), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method parse/execution failed [\_TZ_.SKNZ._TMP] (Node
0xfe00017d8258), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Needed [Integer/String/Buffer], found [Reference]
0xfe0001807678 (20110527/exresop-533)
ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
[OpcodeName unavailable] (20110527/dswexec-498)
ACPI Error: Method parse/execution failed [\_TZ_.GTTP] (Node
0xfe00017d6050), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method parse/execution failed [\_TZ_.BATZ._TMP] (Node
0xfe00017d8118), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Needed type [Reference], found [Integer] 0xfe0001807678
(20110527/exresop-116)
ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
[OpcodeName unavailable] (20110527/dswexec-498)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.KRFS]
(Node 0xfe00017e71e0), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method parse/execution failed [\_SB_.GRFS] (Node
0xfe00017f37f8), AE_AML_OPERAND_TYPE (20110527/psparse-560)
ACPI Error: Method parse/execution failed [\_TZ_.FDTZ._TMP] (Node
0xfe00017d8078), AE_AML_OPERAND_TYPE (20110527/psparse-560)
Uptime: 2h1m59s
ACPI Error: Needed type [Reference], found [Integer] 0xfe0001807678
(20110527/exresop-116)
ACPI Exception: AE_AML_OPERAND_TYPE, While resolving operands for
[OpcodeName unavailable] (20110527/dswexec-498)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.PEGP.DGFX._DOS]
(Node 0xfe00017d9528), AE_AML_OPERAND_TYPE (20110527/psparse-560)
can't evaluate \_SB_.PCI0.PEGP.DGFX._DOS - AE_AML_OPERAND_TYPE
usbus0: Controller shutdown
uhub0: at usbus0, port 1, addr 1 (disconnected)
ugen0.2:  at usbus0 (disconnected)
ubt0: at uhub0, port 1, addr 2 (disconnected)
usbus0: Controller shutdown complete
usbus1: Controller shutdown
uhub1: at usbus1, port 1, addr 1 (disconnected)
usbus1: Controller shutdown complete
usbus2: Controller shutdown
uhub2: at usbus2, port 1, addr 1 (disconnected)
usbus2: Controller shutdown complete
usbus3: Controller shutdown
uhub3: at usbus3, port 1, addr 1 (disconnected)
ugen3.2:  at usbus3 (disconnected)
usbus3: Controller shutdown complete
usbus4: Control

Re: The shutdown bug?

2012-10-23 Thread Travis Mikalson
Andriy Gapon wrote:
> on 23/10/2012 21:38 Per olof Ljungmark said the following:
>> On 2012-10-23 19:41, jb wrote:
>>> Per olof Ljungmark  intersonic.se> writes:
>>>
 ... 
 Setting sysctl hw.usb.no_shutdown_wait=1 does NOT fix the problem as
 described in
 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/167685
 ...
>>> There is another one:
>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=172952&cat=
>>> jb
>> Thanks, I'll add my experiences to that one.
> 
> I've just posted another followup to that PR.  If you could do some debugging
> that would be great.

Thank you for the followup, I will respond later when I am able. I will
have to build DDB into my kernel and see what I can find out about where
it's stuck.

I also intend to remove the SAS controllers and disable USB and various
things I can do to see if it stops being 100% reproducible on this
particular system.

I just patched in the following as a MFC and this also did not affect
this issue:
http://svnweb.freebsd.org/base/head/sys/geom/geom_disk.c?r1=240629&r2=241022&view=patch

That is 240822 and 241022 combined:
http://svnweb.freebsd.org/base/head/sys/geom/geom_disk.c?r1=240629&view=log
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: The shutdown bug?

2012-10-23 Thread Per olof Ljungmark
On 10/23/12 21:44, Andriy Gapon wrote:
> on 23/10/2012 21:38 Per olof Ljungmark said the following:
>> On 2012-10-23 19:41, jb wrote:
>>> Per olof Ljungmark  intersonic.se> writes:
>>>
 ... 
 Setting sysctl hw.usb.no_shutdown_wait=1 does NOT fix the problem as
 described in
 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/167685
 ...
>>>
>>> There is another one:
>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=172952&cat=
>>> jb
>>
>> Thanks, I'll add my experiences to that one.
> 
> I've just posted another followup to that PR.  If you could do some debugging
> that would be great.

Building a debugging kernel now, we'll see tomorrow if it works out.
Tested an updated HP DL380 G5 all ZFS before leaving work and it was the
same, no reboot.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: The shutdown bug?

2012-10-23 Thread Andriy Gapon
on 23/10/2012 21:38 Per olof Ljungmark said the following:
> On 2012-10-23 19:41, jb wrote:
>> Per olof Ljungmark  intersonic.se> writes:
>>
>>> ... 
>>> Setting sysctl hw.usb.no_shutdown_wait=1 does NOT fix the problem as
>>> described in
>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/167685
>>> ...
>>
>> There is another one:
>> http://www.freebsd.org/cgi/query-pr.cgi?pr=172952&cat=
>> jb
> 
> Thanks, I'll add my experiences to that one.

I've just posted another followup to that PR.  If you could do some debugging
that would be great.

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


Re: The shutdown bug?

2012-10-23 Thread Per olof Ljungmark
On 2012-10-23 19:41, jb wrote:
> Per olof Ljungmark  intersonic.se> writes:
> 
>> ... 
>> Setting sysctl hw.usb.no_shutdown_wait=1 does NOT fix the problem as
>> described in
>> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/167685
>> ...
> 
> There is another one:
> http://www.freebsd.org/cgi/query-pr.cgi?pr=172952&cat=
> jb

Thanks, I'll add my experiences to that one.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: The shutdown bug?

2012-10-23 Thread jb
Per olof Ljungmark  intersonic.se> writes:

> ... 
> Setting sysctl hw.usb.no_shutdown_wait=1 does NOT fix the problem as
> described in
> http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/167685
> ...

There is another one:
http://www.freebsd.org/cgi/query-pr.cgi?pr=172952&cat=
jb
 





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


The shutdown bug?

2012-10-23 Thread Per olof Ljungmark
As described in earlier reports, 9-STABLE sometimes cannot halt or
reboot properly.

FreeBSD 9.1-PRERELEASE #0 r241866: Mon Oct 22 16:28:47 CEST 2012

All ZFS file system, no NFS mounts. The problem occurs after updating
sources and rebuilding world for some reason the I suspect is connected
to the file system.

"shutdown -r now" or "halt -p" will stop after "Syncing discs" forever.
It is seen here on various HP boxes, DL360 G4, G5, XW6600 are examples.

Issuing a "shutdown -n -o -r now" works however and I assume this is not
too harmful with ZFS?

Setting sysctl hw.usb.no_shutdown_wait=1 does NOT fix the problem as
described in
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/167685

Should I file another bug or add to the existing?
Would it be useful to build a debug kernel, if yes, including what?

Thanks!

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


Re: 9.1 RELENG_9 Unable to cleanly dismount root partition on shutdown

2012-08-29 Thread Matt Smith

On 2012-08-28 22:51, Matt Smith wrote:

On 2012-08-27 21:35, Warren Block wrote:

On Mon, 27 Aug 2012, Matt Smith wrote:
Thank you for your help anyway, and your wonkity site, which I also 
once used for converting my procmail to maildrop. And thanks also to 
Erich and Stefan for your help. When I get some spare time I'll redo 
the filesystem and hope that it works.


Please post a followup after that.


Here is the followup! I have just rebuilt the server from scratch
using a 9.1-RC1 amd64 memstick image. Used the GPT labels directly in
the fstab and ignored glabel. And guess what? It works fine as you
probably expected. So it was definitely user error and the glabel
broke it. At least I've learnt a lot more about partitioning and
filesystems than I knew before anyway!

So once again, thank you for all your help. There is an open PR for
this that I raised which is amd64/170646 , I don't think there is any
way for me to close this myself is there? If somebody reads this who
has the rights to do so then please close it with "user is an idiot"
:)

Matt.


Hi again. Seems it was not actually that simple after all. Yesterday I 
had tested rebooting the server after just the base O/S had been 
installed and it was working fine so I assumed that was it. Today I have 
reinstalled all my ports and then decided to do one last reboot to make 
sure everything came up properly. And guess what? The same error 
happened again! I then tracked it down. It seems to happen when the 
mail/postgrey port is started. If I comment that out of rc.conf and 
reboot and let it mark the filesystem clean then I can happily reboot 
with no issues again. If I remove the comment and start it up then I get 
the same issue on the next reboot.


So there is something strange happening between the mail/postgrey port 
and 9.1-RC1 amd64. As greylisting isn't completely important I can leave 
this disabled for now but I would like to still resolve this issue so 
that I can use it again, unless there is alternative greylisting 
software that I could use with postfix.


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


  1   2   3   4   >