Bug 220437

Summary: system crashes and reboots while unpacking tarball to sdcard
Product: Base System Reporter: josua.mayer97
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Only Me CC: josua.mayer97, marklmi26-fbsd
Priority: ---    
Version: 11.0-STABLE   
Hardware: i386   
OS: Any   

Description josua.mayer97 2017-07-02 21:52:22 UTC
Hi there;
I am running FreeBSD-11.1-RC1 on an old Pentium3 machine with 512MB RAM.
The device also has a USB-2.0 PCI expansion card where I attached a USB-3.0 sdcard reader by Transcend.

Now what I am doing is mount slice 3 (MBR) on that card as /mnt, and unpack a previously created tarball containing a custom freebsd build for arm.
Tarball is about 900MB in size, and then gzipped with -9 to 300MB.

I was using an SSH session to perform the unpacking, and after a while the console showed errors:
root@pentium3:/mnt # tar -xpf /usr/local/samba/clearfog/freebsd-clearfog-20170702.tar.gz 
usr/: Can't create 'usr'
usr/lib/: Can't create 'usr/lib'
usr/libexec/: Can't create 'usr/libexec'
usr/libdata/: Can't create 'usr/libdata'

Once I noticed the situation, the machine was already halfway through rebooting, and the SSH client eventually realized that the session was dead.

I have seen this behaviour before with FreeBSD as a guest to VirtualBox, with that *same* cardreader and card attached via usb-passthrough! (But I didn't collect any data back then).

So a crashdump was saved in /var/crash:
-rw-------  1 root  wheel   191M Jul  3 01:05 vmcore.0

Let me know if you need further details.
Comment 1 josua.mayer97 2017-07-02 22:27:02 UTC
It just crashed again, this time while I cleaned up, by mounting the disk as /mnt, and rm -rf'ing all the stuff there.

root@pentium3:/mnt # rm -rf COPYRIGHT bin boot dev etc lib libexec media mnt net proc rescue root sbin sys tmp
rm: etc/portsnap.conf: Device not configured
rm: etc/devfs.conf: Device not configured
rm: etc/X11: Directory not empty
rm: etc/libalias.conf: Device not configured

-rw-------  1 root  wheel   188M Jul  3 02:54 vmcore.1
Comment 2 josua.mayer97 2017-07-02 22:58:29 UTC
To rule out sources of trouble, I switched the sdcard, and connected the reader to the onboard USB port (which I believe is 1.1 ...) and did the same process ... and it crashed.
This time though it was les verbose:
root@pentium3:/mnt # tar -xpf /usr/local/samba/clearfog/freebsd-clearfog-20170702.tar.gz 
packet_write_wait: Connection to port 22: Broken pipe

-rw-------  1 root  wheel   189M Jul  3 03:45 vmcore.2
Comment 3 Mark Millard 2017-07-03 05:42:00 UTC
Version CURRENT means 12 (in other words: head)

FreeBSD-11.1-RC1 is not an example of CURRENT
but is what you report in the description.

The wrong people may look at this in the wrong
time frame if they use Version to filter what
they look at.

FreeBSD-11.1 does not have all that much time
left before it turns official and freezes.

I do not have permission to adjust Version.

As far as I can tell the best selection for
11 after 11.0-RELEASE is 11.0-STABLE.

Unfortunately the code freeze on stable/11
probably ended today so even with listing
11.0-STABLE the relationship would be less
clear in the Version then one would hope.
Comment 4 josua.mayer97 2017-07-03 10:50:10 UTC
(In reply to Mark Millard from comment #3)
Thanks for clearing that up! I set it to 11.0-STABLE now, and will update it as a new option becomes available.