Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Oct 2007 17:44:45 GMT
From:      Volker Ernst <xorrox@sysve.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   i386/117188: System crashes/reboots on access to file on GELI-encrypted drive.
Message-ID:  <200710141744.l9EHij2U019702@www.freebsd.org>
Resent-Message-ID: <200710141750.l9EHo0Ul017453@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         117188
>Category:       i386
>Synopsis:       System crashes/reboots on access to file on GELI-encrypted drive.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 14 17:50:00 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Volker Ernst
>Release:        6.2-RELEASE
>Organization:
>Environment:
FreeBSD oxo.grund.xnet 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Sat May  5 07:36:30 CEST 2007     root@oxo.grund.xnet:/usr/src/sys/i386/compile/OXO  i386

>Description:
Hi,

my box is running 6.2-RELEASE, using my own kernel (config-file attached).
It has 2 harddisks (along with 2 CD-drives on 2nd IDE-controller).
Second (300 GB) harddisk is completely used as GELI-encrypted drive.
File-system in use on top of that is UFS2.

Now i have 2 problems/bugs when using this drive for storage:
1) It permanently gets inconsistent (fsck reports errors)
   and looses data (however "only" at a low rate),
   even though its always properly unmounted (umount, geli detach).
2) When accessing _some_ (not all) files on the encrypted drive,
   the machine gets a "segment violation" and reboots 15 sec later.
   Its interesting to see that this behaviour depends on how you
   access the file:
   - It seems to happen only if you "copy/move" the file to a different
     (unencrypted) partition on the system.
   - If you dont "copy" the "critical" file to the unencrypted partition,
     but just read it (i.e. by adding it to an archive on the unencrypted
     partition) - then the machine does _not_ crash.
   When the encrypted disk is mounted at 3am (when system cron-jobs run),
   then the machine sometimes crashes while cron-jobs access files on the
   encrypted drive (however not always).

My GELI-parameters are not standard, maybe thats the problem?
I have included the output of some relevant utilities,
please get http://www.cphone.de/bug.tgz (cant attach tgz-files here).
"geli.txt"  shows what GELI-parameters are used on the encrypted drive.
"dumpfs.txt" shows UFS2 file-system parameters on GELI-encrypted drive.
"fdisk.txt" shows physical disk-parameters for the encrypted drive.
"kernel.conf" is the config-file that was used to build the kernel.
"uname.txt" is the output of "uname -a".

Apart from this the system has no problems, access to other unencrypted
drives etc is ok.

Volker

>How-To-Repeat:
Attach 300 GB 2nd harddisk to machine running 6.2-RELEASE,
build kernel with attached config-file,
build GELI encrypted 2nd harddisk with attached parameters,
build UFS2 filesystem on top of that,
copy lots of data to the drive.

Do regular checks with "fsck"
--> you should usually see some errors on the file-system
Try "copying" or "moving" many files to different (unencrypted) drive
--> machine should reboot on access to certain files
Watch for spontaneous reboot while running cron-jobs
--> you should sometimes see the machine rebooting

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710141744.l9EHij2U019702>