From owner-freebsd-questions@FreeBSD.ORG Wed Feb 13 07:00:24 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E99616A4E0 for ; Wed, 13 Feb 2008 07:00:24 +0000 (UTC) (envelope-from bennett@cs.niu.edu) Received: from mp.cs.niu.edu (mp.cs.niu.edu [131.156.68.41]) by mx1.freebsd.org (Postfix) with ESMTP id 1172613C4E3 for ; Wed, 13 Feb 2008 07:00:23 +0000 (UTC) (envelope-from bennett@cs.niu.edu) Received: from mp.cs.niu.edu (bennett@localhost [127.0.0.1]) by mp.cs.niu.edu (8.14.2/8.14.2) with ESMTP id m1D6xf3j015673; Wed, 13 Feb 2008 00:59:41 -0600 (CST) Date: Wed, 13 Feb 2008 00:59:41 -0600 (CST) From: Scott Bennett Message-Id: <200802130659.m1D6xffv015672@mp.cs.niu.edu> To: rsmith@xs4all.nl Cc: freebsd-questions@freebsd.org Subject: Re: /bin/csh script in GELI partition crashes 6.3-STABLE X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2008 07:00:24 -0000 On Tue, 12 Feb 2008 23:51:41 +0100 Roland Smith wrote: >On Tue, Feb 12, 2008 at 03:46:56PM -0600, Scott Bennett wrote: >> On Tue, 12 Feb 2008 16:01:26 +0100 Roland Smith >> wrote: >> >On Tue, Feb 12, 2008 at 08:02:49AM -0600, Scott Bennett wrote: >> >> I just set up a GELI partition for the first time a while ago (not >> >> counting the swap partition). After initializing the GELI device file, >> >> filling it from /dev/random, running newfs, and copying over a couple = >of >> >> directory trees from another file system, I tried running a C-shell sc= >ript >> >> in one of the bottom-level directories. The script works fine in its >> >> original location, but after cd'ing to the new location and running it, >> >> the system immediately reboots. Because this leaves most/all of the f= >ile >> >> systems marked dirty, fsck has to run on startup. (I ran fsck by hand= > on >> >> the GELI partition.) >> >> It does it every time, so it is certainly repeatable. Is this a >> >> known problem? Or is there some feature of GELI-encrypted file systems >> >> that is expected to have problems running scripts?=3D20 >> > >> >My /home is a GELI encrypted partition. I've never had problems running >> >scripts from it, although my scripts are usually sh, not csh. >> > >> >What does the script do? Are you running it as root? >> > >> The script displays a bunch of pictures as separate xv(1) windows. = >No, >> I was running it under my own userid. It is quite simple: >>=20 >> % cat show >> #! /bin/csh >> set delay=3D2 >> set pixlist=3D(09 08 07 05 04 03 02 01) >> foreach i ($pixlist) >> (nice xv $i.jpg &) >> sleep $delay >> end >>=20 >> The delay is simply to ensure the windows get opened in the sequence that >> I want them opened. The photos are in the same directory, and I run it by >> typing "./show" in the directory. If I type, for example, "xv 01.jpg&", = >it >> works fine in either the old location or in the GELI partition. If I type >> "./show" in the copy of the directory that is in the GELI partition, Free= >BSD >> reboots immediately.=20 > >I've run your script on a batch of photos on a GELI encrypted partition >without problems. This is on FreeBSD 7.0-PRERELEASE amd64 > >I would look at the X server. Since it runs as root and has access to >/dev/mem and /dev/io an X bug could potentially screw things up quite nicel= >y. >I'm running xorg-server-1.4_4,1. I'm still running xorg-server-6.9.0_5, I believe. Haven't yet felt like wading through the swamp of troubles that seems to await those who upgrade to 7.x, but will probably have to suffer through it soon. > >If you have it installed, try display(1) from the ImageMagick suite >instead of xv. See if it makes any difference. There's a thought. However, I think first I'll try setting the GELI sector size to 4 KB to see whether that evades the bug. > >I presume you've checked for the obvious things such as out of memory or >filesystem full? What do you mean "out of memory"? And I only had the file system loaded to about 45% after minfree. > >> Maybe I should try GBDE instead of GELI. I chose GELI for the=20 >> partition in question mainly because I was already using it for the swap >> partition, but maybe it's still a little too green to be reliable yet. >=20 >I've used it on my /home for years without trouble. > >=46rom what I've read, GELI is supposed to be more secure. > Well, if I can get it to work and not cause instant reboots, I'll stick with it. Otherwise I'll have to play around with what works. Scott Bennett, Comm. ASMELG, CFIAG ********************************************************************** * Internet: bennett at cs.niu.edu * *--------------------------------------------------------------------* * "A well regulated and disciplined militia, is at all times a good * * objection to the introduction of that bane of all free governments * * -- a standing army." * * -- Gov. John Hancock, New York Journal, 28 January 1790 * **********************************************************************