# FYI: core dump from ZFS rollback of /var from single user mode



## Stochastix (May 29, 2013)

I had an update that went seriously sideways, so I decided to just roll back to my root pool snapshot from before I began the update.  I figured I should boot into a live FreeBSD from a memory stick, but didn't have the right stick handy, so I took a chance on dropping down into single user mode.  I had followed the first reasonable looking HOWTO I found before setting this test box up, so I had made many datasets for the root file system. 


```
zunk/root
zunk/tmp
zunk/usr
zunk/usr/home
zunk/usr/jails
zunk/usr/obj
zunk/usr/ports
zunk/usr/ports/distfiles
zunk/usr/ports/packages
zunk/var
zunk/var/log
zunk/var/service
zunk/var/tmp
```

I didn't realize rollback doesn't do its own recursion.  Everything went fine rolling back by hand until I hit /var.  This immediately core dumped.  I rebooted back into single user mode, finished the rollback of service and tmp and the system appears fine.  I didn't use `-f`.  

This was during the userland side of the half-upgrade from 9.0 to 9.1 on AMD64.


----------



## phoenix (May 29, 2013)

Computers do exactly what you tell them to.   If you don't specify *-r* for recursive in the command ... it won't do a recursive rollback.  

When in doubt, read the man page before doing anything.


----------



## kpa (May 29, 2013)

The core dump is still a bit suspicious, as far as I know zfs(8) does not depend on /var during its operation so that question remains: What caused the core dump and was it zfs(8) that crashed or something else?


----------



## phoenix (May 29, 2013)

Maybe from trying to roll-back a parent filesystem without first rolling-back the child filesystems, thus hitting some kind of safety ASSERT in the zfs code?


----------

