# gjournal issue / kernel panic



## User23 (Sep 9, 2010)

I tried to make GPT Partition upon /dev/da0 and use it with journal and mounted it the default way (as described in the handbook), so it is mounted witch sync and not async. So far so good. While stresstest it with iozone i get a kernel panic (panic: journal overflow) every time iozone starts to test the random write performance. 


```
gpart create -s gpt da0

gpart add -t freebsd-ufs da0

gjournal label /dev/da0p1

newfs -O 2 -J /dev/da0p1.journal

mount /dev/da0p1.journal /mnt/1

iozone -R -l 8 -u 8 -r 32k -s 100m -F /mnt/1/0 /mnt/1/1 /mnt/1/2 /mnt/1/3 /mnt/1/4 /mnt/1/5 /mnt/1/6 /mnt/1/7
```

As i mount it with the option async, no panic occured.

---

I searched the web for the panic and found this still open bugrequest: http://www.freebsd.org/cgi/query-pr.cgi?pr=127420
But iam not sure if it is the same problem because he said all his drives were mounted with async.

---

Did i do something wrong?
Is this worth to make a new bug request?


----------



## SirDice (Sep 9, 2010)

User23 said:
			
		

> Is this worth to make a new bug request?


You could test it with the async option. If both ways (with async and with sync) produce the same error I would just add the findings to that PR instead of creating a new one.


----------



## oliverh (Sep 9, 2010)

Maybe there is no space left anymore for the journal?


----------



## Galactic_Dominator (Sep 9, 2010)

There is no problem with async, in fact async option should be used with gjournal.  

Please review this:

http://www.freebsd.org/cgi/man.cgi?...ath=FreeBSD+8.1-RELEASE+and+Ports&format=html

Take particular note of the label -s option.  If you make it too small(which the default is in a lot of scenarios) you will get panics when you stress the device.


----------



## User23 (Sep 10, 2010)

The issue can be solved by using more than 1GB (default size) journal size.

Nonetheless iam confused about the behaviour that a filebenchmark writing 8x100M will blast a journal with 1GB size. But if this is normal then the default size is all too small. Well if i had read the manual exactly this issue would never happened. Rtfm like always and dont just trust the handbook  . for the journal: "recommended minimum is twice the size of the physical memory installed."

I have set the journal size to 32GB, mount it with sync and tested it with iozone writing 8x100M random without any panic. Now a test writing 8x4GB is running.

---

sync or async:

yes, async is safe to use for journaled ufs like written on the man page but sync should at least work, i thought.

---

Thanks for all your answers.


----------



## User23 (Sep 15, 2010)

Another part of the FreeBSD manual said:

"For example, if your system has 1 GB RAM, create an approximately 3.3 GB journal provider. (Multiply your RAM size with 3.3 to obtain the size of the journal)"

http://www.freebsd.org/doc/en_US.ISO8859-1/articles/gjournal-desktop/understanding-journaling.html

I think this thread can be marked as solved.


----------

