Bug 141740 - [geom] gjournal(8): g_journal_destroy concurrent error
Summary: [geom] gjournal(8): g_journal_destroy concurrent error
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-18 06:00 UTC by Zhouyi Zhou
Modified: 2017-12-31 22:34 UTC (History)
0 users

See Also:


Attachments
file.diff (652 bytes, patch)
2009-12-18 06:00 UTC, Zhouyi Zhou
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zhouyi Zhou 2009-12-18 06:00:14 UTC
When the kernel is configured as preemptable, when after the PC excuted function g_journal_destroy line 2352:

2350         while (sc->sc_worker != NULL)
2351                 msleep(&sc->sc_worker, &sc->sc_mtx, PRIBIO, "gj:destroy", 0);
2352         mtx_destroy(&sc->sc_mtx);

now the g_topology_unlock has been called, then if g_journal_switcher got scheduled, the concurrence problem will occur.


#0  0x407a8de5 in turnstile_setowner (ts=0x63be6480, owner=0x4) at ../../../kern/subr_turnstile.c:457
#1  0x407a92bc in turnstile_wait (lock=0x836b8210, owner=0x4, queue=0) at ../../../kern/subr_turnstile.c:661
#2  0x40770fb3 in _mtx_lock_sleep (m=0x836b8210, tid=2145898496, opts=0, file=0x0, line=0) at ../../../kern/kern_mutex.c:580
#3  0x407359de in g_journal_do_switch (classp=0x40dbaee0, td=0x7fe7d000) at ../../../geom/journal/g_journal.c:2861
#4  0x40735c57 in g_journal_switcher (arg=0x40dbaee0) at ../../../geom/journal/g_journal.c:2909

How-To-Repeat: reboot/shutdown, if luck, the problem occurs
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2009-12-18 06:45:23 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-geom

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:39 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped