No description
- C 97.1%
- Makefile 1.2%
- Shell 0.7%
- Assembly 0.5%
- C++ 0.2%
- Other 0.1%
When a VFS thread finalizes a transaction in journal_stop_transaction_locked, it holds the global j_state_lock while performing memcpy to hydrate shadow buffers from the live Mach virtual memory cache (bptr). Under heavy memory pressure, this memcpy can trigger a Page Fault. If the Mach kernel decides to evict dirty pages to satisfy the fault, the ext2fs pager is invoked. The pager then attempts to write blocks to disk, which requires acquiring the j_state_lock but that lock is already held by the suspended VFS thread, causing a circular deadlock. Fix: Decouple memory hydration (memcpy) from the j_state_lock. - While holding the lock, identify blocks needing hydration and stage them in a thread-local list using jb_next. - Temporarily increment t_updates to protect the transaction from being freed. - Drop the j_state_lock to perform the memcpy. If a page fault occurs here, the pager can now safely acquire the lock to satisfy the I/O. - Re-acquire the lock and decrement t_updates to finalize the commit. This ensures the lock is never held while accessing pageable memory. Test: I have run the scenario in which i can recreate the deadlock multiple times with debugging messages on and off, and i don't manage to cause this specific deadlock scenario any more. |
||
|---|---|---|
| acpi | ||
| auth | ||
| benchmarks | ||
| boot | ||
| config | ||
| console | ||
| console-client | ||
| daemons | ||
| defpager | ||
| devnode | ||
| doc | ||
| eth-multiplexer | ||
| exec | ||
| ext2fs | ||
| fatfs | ||
| fstests | ||
| ftpfs | ||
| hostmux | ||
| hurd | ||
| include | ||
| init | ||
| isofs | ||
| libbpf | ||
| libcons | ||
| libdiskfs | ||
| libfshelp | ||
| libfshelp-tests | ||
| libftpconn | ||
| libhurd-slab | ||
| libhurdbugaddr | ||
| libihash | ||
| libiohelp | ||
| libirqhelp | ||
| libmachdev | ||
| libnetfs | ||
| libpager | ||
| libpipe | ||
| libports | ||
| libps | ||
| libshouldbeinlibc | ||
| libstore | ||
| libtrivfs | ||
| login | ||
| lwip | ||
| mach-defpager | ||
| mount | ||
| nfs | ||
| nfsd | ||
| pci-arbiter | ||
| pfinet | ||
| pflocal | ||
| proc | ||
| procfs | ||
| release | ||
| rtc | ||
| rumpdisk | ||
| rumpnet | ||
| shutdown | ||
| startup | ||
| storeio | ||
| sutils | ||
| term | ||
| tmpfs | ||
| trans | ||
| usermux | ||
| utils | ||
| .gitignore | ||
| aclocal.m4 | ||
| BUGS | ||
| build.mk.in | ||
| build.mkcf.in | ||
| ChangeLog | ||
| config.guess | ||
| config.make.in | ||
| config.sub | ||
| configure.ac | ||
| COPYING | ||
| gitlog-to-changelog | ||
| hurd.boot | ||
| INSTALL | ||
| INSTALL-cross | ||
| install-sh | ||
| Makeconf | ||
| Makefile | ||
| mkinstalldirs | ||
| move-if-change | ||
| NEWS | ||
| README | ||
| tasks | ||
| TODO | ||
| version.h.in | ||
This is the GNU Hurd, <http://www.gnu.org/software/hurd/>. Welcome.
GNU Hurd runs on 32-bit and 64-bit x86 machines. Volunteers interested in ports
to other architectures are sought; please contact us (see below) if you'd like
to help.
To compile the Hurd, you need a toolchain configured to target i?86-gnu;
you cannot use a toolchain targeting GNU/Linux. Also note that you
cannot run the Hurd "in isolation": you'll need to add further components
such as the GNU C Library (glibc), to turn it into a runnable system.
Recent versions of Mach, MIG, glibc, and GCC are required. Optionally, a Sun
RPC implementation is needed to build the NFS translator and daemon:
glibc Configured with --enable-obsolete-rpc.
TI-RPC Currently fails to build on GNU, see
<http://lists.debian.org/debian-hurd/2010/12/msg00007.html>.
Obviously, you also need somewhat recent versions of binutils, make,
bash and some other tools. No hard requirements are currently known
for these, though.
For instructions on compiling and installing the GNU Hurd from an
already running Hurd system, see the file `INSTALL'.
It is possible to cross-build the Hurd; the file INSTALL-cross
contains some past instructions for doing so, but it's too much
trouble to maintain these instructions and keep them up to date. Your
best bet is to start with a running Hurd system already. If you do
decide to cross compile, you will need to examine the instructions in
INSTALL for building Mach, libc, and the Hurd together, and follow
them. The instructions in INSTALL-cross are quite out-of-date, but
they contain some useful hints buried amongst the errors, so we have
left the file for those who find it useful.
Please note that this directory also contains a fair amount of
not-yet-working code. By default, the makefiles build only the
working code.
The GNU Hurd is free software. All of it, including the libraries in
this distribution, is covered by the GNU General Public License, found
in the file COPYING.
Please read the FAQ at <http://www.gnu.org/software/hurd/faq.html>.
Bug reports should be sent to <bug-hurd@gnu.org> or filed on
<http://savannah.gnu.org/bugs/?group=hurd>. Requests for assistance
should be sent to <help-hurd@gnu.org> or filed on
<http://savannah.gnu.org/support/?group=hurd>. You can also find us on
the libera.chat IRC network in the #hurd channel.