# [reiserfs] mount: floating point exception or die!

## Peach

ok I think that this code will sums all it up:

```
organic ~ # mkreiserfs -b 512 -l VAR --format 3.6 /dev/hdc4

mkreiserfs 3.6.19 (2003 www.namesys.com)

A pair of credits:

Elena Gryaznova performed testing and benchmarking.

Edward Shushkin wrote the encryption and compression  file plugins,  and the V3

journal relocation code.

Format 3.6 with standard journal

Count of blocks on the device: 17591168

Number of blocks consumed by mkreiserfs formatting process: 8391

Blocksize: 512

Hash function used to sort names: "r5"

Journal Size 3966 blocks (first block 130)

Journal Max transaction length 128

inode generation number: 0

UUID: 04173151-c453-4b8d-81c7-0649ec87b3c3

LABEL: VAR

ATTENTION: YOU SHOULD REBOOT AFTER FDISK!

        ALL DATA WILL BE LOST ON '/dev/hdc4'!

Continue (y/n):y

Initializing journal - 0%....20%....40%....60%....80%....100%

Syncing..ok

Tell your friends to use a kernel based on 2.4.18 or later, and especially not a

kernel based on 2.4.9, when you use reiserFS. Have fun.

ReiserFS is successfully created on /dev/hdc4.

organic ~ # mount /dev/hdc4 /mnt/temp/

floating point exception
```

if I ignore this error message and specify the -t reiserfs flag it will mount with no error but I get an Oops and a bad freeze on my machine...

some info on the machine: it is a P3 1GHz. the whole machine has been compiled on a newer machine in a chroot with the corrects clags and so on. So I don't really know if this is just due to the compile thing or even worse to a hardware issue.

the kernel is configured this way:

```
# zcat /proc/config.gz | grep REISER 

CONFIG_REISERFS_FS=y

# CONFIG_REISERFS_CHECK is not set

# CONFIG_REISERFS_PROC_INFO is not set

CONFIG_REISERFS_FS_XATTR=y

CONFIG_REISERFS_FS_POSIX_ACL=y

# CONFIG_REISERFS_FS_SECURITY is not set
```

I almost forgot:

```
# emerge --info

Portage 2.1.3.16 (hardened/x86/2.6, gcc-4.1.1, glibc-2.6.1-r0, 2.6.22-hardened-r8 i686)

=================================================================

System uname: 2.6.22-hardened-r8 i686 Celeron (Coppermine)

Timestamp of tree: Thu, 08 Nov 2007 12:46:01 +0000

app-shells/bash:     3.2_p17

dev-lang/python:     2.4.3-r4, 2.5.1-r2

dev-python/pycrypto: 2.0.1-r6

sys-apps/baselayout: 1.12.9-r2

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.61-r1

sys-devel/automake:  1.10

sys-devel/binutils:  2.18-r1

sys-devel/gcc-config: 1.3.16

sys-devel/libtool:   1.5.24

virtual/os-headers:  2.6.22-r2

ACCEPT_KEYWORDS="x86"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="candy ccache distlocks fixpackages metadata-transfer nostrip parallel-fetch sandbox sfperms strict unmerge-orphans userfetch usersandbox"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

LANG="it_IT.UTF-8"

LC_ALL="it_IT.UTF-8"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X berkdb cracklib crypt hardened javascript midi nls nptl nptlonly pam pic readline sse ssl tcpd unicode urandom x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

----------

## Sadako

I have the same problem, and I posted it 11 months ago to the day, but never got any response.

I'm also using a hardened system, so that could very well be the root cause.

----------

## Peach

 *Hopeless wrote:*   

> I have the same problem, and I posted it 11 months ago to the day, but never got any response.
> 
> I'm also using a hardened system, so that could very well be the root cause.

 

interesting issue.

Btw I had the very same error while I was partitioning the disks via SystemRescueCD (which is gentoo based) but I don't know if that is hardened compiled, so I'm not sure to set it the root cause.

have you tried with reiser4 or even xfs with blocksize 512?

anyway is there any specific support for reiser? ml or such? already tried to ask there? 

if this is a serious issue I'd go for a bugreport.

----------

## earcar

http://osdir.com/ml/file-systems.reiserfs.general/2003-12/msg00097.html

has this anything to do with your problem?

----------

## Peach

 *earcar wrote:*   

> http://osdir.com/ml/file-systems.reiserfs.general/2003-12/msg00097.html
> 
> has this anything to do with your problem?

 

if it is really related to it I don't seen any solution in the near future

what I'm interested in is: what is causing this? the arch? the hardened gcc profile? some intrinsic error?

I will try xfs with 512 kib blocks to see what happen.

I'll let you know.

----------

## Neo2

Some weeks ago I tried to relocate some data on my laptop by increasing efficiency of filesystems because I'm in constant need of free space (my root partition is 3,4Gb). Reiser3 when mounting the partition with 512 block size had the same exact issue. Increasing block size to 1024 allowed the partition to be mounted correctly. No corruption/errors seen so far. I'm running a 32bit environment, no aggressive CFLAGS/LDFLAGS, not hardened profile, stable gentoo-sources as kernel. When having issues with reiser3fs I had same configuration as Peach and CONFIG_REISERFS_PROC_INFO, CONFIG_REISERFS_SECURITY were (and still are) enabled. I tried to do some testing right now, first with a 50Mb loop filesystem with 512 block size: no errors. I tried then reproducing the same situation I had some weeks ago (/usr/portage on a loop filesystem). I created a 500Mb loop filesystem with 512 block size and still getting no error. Same with a 750Mb filesystem. I think this problem has been fixed in gentoo-sources-r9 because it's the only difference I can see between your system and mine (apart from hardened profile). I don't have time right now to check the kernel changelog, but I think this was a kernel/module issue that has been fixed in r9 of the kernel because it's the only thing that has been upgraded on my system in the last 3-4 weeks. I really don't know if it will work for you, though.

----------

## Peach

 *Neo2 wrote:*   

> I don't have time right now to check the kernel changelog, but I think this was a kernel/module issue that has been fixed in r9 of the kernel because it's the only thing that has been upgraded on my system in the last 3-4 weeks. I really don't know if it will work for you, though.

 

interesting point of view.

I'll check for the latest version (maybe I'll have to unmask it)

----------

## Neo2

ok... I think I just smashed my theory to pieces. Got some time to do some other tests:

```
gentoo-node2 ~ # touch /fileprova

gentoo-node2 ~ # dd if=/dev/zero of=/fileprova bs=1M count=50 seek=1

50+0 records in

50+0 records out

52428800 bytes (52 MB) copied, 6,96628 s, 7,5 MB/s

gentoo-node2 ~ # mkreiserfs -b 512 -l VAR --format 3.6 -f /fileprova

mkreiserfs 3.6.19 (2003 www.namesys.com)

A pair of credits:

Elena Gryaznova performed testing and benchmarking.

The  Defense  Advanced  Research  Projects Agency (DARPA, www.darpa.mil) is the

primary sponsor of Reiser4.  DARPA  does  not  endorse  this project; it merely 

sponsors it.

/fileprova is not a block special device

Continue (y/n):y

Format 3.6 with standard journal

Count of blocks on the device: 104448

Number of blocks consumed by mkreiserfs formatting process: 4122

Blocksize: 512

Hash function used to sort names: "r5"

Journal Size 3966 blocks (first block 130)

Journal Max transaction length 128

inode generation number: 0

UUID: a9af6078-0419-492c-a715-5e684f77d2f1

LABEL: VAR

Initializing journal - 0%....20%....40%....60%....80%....100%

Syncing..ok

Tell your friends to use a kernel based on 2.4.18 or later, and especially not a

kernel based on 2.4.9, when you use reiserFS. Have fun.

ReiserFS is successfully created on /fileprova.

gentoo-node2 ~ # mount /fileprova /mnt/tmp

Errore di virgola mobile

gentoo-node2 ~ # mount -t reiserfs /fileprova /mnt/tmp -o loop

[dmesg]

[ 8806.507000] ReiserFS: loop1: found reiserfs format "3.6" with standard journal

[ 8806.507000] ReiserFS: loop1: using ordered data mode

[ 8806.508000] ReiserFS: loop1: journal params: device loop1, size 3965, journal first block 130, max trans len 128, max batch 112, max commit age 30, max trans age 30

[ 8806.512000] ReiserFS: loop1: checking transaction log (loop1)

[ 8806.556000] ReiserFS: loop1: Using r5 hash to sort names

[ 8806.556000] ReiserFS: loop1: warning: Created .reiserfs_priv on loop1 - reserved for xattr storage.

[/dmesg]

gentoo-node2 ~ # umount /mnt/tmp

gentoo-node2 ~ # mount /fileprova /mnt/tmp -o loop

Errore di virgola mobile
```

I did some tests with your same parameters (-f switch is needed just because I'm trying on a loop device) and the filesystem was created correctly. If you don't specify the "-t reiserfs" switch when mounting, mount will throw the error. If you specify it, as you can see, all goes well. At first I thought this would work out only for loop devices, so I decided to try it on my swap partition:

```
gentoo-node2 ~ # swapoff /dev/hda9

gentoo-node2 ~ # mkreiserfs -b 512 -l VAR --format 3.6 /dev/hda9

mkreiserfs 3.6.19 (2003 www.namesys.com)

A pair of credits:

SuSE (www.suse.com)  pays for continuing work on journaling for version 3, paid

for much of the previous version 3 work, and is paying for Chris and Jeff to do

V3 maintenance. Reiserfs integration in their distro is consistently solid, and

they were key to our becoming widely used.

Vitaly Fertman wrote  fsck for V3 and  maintains the reiserfsprogs package now.

He wrote librepair,  userspace plugins repair code, fsck for V4,  and worked on

developing libreiser4 and userspace plugins with Umka.

Format 3.6 with standard journal

Count of blocks on the device: 513920

Number of blocks consumed by mkreiserfs formatting process: 4222

Blocksize: 512

Hash function used to sort names: "r5"

Journal Size 3966 blocks (first block 130)

Journal Max transaction length 128

inode generation number: 0

UUID: a6c08a58-7278-471c-858b-1fd48cfa3de2

LABEL: VAR

ATTENTION: YOU SHOULD REBOOT AFTER FDISK!

        ALL DATA WILL BE LOST ON '/dev/hda9'!

Continue (y/n):y

Initializing journal - 0%....20%....40%....60%....80%....100%

Syncing..ok

Tell your friends to use a kernel based on 2.4.18 or later, and especially not a

kernel based on 2.4.9, when you use reiserFS. Have fun.

ReiserFS is successfully created on /dev/hda9.

gentoo-node2 ~ # mount /dev/hda9 /mnt/tmp

Errore di virgola mobile

gentoo-node2 ~ # mount -t reiserfs /dev/hda9 /mnt/tmp

[dmesg]

[ 9235.937000] ReiserFS: hda9: found reiserfs format "3.6" with standard journal

[ 9235.938000] ReiserFS: hda9: using ordered data mode

[ 9235.938000] ReiserFS: hda9: journal params: device hda9, size 3965, journal first block 130, max trans len 128, max batch 112, max commit age 30, max trans age 30

[ 9235.940000] ReiserFS: hda9: checking transaction log (hda9)

[ 9236.053000] ReiserFS: hda9: Using r5 hash to sort names

[ 9236.053000] ReiserFS: hda9: warning: Created .reiserfs_priv on hda9 - reserved for xattr storage.

[/dmesg]

gentoo-node2 ~ # umount /mnt/tmp
```

Again, if the "-t reiserfs" switch is not specified mount throws the error, else it goes on well. I think that now your problem is to figure out why, when correctly using the -t switch with mount, your system Oops and freezes.

Are you able to post any output from the the kernel Oops?

Also, to distinguish between a hardware fault or a software fault, you could try to execute some tests on loop filesystems like I did above. If the issue appears even if you're testing on a loop filesystem (on a reliable partition, of course) then it's probably due to a software fault. I do not guarantee 100% accurate results because if it's more than just one piece of software failing (mount, kernel, etc) the Oops is likely to appear anyway. Last question: formatting with greater block size or with different filesystem and then mounting throws the Oops anyway? If so, it is likely to be a software-indipendent fault.

----------

