# g_journal panic / g_vfs errors / FreeBSD 9



## eyebone (Nov 25, 2011)

hello folks,

my box is running a:


```
FreeBSD  9.0-RC1 FreeBSD 9.0-RC1 #0: Mon Oct 24 11:07:05 UTC 2011
```

the mountpoint looks like:

```
/dev/ada0.elia.journal on / (ufs, local, soft-updates, gjournal)
```

i run geli together with journal, so i have no data lost during crashes on a ssd drive.
the box is booted by a usb stick. which decryps ada0 and mounts / onto it.

short after getting the login prompt i get the following message onto the console:


```
Nov 25 20:29:20  kernel: lock order reversal:
Nov 25 20:29:20  kernel: 1st 0xfffffe00082d4638 ufs (ufs) @ /usr/src/sys/kern/vf
s_subr.c:2166
Nov 25 20:29:20  kernel: 2nd 0xffffff81e8151fb8 bufwait (bufwait) @ /usr/src/sys
/ufs/ffs/ffs_vnops.c:260
Nov 25 20:29:20  kernel: 3rd 0xfffffe0007fff458 ufs (ufs) @ /usr/src/sys/kern/vf
s_subr.c:2166
Nov 25 20:29:20  kernel: KDB: stack backtrace:
Nov 25 20:29:20  kernel: db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
Nov 25 20:29:20  kernel: kdb_backtrace() at kdb_backtrace+0x37
Nov 25 20:29:20  kernel: _witness_debugger() at _witness_debugger+0x2e
Nov 25 20:29:20  kernel: witness_checkorder() at witness_checkorder+0x807
Nov 25 20:29:20  kernel: __lockmgr_args() at __lockmgr_args+0xdc6
Nov 25 20:29:20  kernel: ffs_lock() at ffs_lock+0x8c
Nov 25 20:29:20  kernel: VOP_LOCK1_APV() at VOP_LOCK1_APV+0x9b
Nov 25 20:29:20  kernel: _vn_lock() at _vn_lock+0x47
Nov 25 20:29:20  kernel: vget() at vget+0x7b
Nov 25 20:29:20  kernel: vfs_hash_get() at vfs_hash_get+0xd5
Nov 25 20:29:20  kernel: ffs_vgetf() at ffs_vgetf+0x48
Nov 25 20:29:20  kernel: softdep_sync_buf() at softdep_sync_buf+0x393
Nov 25 20:29:20  kernel: ffs_syncvnode() at ffs_syncvnode+0x2b3
Nov 25 20:29:20  kernel: ffs_sync() at ffs_sync+0x216
Nov 25 20:29:20  kernel: vfs_write_suspend() at vfs_write_suspend+0xd3
Nov 25 20:29:20  kernel: g_journal_switcher() at g_journal_switcher+0xeb9
Nov 25 20:29:20  kernel: fork_exit() at fork_exit+0x135
Nov 25 20:29:20  kernel: fork_trampoline() at fork_trampoline+0xe
Nov 25 20:29:20  kernel: --- trap 0, rip = 0, rsp = 0xffffff822b8edd00, rbp = 0 ---
```

probably interesting as well:

```
Nov 25 19:48:51  kernel: WARNING: /: TRIM flag on fs but cannot get whether disk supports TRIM
```

i suppose there is a problem with the setup i have choosen or with the ssd, any hints whats wrong with this? 

during operating the system i got several erros messages like:


```
Nov 25 17:11:12  kernel: fsync: giving up on dirty
Nov 25 17:11:12  kernel: 0xfffffe0007cdb000: tag devfs, type VCHR
Nov 25 17:11:12  kernel: usecount 1, writecount 0, refcount 4675 mountedhere 0xfffffe0007c9da00
Nov 25 17:11:12  kernel: flags ()
Nov 25 17:11:12  kernel: v_object 0xfffffe0007ce7798 ref 0 pages 88722
Nov 25 17:11:12  kernel: lock type devfs: EXCL by thread 0xfffffe0006d42460 (pid 6)
Nov 25 17:11:12  kernel: dev ada0.elia.journal
Nov 25 17:11:12  kernel: fsync: giving up on dirty
Nov 25 17:11:12  kernel: 0xfffffe0007cdb000: tag devfs, type VCHR
Nov 25 17:11:12  kernel: usecount 1, writecount 0, refcount 4675 mountedhere 0xfffffe0007c9da00
Nov 25 17:11:12  kernel: flags ()
Nov 25 17:11:12  kernel: v_object 0xfffffe0007ce7798 ref 0 pages 88722
Nov 25 17:11:12  kernel: lock type devfs: EXCL by thread 0xfffffe0006d42460 (pid 6)
Nov 25 17:11:12  kernel: dev ada0.elia.journal
Nov 25 17:11:12  kernel: GEOM_JOURNAL: Cannot suspend file system / (error=35).
```

currently the system is not operateable on some i/o it is crashing 

hints appreciated,
 eyebone


----------



## eyebone (Nov 28, 2011)

Ok, now I had a kernel panic on process pid 25, which was [g_journal ada0.elia]. The system jumped directly into the debugger with an error message about a g_journal overflow.


```
db> thread
[thread pid 25 tid 100071]
...
db> where
Tracing pid 25 tid 10071 td 0xffffffe007a828c0
kdb_enter() at kdb_enter+0x3b
panic() at panic+0x180
g_journal_flush() at g_journal_flux+0x8ec
g_journal_flush_send() at g_journal_flush_send+0xc1
...
```

Is this maybe a problem with the driver of the SSD drive? I am using here an Intel SSD with SATA3 (3GB/s) Model: SSDSA2BW160G3L.

Thanks,
 eyebone


----------

